diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /protocols/Twitter/src/main.cpp | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'protocols/Twitter/src/main.cpp')
-rw-r--r-- | protocols/Twitter/src/main.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index afe7e21ae7..15eaa69f1d 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -22,11 +22,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "proto.h"
#include "theme.h"
+CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
-
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -39,14 +41,16 @@ PLUGININFOEX pluginInfo = { { 0xbc09a71b, 0xb86e, 0x4d33, { 0xb1, 0x8d, 0x82, 0xd3, 0x4, 0x51, 0xdd, 0x3c } }
};
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
+CMPlugin::CMPlugin() :
+ ACCPROTOPLUGIN<TwitterProto>("Twitter", pluginInfoEx)
{
- return &pluginInfo;
+ SetUniqueId(TWITTER_KEY_UN);
}
-/////////////////////////////////////////////////////////////////////////////////////////
-
-CMPlugin g_plugin;
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
+{
+ return &pluginInfoEx;
+}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -57,7 +61,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
InitIcons();
|