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 /include/m_plugin.h | |
parent | d75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff) |
all protocols rewritten to CMPluginBase
Diffstat (limited to 'include/m_plugin.h')
-rw-r--r-- | include/m_plugin.h | 16 |
1 files changed, 10 insertions, 6 deletions
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 <m_core.h> #include <m_database.h> +#include <m_protocols.h> -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 T> class PLUGIN : public CMPlugin +template<class T> class PLUGIN : public CMPluginBase { - typedef CMPlugin CSuper; + typedef CMPluginBase CSuper; protected: PLUGIN(const char *moduleName) |