summaryrefslogtreecommitdiff
path: root/include/m_plugin.h
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 /include/m_plugin.h
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'include/m_plugin.h')
-rw-r--r--include/m_plugin.h16
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)