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 --- include/m_plugin.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/m_plugin.h b/include/m_plugin.h index 5588f7c865..b54d64aea3 100644 --- a/include/m_plugin.h +++ b/include/m_plugin.h @@ -2,8 +2,9 @@ #include #include +#include -class MIR_APP_EXPORT CMPlugin +class MIR_APP_EXPORT CMPluginBase { void tryOpenLog(); @@ -11,8 +12,11 @@ protected: const char *m_szModuleName; HANDLE m_hLogger = nullptr; - CMPlugin(const char *moduleName); - ~CMPlugin(); + CMPluginBase(const char *moduleName); + ~CMPluginBase(); + + // pass one of PROTOTYPE_* constants as type + void RegisterProtocol(int type, pfnInitProto = nullptr, pfnUninitProto = nullptr); public: void debugLogA(LPCSTR szFormat, ...); @@ -145,14 +149,14 @@ public: } }; -extern CMPlugin g_plugin; +extern struct CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// // Basic class for plugins (not protocols) written in C++ -template class PLUGIN : public CMPlugin +template class PLUGIN : public CMPluginBase { - typedef CMPlugin CSuper; + typedef CMPluginBase CSuper; protected: PLUGIN(const char *moduleName) -- cgit v1.2.3