From abf8cd813bb0ac4f4f5451d2af929279d816abac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 23:04:26 +0300 Subject: core changes: - PROTOCOLDESCRIPTOR's implementation hidden inside mir_app; - Proto_RegisterModule now doesn't need a PROTOCOLDESCRIPTOR structure; - PROTOTYPE_PROTOWITHACCS type added for protos that work with accounts --- plugins/GmailNotifier/src/main.cpp | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'plugins/GmailNotifier/src/main.cpp') diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 945ab5984d..c3add00af0 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -11,7 +11,6 @@ There is no warranty. #include "version.h" CLIST_INTERFACE *pcli; -HINSTANCE g_hInstance; int hLangpack; UINT hTimer; HANDLE hMirandaStarted, hOptionsInitial; @@ -37,6 +36,19 @@ static PLUGININFOEX pluginInfoEx = { 0x243955e0, 0x75d9, 0x4cc3, { 0x9b, 0x28, 0x6f, 0x9c, 0x5a, 0xf4, 0x53, 0x2d } } }; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CMPlugin g_plugin; + +extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; + +///////////////////////////////////////////////////////////////////////////////////////// + INT_PTR GetCaps(WPARAM wParam, LPARAM) { if (wParam == PFLAGNUM_2 && opt.ShowCustomIcon) @@ -75,11 +87,6 @@ static int OnMirandaStart(WPARAM, LPARAM) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - extern "C" int __declspec(dllexport) Load() { mir_getLP(&pluginInfoEx); @@ -146,6 +153,8 @@ extern "C" int __declspec(dllexport) Load() return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { if (hTimer) @@ -161,17 +170,3 @@ extern "C" int __declspec(dllexport) Unload(void) UnhookEvent(hOptionsInitial); return 0; } - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CMPlugin : public PLUGIN -{ - CMPlugin() : - PLUGIN(MODULE_NAME) - { - RegisterProtocol(PROTOTYPE_VIRTUAL); - } -} - g_plugin; - -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; -- cgit v1.2.3