From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- protocols/SkypeWeb/src/main.cpp | 22 +++++++++++++--------- protocols/SkypeWeb/src/stdafx.h | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'protocols/SkypeWeb/src') 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 . #include #include #include +#include struct CSkypeProto; -- cgit v1.2.3