From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- protocols/Sametime/src/sametime.cpp | 12 +++++++++--- protocols/Sametime/src/sametime.h | 2 -- protocols/Sametime/src/sametime_proto.h | 6 +----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'protocols/Sametime/src') diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 751bd183d0..78d48d161b 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -6,7 +6,7 @@ int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -20,9 +20,15 @@ PLUGININFOEX pluginInfo = { 0xf1b0ba1b, 0xc91, 0x4313, { 0x85, 0xeb, 0x22, 0x50, 0x69, 0xd4, 0x4d, 0x1 } } }; +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Sametime", pluginInfoEx) +{ + SetUniqueId("stid"); +} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -232,7 +238,7 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus) extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); return 0; } diff --git a/protocols/Sametime/src/sametime.h b/protocols/Sametime/src/sametime.h index ccf1c920e8..ca84829906 100644 --- a/protocols/Sametime/src/sametime.h +++ b/protocols/Sametime/src/sametime.h @@ -112,8 +112,6 @@ typedef struct FileTransferClientData_tag { // Global variables struct CSametimeProto; -extern PLUGININFOEX pluginInfo; - #include "sametime_proto.h" diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h index 242f68cf6c..bb043f5ff9 100644 --- a/protocols/Sametime/src/sametime_proto.h +++ b/protocols/Sametime/src/sametime_proto.h @@ -193,11 +193,7 @@ struct CSametimeProto : public PROTO struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("Sametime") - { - SetUniqueId("stid"); - } + CMPlugin(); }; struct SendAnnouncementFunc_arg -- cgit v1.2.3