summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/sametime.cpp
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/Sametime/src/sametime.cpp
parentc2bb7727483b9b5620e8cc0ce6adae35ee78d0a4 (diff)
common protocol instance management code went into template
Diffstat (limited to 'protocols/Sametime/src/sametime.cpp')
-rw-r--r--protocols/Sametime/src/sametime.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index faebb0d6c3..f66a1fdddc 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -16,6 +16,7 @@ PLUGININFOEX pluginInfo =
{ 0xf1b0ba1b, 0xc91, 0x4313, { 0x85, 0xeb, 0x22, 0x50, 0x69, 0xd4, 0x4d, 0x1 } } // {F1B0BA1B-0C91-4313-85EB-225069D44D01}
};
+CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
HINSTANCE hInst;
LIST<CSametimeProto> g_Instances(1, PtrKeySortT);
@@ -255,33 +256,5 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload()
{
- g_Instances.destroy();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static PROTO_INTERFACE* sametime_proto_init(const char* pszProtoName, const wchar_t* tszUserName)
-{
- CSametimeProto* proto = new CSametimeProto(pszProtoName, tszUserName);
- g_Instances.insert(proto);
- return proto;
-}
-
-static int sametime_proto_uninit(PROTO_INTERFACE* ppro)
-{
- CSametimeProto* proto = (CSametimeProto*)ppro;
- g_Instances.remove(proto);
- delete proto;
- return 0;
-}
-
-struct CMPlugin : public CMPluginBase
-{
- CMPlugin() :
- CMPluginBase("Sametime")
- {
- RegisterProtocol(PROTOTYPE_PROTOCOL, sametime_proto_init, sametime_proto_uninit);
- }
-}
- g_plugin;