summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
commita905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch)
tree87a60dadfbf9fd8d916ea9100c26b6e314293242 /protocols/Steam
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/main.cpp22
-rw-r--r--protocols/Steam/src/stdafx.h1
2 files changed, 14 insertions, 9 deletions
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp
index eefe4967c6..57632115d9 100644
--- a/protocols/Steam/src/main.cpp
+++ b/protocols/Steam/src/main.cpp
@@ -31,20 +31,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
return &pluginInfo;
}
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST};
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = "STEAM";
- pd.type = PROTOTYPE_PROTOCOL;
- pd.fnInit = (pfnInitProto)CSteamProto::InitAccount;
- pd.fnUninit = (pfnUninitProto)CSteamProto::UninitAccount;
- Proto_RegisterModule(&pd);
-
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
@@ -60,3 +52,15 @@ extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase("STEAM")
+ {
+ RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CSteamProto::InitAccount, (pfnUninitProto)CSteamProto::UninitAccount);
+ }
+}
+ g_plugin;
diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h
index 8e1320dd22..744cbb7f6d 100644
--- a/protocols/Steam/src/stdafx.h
+++ b/protocols/Steam/src/stdafx.h
@@ -35,6 +35,7 @@
#include <m_gui.h>
#include <m_http.h>
#include <m_system.h>
+#include <m_plugin.h>
#include "resource.h"
#include "version.h"