summaryrefslogtreecommitdiff
path: root/protocols/EmLanProto/src
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 /protocols/EmLanProto/src
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'protocols/EmLanProto/src')
-rw-r--r--protocols/EmLanProto/src/amdproto.cpp17
-rw-r--r--protocols/EmLanProto/src/stdafx.h1
2 files changed, 13 insertions, 5 deletions
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp
index 1bcc43a24d..366a508a84 100644
--- a/protocols/EmLanProto/src/amdproto.cpp
+++ b/protocols/EmLanProto/src/amdproto.cpp
@@ -332,11 +332,6 @@ extern "C" int __declspec(dllexport) __cdecl Load()
mir_getLP(&pluginInfo);
g_lan = new CMLan();
- PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
- pd.szName = PROTONAME;
- pd.type = PROTOTYPE_PROTOCOL;
- Proto_RegisterModule(&pd);
-
CreateProtoServiceFunction(PROTONAME, PS_GETCAPS, EMPGetCaps);
CreateProtoServiceFunction(PROTONAME, PS_GETNAME, EMPGetName);
CreateProtoServiceFunction(PROTONAME, PS_LOADICON, EMPLoadIcon);
@@ -367,3 +362,15 @@ extern "C" int __declspec(dllexport) __cdecl Unload()
delete g_lan;
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(PROTONAME)
+ {
+ RegisterProtocol(PROTOTYPE_PROTOCOL);
+ }
+}
+ g_plugin;
diff --git a/protocols/EmLanProto/src/stdafx.h b/protocols/EmLanProto/src/stdafx.h
index 8fefd8f2f8..d80030c4b1 100644
--- a/protocols/EmLanProto/src/stdafx.h
+++ b/protocols/EmLanProto/src/stdafx.h
@@ -16,6 +16,7 @@
#include <m_protosvc.h>
#include <m_database.h>
#include <m_langpack.h>
+#include <m_plugin.h>
#include "resource.h"
#include "version.h"