diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-28 16:34:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-28 16:34:30 +0300 |
commit | 81ce57622c3166830b23eae534dacc6b008c659d (patch) | |
tree | 6d6ac74667f733a20b94fa27cc01c2f45688c533 /protocols/VKontakte | |
parent | c2bb7727483b9b5620e8cc0ce6adae35ee78d0a4 (diff) |
common protocol instance management code went into template
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/main.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 1db46892eb..8516360ba0 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -73,24 +73,10 @@ extern "C" int __declspec(dllexport) Unload(void) /////////////////////////////////////////////////////////////////////////////////////////
-static PROTO_INTERFACE* protoInit(const char *pszProtoName, const wchar_t *wszUserName)
-{
- CVkProto *ppro = new CVkProto(pszProtoName, wszUserName);
- return ppro;
-}
-
-static int protoUninit(PROTO_INTERFACE *ppro)
-{
- delete (CVkProto*)ppro;
- return 0;
-}
-
-struct CMPlugin : public CMPluginBase
+struct CMPlugin : public ACCPROTOPLUGIN<CVkProto>
{
CMPlugin() :
- CMPluginBase("VKontakte")
- {
- RegisterProtocol(PROTOTYPE_PROTOCOL, protoInit, protoUninit);
- }
+ ACCPROTOPLUGIN<CVkProto>("VKontakte")
+ {}
}
g_plugin;
|