From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- plugins/NewsAggregator/Src/NewsAggregator.cpp | 19 ++++++++++++------- plugins/NewsAggregator/Src/stdafx.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'plugins/NewsAggregator/Src') 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 #include #include +#include #include #include -- cgit v1.2.3