diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-28 14:29:31 +0300 |
commit | a905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch) | |
tree | 87a60dadfbf9fd8d916ea9100c26b6e314293242 /protocols/SkypeWeb/src | |
parent | d75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff) |
all protocols rewritten to CMPluginBase
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/main.cpp | 22 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/stdafx.h | 1 |
2 files changed, 14 insertions, 9 deletions
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 1b512abb87..678d2003a1 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -59,14 +59,6 @@ extern "C" int __declspec(dllexport) Load(void) pci = Chat_GetInterface();
Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer));
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = "SKYPE";
- pd.type = PROTOTYPE_PROTOCOL;
- pd.fnInit = (pfnInitProto)CSkypeProto::InitAccount;
- pd.fnUninit = (pfnUninitProto)CSkypeProto::UninitAccount;
- Proto_RegisterModule(&pd);
-
CSkypeProto::InitIcons();
CSkypeProto::InitMenus();
CSkypeProto::InitLanguages();
@@ -98,4 +90,16 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) AssocMgr_AddNewUrlTypeT("skype:", TranslateT("Skype Link Protocol"), g_hInstance, IDI_SKYPE, MODULE "/ParseUri", 0);
}
return 0;
-}
\ No newline at end of file +}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase("SKYPE")
+ {
+ RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CSkypeProto::InitAccount, (pfnUninitProto)CSkypeProto::UninitAccount);
+ }
+}
+ g_plugin;
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h index 94abd8398d..2ad4940055 100644 --- a/protocols/SkypeWeb/src/stdafx.h +++ b/protocols/SkypeWeb/src/stdafx.h @@ -54,6 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_xml.h>
#include <m_assocmgr.h>
#include <m_file.h>
+#include <m_plugin.h>
struct CSkypeProto;
|