diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-18 23:04:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-18 23:04:26 +0300 |
commit | abf8cd813bb0ac4f4f5451d2af929279d816abac (patch) | |
tree | 4fb7451f2f99fac23a9f891c1aa9dc9fe6e0f8c6 /plugins/GmailNotifier/src/main.cpp | |
parent | 9ffe3c7ba4eb7011279e14ff1c5b5357bf874114 (diff) |
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
Diffstat (limited to 'plugins/GmailNotifier/src/main.cpp')
-rw-r--r-- | plugins/GmailNotifier/src/main.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
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>
-{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULE_NAME)
- {
- RegisterProtocol(PROTOTYPE_VIRTUAL);
- }
-}
- g_plugin;
-
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
|