From 3f26a39c43faef04ea316ecc98d8d195982bb303 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jun 2012 20:41:50 +0000 Subject: final wipeout of all interfaces git-svn-id: http://svn.miranda-ng.org/main/trunk@659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 41 ++++++-------------------------------- src/modules/plugins/plugins.h | 4 ++-- 2 files changed, 8 insertions(+), 37 deletions(-) (limited to 'src/modules/plugins') diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index dcef628238..040a870cca 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -47,7 +47,6 @@ const int pluginBannedListCount = SIZEOF(pluginBannedList); static BOOL bModuleInitialized = FALSE; -PLUGINLINK pluginCoreLink; TCHAR mirandabootini[MAX_PATH]; static DWORD mirandaVersion; static int serviceModeIdx = -1; @@ -182,8 +181,7 @@ int checkAPI(TCHAR* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion, int ch // fontservice plugin is built into the core now TCHAR* p = _tcsrchr(plugin, '\\'); if (p != NULL && ++p) { - int i; - for (i = 0; i < SIZEOF(modulesToSkip); i++) + for (int i = 0; i < SIZEOF(modulesToSkip); i++) if (lstrcmpi(p, modulesToSkip[i]) == 0) return 0; } @@ -494,7 +492,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) } RegisterModule(p->bpi.hInst); - if (bpi.Load(&pluginCoreLink) != 0) + if (bpi.Load() != 0) return false; p->pclass |= PCLASS_LOADED; @@ -520,7 +518,7 @@ static pluginEntry* getCListModule(TCHAR * exe, TCHAR * slice, int useWhiteList) p->bpi = bpi; p->pclass |= PCLASS_LAST | PCLASS_OK | PCLASS_BASICAPI; RegisterModule(p->bpi.hInst); - if (bpi.clistlink(&pluginCoreLink) == 0) { + if (bpi.clistlink() == 0) { p->bpi = bpi; p->pclass |= PCLASS_LOADED; return p; @@ -588,7 +586,7 @@ int LoadServiceModePlugin(void) while (p != NULL) { if (serviceModeIdx == i++) { - if (p->bpi.Load(&pluginCoreLink) == 0) { + if (p->bpi.Load() == 0) { p->pclass |= PCLASS_LOADED; if (CallService(MS_SERVICEMODE_LAUNCH, 0, 0) != CALLSERVICE_NOTFOUND) return 1; @@ -641,7 +639,7 @@ int LoadNewPluginsModule(void) // if Crash Dumper is present, load it to provide Crash Reports if (pluginList_crshdmp != NULL && isPluginOnWhiteList(pluginList_crshdmp->pluginname)) { - if (pluginList_crshdmp->bpi.Load(&pluginCoreLink) == 0) + if (pluginList_crshdmp->bpi.Load() == 0) pluginList_crshdmp->pclass |= PCLASS_LOADED | PCLASS_LAST; else Plugin_Uninit(pluginList_crshdmp); @@ -654,7 +652,7 @@ int LoadNewPluginsModule(void) if (checkAPI(exe, &bpi, mirandaVersion, CHECKAPI_NONE)) { pluginList_freeimg->bpi = bpi; pluginList_freeimg->pclass |= PCLASS_OK | PCLASS_BASICAPI; - if (bpi.Load(&pluginCoreLink) == 0) + if (bpi.Load() == 0) pluginList_freeimg->pclass |= PCLASS_LOADED; else Plugin_Uninit(pluginList_freeimg); @@ -714,33 +712,6 @@ int LoadNewPluginsModuleInfos(void) CreateServiceFunction(MS_PLUGINS_ENUMDBPLUGINS, PluginsEnum); CreateServiceFunction(MS_PLUGINS_GETDISABLEDEFAULTARRAY, PluginsGetDefaultArray); - // make sure plugins can get internal core APIs - pluginCoreLink.CallService = CallService; - pluginCoreLink.ServiceExists = ServiceExists; - pluginCoreLink.CreateServiceFunction = CreateServiceFunction; - pluginCoreLink.CreateServiceFunctionParam = CreateServiceFunctionParam; - pluginCoreLink.CreateServiceFunctionObj = CreateServiceFunctionObj; - pluginCoreLink.CreateServiceFunctionObjParam = CreateServiceFunctionObjParam; - pluginCoreLink.CreateTransientServiceFunction = CreateServiceFunction; - pluginCoreLink.DestroyServiceFunction = DestroyServiceFunction; - pluginCoreLink.CreateHookableEvent = CreateHookableEvent; - pluginCoreLink.DestroyHookableEvent = DestroyHookableEvent; - pluginCoreLink.HookEvent = HookEvent; - pluginCoreLink.HookEventParam = HookEventParam; - pluginCoreLink.HookEventObj = HookEventObj; - pluginCoreLink.HookEventObjParam = HookEventObjParam; - pluginCoreLink.HookEventMessage = HookEventMessage; - pluginCoreLink.UnhookEvent = UnhookEvent; - pluginCoreLink.NotifyEventHooks = NotifyEventHooks; - pluginCoreLink.SetHookDefaultForHookableEvent = SetHookDefaultForHookableEvent; - pluginCoreLink.CallServiceSync = CallServiceSync; - pluginCoreLink.CallFunctionAsync = CallFunctionAsync; - pluginCoreLink.NotifyEventHooksDirect = CallHookSubscribers; - pluginCoreLink.CallProtoService = CallProtoService; - pluginCoreLink.CallContactService = CallContactService; - pluginCoreLink.KillObjectServices = KillObjectServices; - pluginCoreLink.KillObjectEventHooks = KillObjectEventHooks; - // remember where the mirandaboot.ini goes PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini, NULL); // look for all *.dll's diff --git a/src/modules/plugins/plugins.h b/src/modules/plugins/plugins.h index aa0251ab97..686f0e0963 100644 --- a/src/modules/plugins/plugins.h +++ b/src/modules/plugins/plugins.h @@ -9,14 +9,14 @@ #define DEFMOD_REMOVED_PROTOCOLNETLIB 22 // basic export prototypes -typedef int (__cdecl * Miranda_Plugin_Load) (PLUGINLINK *); +typedef int (__cdecl * Miranda_Plugin_Load) (void); typedef int (__cdecl * Miranda_Plugin_Unload) (void); // version control typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_InfoEx) (DWORD mirandaVersion); // prototype for databases typedef DATABASELINK * (__cdecl * Database_Plugin_Info) (void * reserved); // prototype for clists -typedef int (__cdecl * CList_Initialise) (PLUGINLINK *); +typedef int (__cdecl * CList_Initialise) (void); // Interface support typedef MUUID * (__cdecl * Miranda_Plugin_Interfaces) (void); -- cgit v1.2.3