summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_plugins.h44
-rw-r--r--include/newpluginapi.h1
-rw-r--r--plugins/AVS/src/commonheaders.h1
-rw-r--r--plugins/AssocMgr/src/common.h1
-rw-r--r--plugins/AutoShutdown/src/common.h1
-rw-r--r--plugins/Clist_classic/src/commonheaders.h1
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h1
-rw-r--r--plugins/Clist_mw/src/commonheaders.h1
-rw-r--r--plugins/Clist_nicer/SRC/Include/commonheaders.h1
-rw-r--r--plugins/Clist_nicer/skineditor/src/commonheaders.h1
-rw-r--r--plugins/CryptoPP/commonheaders.h1
-rw-r--r--plugins/Db3x/src/commonheaders.h1
-rw-r--r--plugins/Db3x_mmap/commonheaders.h1
-rw-r--r--plugins/Db_autobackups/headers.h1
-rw-r--r--plugins/Dbx_mmap_SA/commonheaders.h1
-rw-r--r--plugins/Dbx_tree/Interface.h1
-rw-r--r--plugins/ModernOpt/commonheaders.h1
-rw-r--r--plugins/NewAwaySysMod/Common.h1
-rw-r--r--plugins/NewXstatusNotify/common.h1
-rw-r--r--plugins/Popup/src/headers.h1
-rw-r--r--plugins/QuickMessages/quickmessages.h1
-rw-r--r--plugins/SecureIM/commonheaders.h1
-rw-r--r--plugins/Utils/templates.cpp23
-rw-r--r--plugins/helpers/commonheaders.h1
-rw-r--r--plugins/mTextControl/src/headers.h1
-rw-r--r--protocols/Gadu-Gadu/gg.h1
-rw-r--r--src/core/commonheaders.h1
-rw-r--r--src/core/stdauth/commonheaders.h1
-rw-r--r--src/core/stdautoaway/commonheaders.h1
-rw-r--r--src/core/stdaway/commonheaders.h1
-rw-r--r--src/core/stdemail/commonheaders.h1
-rw-r--r--src/core/stdfile/commonheaders.h1
-rw-r--r--src/core/stdhelp/commonheaders.h1
-rw-r--r--src/core/stdidle/commonheaders.h1
-rw-r--r--src/core/stduihist/commonheaders.h1
-rw-r--r--src/core/stdurl/commonheaders.h1
-rw-r--r--src/core/stduserinfo/commonheaders.h1
-rw-r--r--src/core/stduseronline/commonheaders.h1
-rw-r--r--src/mir_core/modules.cpp1
-rw-r--r--src/modules/database/database.cpp22
-rw-r--r--src/modules/database/profilemanager.cpp22
-rw-r--r--src/modules/database/profilemanager.h18
-rw-r--r--src/modules/plugins/newplugins.cpp17
43 files changed, 50 insertions, 133 deletions
diff --git a/include/m_plugins.h b/include/m_plugins.h
deleted file mode 100644
index a416295c2e..0000000000
--- a/include/m_plugins.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2012 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_PLUGINS_H__
-#define M_PLUGINS_H__
-
-/*
- Undocumented: Do NOT use.
- Version: 0.3.4.1+ (2004/10/04)
-*/
-#define DBPE_DONE 1
-#define DBPE_CONT 0
-#define DBPE_HALT (-1)
-typedef struct PLUGIN_DB_ENUM {
- int cbSize;
- // 0 = continue, 1 = found, -1 = stop now
- int (*pfnEnumCallback) (const char * pluginname, /*DATABASELINK*/ void * link, LPARAM lParam);
- LPARAM lParam;
-} PLUGIN_DB_ENUM;
-#define MS_PLUGINS_ENUMDBPLUGINS "Plugins/DbEnumerate"
-
-#endif // M_PLUGINS_H__
-
-
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index f705537260..3e70b8adc4 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_NEWPLUGINAPI_H__
#include <m_core.h>
-#include <m_plugins.h>
#define PLUGIN_MAKE_VERSION(a, b, c, d) (((((DWORD)(a))&0xFF)<<24)|((((DWORD)(b))&0xFF)<<16)|((((DWORD)(c))&0xFF)<<8)|(((DWORD)(d))&0xFF))
#define MAXMODULELABELLENGTH 64
diff --git a/plugins/AVS/src/commonheaders.h b/plugins/AVS/src/commonheaders.h
index 88e01d1f12..26986e89a6 100644
--- a/plugins/AVS/src/commonheaders.h
+++ b/plugins/AVS/src/commonheaders.h
@@ -44,7 +44,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clist.h>
#include <m_clc.h>
#include <m_clui.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/AssocMgr/src/common.h b/plugins/AssocMgr/src/common.h
index 9f6c0b7505..2bdfe841cb 100644
--- a/plugins/AssocMgr/src/common.h
+++ b/plugins/AssocMgr/src/common.h
@@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_utils.h>
#include <m_langpack.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_clist.h>
diff --git a/plugins/AutoShutdown/src/common.h b/plugins/AutoShutdown/src/common.h
index d0ee925bdc..2c79be9fb5 100644
--- a/plugins/AutoShutdown/src/common.h
+++ b/plugins/AutoShutdown/src/common.h
@@ -51,7 +51,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_skin.h>
#include <m_protosvc.h>
#include <m_protocols.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_message.h>
#include <m_file.h>
diff --git a/plugins/Clist_classic/src/commonheaders.h b/plugins/Clist_classic/src/commonheaders.h
index d046660d0c..11522da792 100644
--- a/plugins/Clist_classic/src/commonheaders.h
+++ b/plugins/Clist_classic/src/commonheaders.h
@@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clist.h>
#include <m_clistint.h>
#include <m_clui.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
index 738b402ec2..2bacaba3b6 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
@@ -102,7 +102,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clistint.h>
#include <m_skin.h>
#include <m_contacts.h>
-#include <m_plugins.h>
#include <m_avatars.h>
#include <m_genmenu.h>
#include <m_clui.h>
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h
index 61af060b38..1e6bccf2b0 100644
--- a/plugins/Clist_mw/src/commonheaders.h
+++ b/plugins/Clist_mw/src/commonheaders.h
@@ -56,7 +56,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clistint.h>
#include <m_skin.h>
#include <m_contacts.h>
-#include <m_plugins.h>
#include "m_genmenu.h"
#include "m_clui.h"
diff --git a/plugins/Clist_nicer/SRC/Include/commonheaders.h b/plugins/Clist_nicer/SRC/Include/commonheaders.h
index 91de256f0a..9d2c14f304 100644
--- a/plugins/Clist_nicer/SRC/Include/commonheaders.h
+++ b/plugins/Clist_nicer/SRC/Include/commonheaders.h
@@ -63,7 +63,6 @@
#include <m_clist.h>
#include <m_clistint.h>
#include <m_clui.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_utils.h>
#include <m_database.h>
diff --git a/plugins/Clist_nicer/skineditor/src/commonheaders.h b/plugins/Clist_nicer/skineditor/src/commonheaders.h
index 1d6d88b245..3692962393 100644
--- a/plugins/Clist_nicer/skineditor/src/commonheaders.h
+++ b/plugins/Clist_nicer/skineditor/src/commonheaders.h
@@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clist.h>
#include <m_clc.h>
#include <m_clui.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/CryptoPP/commonheaders.h b/plugins/CryptoPP/commonheaders.h
index 4e94917d78..a7ac221f5e 100644
--- a/plugins/CryptoPP/commonheaders.h
+++ b/plugins/CryptoPP/commonheaders.h
@@ -45,7 +45,6 @@
// Miranda API
#include <newpluginapi.h>
#include <m_stdhdr.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Db3x/src/commonheaders.h b/plugins/Db3x/src/commonheaders.h
index 415bb7448d..cf4b2d4985 100644
--- a/plugins/Db3x/src/commonheaders.h
+++ b/plugins/Db3x/src/commonheaders.h
@@ -42,7 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <newpluginapi.h>
#include <win2k.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Db3x_mmap/commonheaders.h b/plugins/Db3x_mmap/commonheaders.h
index 0d319af5a3..dd796f9b48 100644
--- a/plugins/Db3x_mmap/commonheaders.h
+++ b/plugins/Db3x_mmap/commonheaders.h
@@ -43,7 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <newpluginapi.h>
#include <win2k.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Db_autobackups/headers.h b/plugins/Db_autobackups/headers.h
index 93cc6fbc73..eab2ffc667 100644
--- a/plugins/Db_autobackups/headers.h
+++ b/plugins/Db_autobackups/headers.h
@@ -13,7 +13,6 @@
#include <m_system.h>
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_plugins.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_utils.h>
diff --git a/plugins/Dbx_mmap_SA/commonheaders.h b/plugins/Dbx_mmap_SA/commonheaders.h
index b4c913a694..cfa7ff2d2e 100644
--- a/plugins/Dbx_mmap_SA/commonheaders.h
+++ b/plugins/Dbx_mmap_SA/commonheaders.h
@@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//miranda headers
#include <newpluginapi.h>
#include <win2k.h>
-#include <m_plugins.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/plugins/Dbx_tree/Interface.h b/plugins/Dbx_tree/Interface.h
index dac5894b7d..0f2093d3a4 100644
--- a/plugins/Dbx_tree/Interface.h
+++ b/plugins/Dbx_tree/Interface.h
@@ -27,7 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MIRANDA_VER 0x0A00
#include <windows.h>
#include "newpluginapi.h"
-#include "m_plugins.h"
#include "m_system.h"
#include "m_utils.h"
#include "win2k.h"
diff --git a/plugins/ModernOpt/commonheaders.h b/plugins/ModernOpt/commonheaders.h
index d2d5ed8b86..2d133a802e 100644
--- a/plugins/ModernOpt/commonheaders.h
+++ b/plugins/ModernOpt/commonheaders.h
@@ -61,7 +61,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protosvc.h>
#include <m_protomod.h>
#include <m_protocols.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/plugins/NewAwaySysMod/Common.h b/plugins/NewAwaySysMod/Common.h
index 5d687492fa..808347598b 100644
--- a/plugins/NewAwaySysMod/Common.h
+++ b/plugins/NewAwaySysMod/Common.h
@@ -48,7 +48,6 @@
#include "m_options.h"
#include "..\..\protocols\IcqOscarJ\icq_constants.h"
#include "m_skin.h"
-#include "m_plugins.h"
#include "m_awaymsg.h"
#include "m_utils.h"
#include "m_system_cpp.h"
diff --git a/plugins/NewXstatusNotify/common.h b/plugins/NewXstatusNotify/common.h
index 3c805ad8c3..3cc765af4d 100644
--- a/plugins/NewXstatusNotify/common.h
+++ b/plugins/NewXstatusNotify/common.h
@@ -61,7 +61,6 @@
#include "m_langpack.h"
#include "m_message.h"
#include "m_options.h"
-#include "m_plugins.h"
#include "m_popup.h"
#include "m_protosvc.h"
#include "m_skin.h"
diff --git a/plugins/Popup/src/headers.h b/plugins/Popup/src/headers.h
index 09f505504b..3b892576b9 100644
--- a/plugins/Popup/src/headers.h
+++ b/plugins/Popup/src/headers.h
@@ -95,7 +95,6 @@ Last change by : $Author: Merlin_de $
#include <newpluginapi.h>
#include <win2k.h>
#include <m_system.h>
- #include <m_plugins.h>
#include <m_clui.h>
#include <m_clist.h>
#include <m_options.h>
diff --git a/plugins/QuickMessages/quickmessages.h b/plugins/QuickMessages/quickmessages.h
index 1e9a3d9761..f236b4175f 100644
--- a/plugins/QuickMessages/quickmessages.h
+++ b/plugins/QuickMessages/quickmessages.h
@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <Richedit.h>
#define MIRANDA_VER 0x0A00
-#include "m_plugins.h"
#include "newpluginapi.h"
#include "m_utils.h"
#include "m_system.h"
diff --git a/plugins/SecureIM/commonheaders.h b/plugins/SecureIM/commonheaders.h
index cc12efdaa0..c848d43484 100644
--- a/plugins/SecureIM/commonheaders.h
+++ b/plugins/SecureIM/commonheaders.h
@@ -75,7 +75,6 @@
// Miranda API
#include "newpluginapi.h"
#include "m_stdhdr.h"
-#include "m_plugins.h"
#include "m_system.h"
#include "m_database.h"
#include "m_protomod.h"
diff --git a/plugins/Utils/templates.cpp b/plugins/Utils/templates.cpp
index 11a81d856e..0fbb4715f8 100644
--- a/plugins/Utils/templates.cpp
+++ b/plugins/Utils/templates.cpp
@@ -10,7 +10,6 @@ extern "C"
#include <time.h>
#include <win2k.h>
#include <m_system.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_langpack.h>
#include <m_database.h>
@@ -88,14 +87,14 @@ int CopyData(StringHelper *str, const char *text, size_t len)
memmove(&str->text[str->used], text, sizeof(char) * len);
str->used += len;
str->text[str->used] = '\0';
-
+
return 0;
}
-char * ParseText(const char *text,
- const char **variables, size_t variablesSize,
- const char **data, size_t dataSize)
+char * ParseText(const char *text,
+ const char **variables, size_t variablesSize,
+ const char **data, size_t dataSize)
{
size_t length = strlen(text);
size_t nextPos = 0;
@@ -211,14 +210,14 @@ int CopyDataW(StringHelperW *str, const WCHAR *text, size_t len)
memmove(&str->text[str->used], text, sizeof(WCHAR) * len);
str->used += len;
str->text[str->used] = '\0';
-
+
return 0;
}
-WCHAR * ParseTextW(const WCHAR *text,
- const WCHAR **variables, size_t variablesSize,
- const WCHAR **data, size_t dataSize)
+WCHAR * ParseTextW(const WCHAR *text,
+ const WCHAR **variables, size_t variablesSize,
+ const WCHAR **data, size_t dataSize)
{
size_t length = lstrlenW(text);
size_t nextPos = 0;
@@ -356,13 +355,13 @@ WCHAR *MNotifyGetWParsedTemplate(HANDLE notifyORtype, const char *name, const WC
BOOL MNotifyHasVariables(HANDLE notifyORtype)
{
- return MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_STRS, NULL) != NULL &&
+ return MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_STRS, NULL) != NULL &&
MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_SIZE, 0) != 0;
}
BOOL MNotifyHasWVariables(HANDLE notifyORtype)
{
- return MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_STRSW, NULL) != NULL &&
+ return MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_STRSW, NULL) != NULL &&
MNotifyGetDWord(notifyORtype, NFOPT_VARIABLES_SIZE, 0) != 0;
}
@@ -472,5 +471,3 @@ void MNotifyShowWVariables(HANDLE notifyORtype)
mir_free(ret.text);
}
-
-
diff --git a/plugins/helpers/commonheaders.h b/plugins/helpers/commonheaders.h
index 354d719864..a7ee53e754 100644
--- a/plugins/helpers/commonheaders.h
+++ b/plugins/helpers/commonheaders.h
@@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protosvc.h>
#include <m_protomod.h>
#include <m_protocols.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_utils.h>
#include <m_skin.h>
diff --git a/plugins/mTextControl/src/headers.h b/plugins/mTextControl/src/headers.h
index e1a1388afc..aaa25dfd07 100644
--- a/plugins/mTextControl/src/headers.h
+++ b/plugins/mTextControl/src/headers.h
@@ -47,7 +47,6 @@ extern "C" {
#include <newpluginapi.h>
#include <win2k.h>
#include <m_system.h>
- #include <m_plugins.h>
#include <m_clui.h>
#include <m_clist.h>
#include <m_options.h>
diff --git a/protocols/Gadu-Gadu/gg.h b/protocols/Gadu-Gadu/gg.h
index 2b1157092b..742f06b093 100644
--- a/protocols/Gadu-Gadu/gg.h
+++ b/protocols/Gadu-Gadu/gg.h
@@ -60,7 +60,6 @@
#include <m_protosvc.h>
#include <m_protoint.h>
#include <m_langpack.h>
-#include <m_plugins.h>
#include <m_skin.h>
#include <m_utils.h>
#include <m_ignore.h>
diff --git a/src/core/commonheaders.h b/src/core/commonheaders.h
index ca35d2ae4b..13287d770a 100644
--- a/src/core/commonheaders.h
+++ b/src/core/commonheaders.h
@@ -73,7 +73,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdauth/commonheaders.h b/src/core/stdauth/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stdauth/commonheaders.h
+++ b/src/core/stdauth/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdautoaway/commonheaders.h b/src/core/stdautoaway/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stdautoaway/commonheaders.h
+++ b/src/core/stdautoaway/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdaway/commonheaders.h b/src/core/stdaway/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stdaway/commonheaders.h
+++ b/src/core/stdaway/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdemail/commonheaders.h b/src/core/stdemail/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stdemail/commonheaders.h
+++ b/src/core/stdemail/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdfile/commonheaders.h b/src/core/stdfile/commonheaders.h
index b1593709c8..2f6e994b0e 100644
--- a/src/core/stdfile/commonheaders.h
+++ b/src/core/stdfile/commonheaders.h
@@ -68,7 +68,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdhelp/commonheaders.h b/src/core/stdhelp/commonheaders.h
index af1784080f..06417c2587 100644
--- a/src/core/stdhelp/commonheaders.h
+++ b/src/core/stdhelp/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdidle/commonheaders.h b/src/core/stdidle/commonheaders.h
index e63c553522..b6819e579e 100644
--- a/src/core/stdidle/commonheaders.h
+++ b/src/core/stdidle/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stduihist/commonheaders.h b/src/core/stduihist/commonheaders.h
index af1784080f..06417c2587 100644
--- a/src/core/stduihist/commonheaders.h
+++ b/src/core/stduihist/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stdurl/commonheaders.h b/src/core/stdurl/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stdurl/commonheaders.h
+++ b/src/core/stdurl/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stduserinfo/commonheaders.h b/src/core/stduserinfo/commonheaders.h
index b3fdcb29f3..abc805934e 100644
--- a/src/core/stduserinfo/commonheaders.h
+++ b/src/core/stduserinfo/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/core/stduseronline/commonheaders.h b/src/core/stduseronline/commonheaders.h
index c9ed5a65d2..f6f9aebff7 100644
--- a/src/core/stduseronline/commonheaders.h
+++ b/src/core/stduseronline/commonheaders.h
@@ -66,7 +66,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protocols.h>
#include <m_protoint.h>
-#include <m_plugins.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp
index 2ff0fabe06..ec9ff1160a 100644
--- a/src/mir_core/modules.cpp
+++ b/src/mir_core/modules.cpp
@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "commonheaders.h"
-#include <m_plugins.h>
// list of hooks
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index 2a8acd4a37..ec25931527 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -414,10 +414,9 @@ int makeDatabase(TCHAR *profile, DATABASELINK * link, HWND hwndDlg)
}
// enumerate all plugins that had valid DatabasePluginInfo()
-static int FindDbPluginForProfile(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int FindDbPluginForProfile(const TCHAR*, DATABASELINK *dblink, LPARAM lParam)
{
TCHAR* tszProfile = (TCHAR*)lParam;
-
int res = DBPE_CONT;
if (dblink && dblink->cbSize == sizeof(DATABASELINK)) {
char* szProfile = makeFileName(tszProfile);
@@ -450,12 +449,11 @@ static int FindDbPluginForProfile(const char*, DATABASELINK * dblink, LPARAM lPa
}
// enumerate all plugins that had valid DatabasePluginInfo()
-static int FindDbPluginAutoCreate(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int FindDbPluginAutoCreate(const TCHAR* ptszProfile, DATABASELINK * dblink, LPARAM lParam)
{
- TCHAR* tszProfile = (TCHAR*)lParam;
-
int res = DBPE_CONT;
if (dblink && dblink->cbSize == sizeof(DATABASELINK)) {
+ TCHAR* tszProfile = NEWTSTR_ALLOCA(ptszProfile);
CreatePathToFileT(tszProfile);
int err;
@@ -519,21 +517,18 @@ int LoadDatabaseModule(void)
if ( !getProfile(szProfile, SIZEOF(szProfile)))
return 1;
- PLUGIN_DB_ENUM dbe;
- dbe.cbSize = sizeof(PLUGIN_DB_ENUM);
- dbe.lParam = (LPARAM)szProfile;
-
+ pfnDbEnumCallback pFunc;
if (_taccess(szProfile, 0) && shouldAutoCreate(szProfile))
- dbe.pfnEnumCallback = (int(*) (const char*, void*, LPARAM))FindDbPluginAutoCreate;
+ pFunc = FindDbPluginAutoCreate;
else
- dbe.pfnEnumCallback = (int(*) (const char*, void*, LPARAM))FindDbPluginForProfile;
+ pFunc = FindDbPluginForProfile;
// find a driver to support the given profile
bool retry;
int rc;
do {
retry = false;
- rc = CallService(MS_PLUGINS_ENUMDBPLUGINS, 0, (LPARAM)&dbe);
+ rc = enumDbPlugins(pFunc, (LPARAM)szProfile);
switch (rc) {
case -1: {
// no plugins at all
@@ -560,7 +555,8 @@ int LoadDatabaseModule(void)
}
break;
}
- } while (retry);
+ }
+ while (retry);
return (rc != 0);
}
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index 558646e510..63e6cd1c4d 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -115,7 +115,7 @@ static LRESULT CALLBACK ProfileNameValidate(HWND edit, UINT msg, WPARAM wParam,
return CallWindowProc((WNDPROC)GetWindowLongPtr(edit, GWLP_USERDATA), edit, msg, wParam, lParam);
}
-static int FindDbProviders(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int FindDbProviders(const TCHAR* tszProfileName, DATABASELINK *dblink, LPARAM lParam)
{
HWND hwndDlg = (HWND)lParam;
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_PROFILEDRIVERS);
@@ -141,12 +141,8 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
dat = (struct DlgProfData *)lParam;
{
// fill in the db plugins present
- PLUGIN_DB_ENUM dbe;
- dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))FindDbProviders;
- dbe.lParam = (LPARAM)hwndDlg;
- if (CallService(MS_PLUGINS_ENUMDBPLUGINS, 0, (LPARAM)&dbe) == -1) {
- // no plugins?!
+ if (enumDbPlugins(FindDbProviders, (LPARAM)hwndDlg) == -1) {
+ // what, no plugins?!
EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILEDRIVERS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILENAME), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_NODBDRIVERS), TRUE);
@@ -222,11 +218,11 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
return FALSE;
}
-static int DetectDbProvider(const char*, DATABASELINK * dblink, LPARAM lParam)
+static int DetectDbProvider(const TCHAR*, DATABASELINK * dblink, LPARAM lParam)
{
int error;
-char* fullpath = makeFileName((TCHAR*)lParam);
+ char* fullpath = makeFileName((TCHAR*)lParam);
int ret = dblink->grokHeader(fullpath, &error);
mir_free(fullpath);
@@ -287,18 +283,14 @@ BOOL EnumProfilesForList(TCHAR *fullpath, TCHAR *profile, LPARAM lParam)
SendMessage(hwndList, LVM_SETITEMTEXT, iItem, (LPARAM)&item);
if (bFileExists) {
- PLUGIN_DB_ENUM dbe;
TCHAR szPath[MAX_PATH];
+ _tcscpy(szPath, fullpath);
LVITEM item2;
item2.mask = LVIF_TEXT;
item2.iItem = iItem;
- dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))DetectDbProvider;
- dbe.lParam = (LPARAM)szPath;
- _tcscpy(szPath, fullpath);
- if (CallService(MS_PLUGINS_ENUMDBPLUGINS, 0, (LPARAM)&dbe) == 1) {
+ if ( enumDbPlugins(DetectDbProvider, (LPARAM)szPath) == 1) {
if (bFileLocked) {
// file locked
item2.pszText = TranslateT("<In Use>");
diff --git a/src/modules/database/profilemanager.h b/src/modules/database/profilemanager.h
index 416403f057..64e4960fdc 100644
--- a/src/modules/database/profilemanager.h
+++ b/src/modules/database/profilemanager.h
@@ -21,13 +21,14 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-typedef struct {
+struct PROFILEMANAGERDATA
+{
TCHAR *szProfile; // in/out
TCHAR *szProfileDir; // in/out
BOOL noProfiles; // in
BOOL newProfile; // out
- DATABASELINK * dblink; // out
-} PROFILEMANAGERDATA;
+ DATABASELINK *dblink; // out
+};
int InitUtils(void);
@@ -41,3 +42,14 @@ bool shouldAutoCreate(TCHAR *szProfile);
extern TCHAR g_profileDir[MAX_PATH];
extern TCHAR g_profileName[MAX_PATH];
+
+///////////////////////////////////////////////////////////////////////////////
+// former m_plugins.h
+
+#define DBPE_DONE 1
+#define DBPE_CONT 0
+#define DBPE_HALT (-1)
+
+typedef int (*pfnDbEnumCallback) (const TCHAR *pluginname, DATABASELINK* link, LPARAM lParam);
+
+int enumDbPlugins(pfnDbEnumCallback pFunc, LPARAM lParam);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index d890de5157..083338614d 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -21,7 +21,9 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "..\..\core\commonheaders.h"
+
#include "plugins.h"
+#include "..\database\profilemanager.h"
extern bool bModulesLoadedFired;
@@ -405,16 +407,17 @@ void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam)
}
// this is called by the db module to return all DBs plugins, then when it finds the one it likes the others are unloaded
-static INT_PTR PluginsEnum(WPARAM, LPARAM lParam)
+int enumDbPlugins(pfnDbEnumCallback pFunc, LPARAM lParam)
{
- PLUGIN_DB_ENUM * de = (PLUGIN_DB_ENUM *) lParam;
- pluginEntry * x = pluginListDb;
- if (de == NULL || de->cbSize != sizeof(PLUGIN_DB_ENUM) || de->pfnEnumCallback == NULL) return 1;
+ pluginEntry *x = pluginListDb;
+ if (pFunc == NULL)
+ return 1;
+
while (x != NULL) {
- int rc = de->pfnEnumCallback(StrConvA(x->pluginname), x->bpi.dblink, de->lParam);
+ int rc = pFunc(x->pluginname, x->bpi.dblink, lParam);
if (rc == DBPE_DONE) {
// this db has been picked, get rid of all the others
- pluginEntry * y = pluginListDb, * n;
+ pluginEntry *y = pluginListDb, *n;
while (y != NULL) {
n = y->nextclass;
if (x != y)
@@ -823,8 +826,6 @@ int LoadNewPluginsModuleInfos(void)
hPluginListHeap = HeapCreate(HEAP_NO_SERIALIZE, 0, 0);
mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
- CreateServiceFunction(MS_PLUGINS_ENUMDBPLUGINS, PluginsEnum);
-
// remember where the mirandaboot.ini goes
PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini, NULL);
// look for all *.dll's