diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
commit | a905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch) | |
tree | 87a60dadfbf9fd8d916ea9100c26b6e314293242 /plugins/NewsAggregator | |
parent | d75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff) |
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/NewsAggregator.cpp | 19 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/stdafx.h | 1 |
2 files changed, 13 insertions, 7 deletions
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index ab1ac2f830..421fe9666b 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -66,13 +66,6 @@ extern "C" __declspec(dllexport) int Load(void) hUpdateMutex = CreateMutex(nullptr, FALSE, nullptr);
- // register weather protocol
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = MODULE;
- pd.type = PROTOTYPE_VIRTUAL;
- Proto_RegisterModule(&pd);
-
CreateProtoServiceFunction(MODULE, PS_GETNAME, NewsAggrGetName);
CreateProtoServiceFunction(MODULE, PS_GETCAPS, NewsAggrGetCaps);
CreateProtoServiceFunction(MODULE, PS_SETSTATUS, NewsAggrSetStatus);
@@ -110,3 +103,15 @@ extern "C" __declspec(dllexport) int Unload(void) CloseHandle(hUpdateMutex);
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(MODULE)
+ {
+ RegisterProtocol(PROTOTYPE_VIRTUAL);
+ }
+}
+ g_plugin;
diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h index 0c5fa1436d..40fc6f7002 100644 --- a/plugins/NewsAggregator/Src/stdafx.h +++ b/plugins/NewsAggregator/Src/stdafx.h @@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA. #include <m_avatars.h>
#include <m_hotkeys.h>
#include <m_gui.h>
+#include <m_plugin.h>
#include <m_folders.h>
#include <m_toptoolbar.h>
|