summaryrefslogtreecommitdiff
path: root/src/modules/plugins/plugins.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-03 21:47:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-03 21:47:03 +0000
commite412759d7e551e3fc4dc4be6e1fae1cd4f308868 (patch)
tree00ed12238ba8b3735ddf95cf9e79c48d7c411c78 /src/modules/plugins/plugins.h
parent0f95cbb4a9f1c9a613dccb9d53f5ddb50a8cadd7 (diff)
no more PLUGININFOEX::replacesDefaultModule, that old & nasty clutch
since now all Myranda plugins are binary incompatible with Miranda's git-svn-id: http://svn.miranda-ng.org/main/trunk@743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins/plugins.h')
-rw-r--r--src/modules/plugins/plugins.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/modules/plugins/plugins.h b/src/modules/plugins/plugins.h
index 686f0e0963..7a3a082f3e 100644
--- a/src/modules/plugins/plugins.h
+++ b/src/modules/plugins/plugins.h
@@ -20,7 +20,9 @@ typedef int (__cdecl * CList_Initialise) (void);
// Interface support
typedef MUUID * (__cdecl * Miranda_Plugin_Interfaces) (void);
-typedef struct { // can all be NULL
+// can all be NULL
+struct BASIC_PLUGIN_INFO
+{
HINSTANCE hInst;
Miranda_Plugin_Load Load;
Miranda_Plugin_Unload Unload;
@@ -30,7 +32,7 @@ typedef struct { // can all be NULL
CList_Initialise clistlink;
PLUGININFOEX * pluginInfo; // must be freed if hInst == NULL then its a copy
DATABASELINK * dblink; // only valid during module being in memory
-} BASIC_PLUGIN_INFO;
+};
#define PCLASS_FAILED 0x1 // not a valid plugin, or API is invalid, pluginname is valid
#define PCLASS_BASICAPI 0x2 // has Load, Unload, MirandaPluginInfo() -> PLUGININFO seems valid, this dll is in memory.
@@ -60,6 +62,8 @@ void UnloadPluginOptions();
int isPluginOnWhiteList(const TCHAR* pluginname);
void SetPluginOnWhiteList(const TCHAR* pluginname, int allow);
+int getDefaultPluginIdx(const MUUID& muuid);
+bool hasMuuid(const BASIC_PLUGIN_INFO&, const MUUID&);
int equalUUID(const MUUID& u1, const MUUID& u2);
int checkAPI(TCHAR* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion, int checkTypeAPI);
pluginEntry* OpenPlugin(TCHAR* tszFileName, TCHAR* path);
@@ -68,3 +72,11 @@ void Plugin_Uninit(pluginEntry* p, bool bDynamic=false);
typedef BOOL (*SCAN_PLUGINS_CALLBACK) (WIN32_FIND_DATA * fd, TCHAR * path, WPARAM wParam, LPARAM lParam);
void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam);
+
+struct MuuidReplacement
+{
+ MUUID uuid; // default interface plugin
+ pluginEntry* pImpl; // replacement plugin
+};
+
+extern MuuidReplacement pluginDefault[];