summaryrefslogtreecommitdiff
path: root/protocols/Dummy
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 16:34:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 16:34:30 +0300
commit81ce57622c3166830b23eae534dacc6b008c659d (patch)
tree6d6ac74667f733a20b94fa27cc01c2f45688c533 /protocols/Dummy
parentc2bb7727483b9b5620e8cc0ce6adae35ee78d0a4 (diff)
common protocol instance management code went into template
Diffstat (limited to 'protocols/Dummy')
-rw-r--r--protocols/Dummy/src/main.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index da1fccd10a..906ee1182a 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -81,24 +81,10 @@ extern "C" int __declspec(dllexport) Unload(void)
/////////////////////////////////////////////////////////////////////////////////////////
-static PROTO_INTERFACE* dummyProtoInit(const char* pszProtoName, const wchar_t *tszUserName)
-{
- CDummyProto *ppro = new CDummyProto(pszProtoName, tszUserName);
- return ppro;
-}
-
-static int dummyProtoUninit(PROTO_INTERFACE *ppro)
-{
- delete (CDummyProto*)ppro;
- return 0;
-}
-
-struct CMPlugin : public CMPluginBase
+struct CMPlugin : public ACCPROTOPLUGIN<CDummyProto>
{
CMPlugin() :
- CMPluginBase("Dummy")
- {
- RegisterProtocol(PROTOTYPE_PROTOCOL, dummyProtoInit, dummyProtoUninit);
- }
+ ACCPROTOPLUGIN<CDummyProto>("Dummy")
+ {}
}
g_plugin;