summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/NewsAggregator.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
commita905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch)
tree87a60dadfbf9fd8d916ea9100c26b6e314293242 /plugins/NewsAggregator/Src/NewsAggregator.cpp
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/NewsAggregator/Src/NewsAggregator.cpp')
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp19
1 files changed, 12 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;