From abf8cd813bb0ac4f4f5451d2af929279d816abac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 23:04:26 +0300 Subject: core changes: - PROTOCOLDESCRIPTOR's implementation hidden inside mir_app; - Proto_RegisterModule now doesn't need a PROTOCOLDESCRIPTOR structure; - PROTOTYPE_PROTOWITHACCS type added for protos that work with accounts --- plugins/AVS/src/main.cpp | 2 +- plugins/CloudFile/src/Services/dropbox_service.cpp | 2 +- plugins/CloudFile/src/Services/google_service.cpp | 2 +- .../CloudFile/src/Services/microsoft_service.cpp | 2 +- plugins/CloudFile/src/Services/yandex_service.cpp | 2 +- plugins/CloudFile/src/services.cpp | 5 +--- plugins/CloudFile/src/stdafx.h | 1 - plugins/ConnectionNotify/src/stdafx.h | 1 - plugins/CrashDumper/src/dumper.cpp | 5 +++- plugins/CryptoPP/src/main.cpp | 6 +--- .../CyrTranslit/src/TransliterationProtocol.cpp | 6 +--- plugins/Exchange/src/stdafx.h | 1 - plugins/FileAsMessage/src/main.cpp | 6 +--- plugins/GmailNotifier/src/main.cpp | 35 ++++++++++------------ plugins/GmailNotifier/src/options.cpp | 2 +- plugins/GmailNotifier/src/stdafx.h | 11 +++++-- plugins/LotusNotify/src/stdafx.h | 1 - plugins/MirLua/src/main.cpp | 6 +--- plugins/MirLua/src/stdafx.h | 1 - plugins/MirOTR/src/dllmain.cpp | 6 +--- plugins/New_GPG/src/init.cpp | 6 +--- plugins/NewsAggregator/Src/stdafx.h | 1 - plugins/Non-IM Contact/src/stdafx.h | 1 - plugins/Quotes/src/stdafx.h | 1 - plugins/Rate/src/stdafx.h | 1 - plugins/SecureIM/src/main.cpp | 6 +--- plugins/SmileyAdd/src/smileys.cpp | 2 +- plugins/StartPosition/src/stdafx.h | 1 - plugins/Watrack/proto/proto.pas | 7 +---- plugins/Weather/src/stdafx.h | 1 - plugins/WebView/src/stdafx.h | 1 - plugins/YAMN/src/stdafx.h | 1 - plugins/mRadio/mradio.dpr | 9 +----- 33 files changed, 45 insertions(+), 96 deletions(-) (limited to 'plugins') diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index d36bac1e4e..58edd6b794 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -129,7 +129,7 @@ static void LoadDefaultInfo() static void LoadProtoInfo(PROTOCOLDESCRIPTOR *proto) { - if (proto->type != PROTOTYPE_PROTOCOL || proto->cbSize != sizeof(*proto)) + if (proto->type != PROTOTYPE_PROTOWITHACCS) return; char protoName[MAX_PATH]; diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp index a738bbe09b..528cb8e386 100644 --- a/plugins/CloudFile/src/Services/dropbox_service.cpp +++ b/plugins/CloudFile/src/Services/dropbox_service.cpp @@ -315,7 +315,7 @@ struct CMPluginDropbox : public PLUGIN { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CDropboxService::Init, (pfnUninitProto)CDropboxService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CDropboxService::Init, (pfnUninitProto)CDropboxService::UnInit); } } g_pluginDropbox; diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp index e3a7a95d15..05befd78f7 100644 --- a/plugins/CloudFile/src/Services/google_service.cpp +++ b/plugins/CloudFile/src/Services/google_service.cpp @@ -299,7 +299,7 @@ struct CMPluginGoogle : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CGDriveService::Init, (pfnUninitProto)CGDriveService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CGDriveService::Init, (pfnUninitProto)CGDriveService::UnInit); } } g_pluginGoogle; diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp index c4ec053eaa..1de8e52ee9 100644 --- a/plugins/CloudFile/src/Services/microsoft_service.cpp +++ b/plugins/CloudFile/src/Services/microsoft_service.cpp @@ -284,7 +284,7 @@ struct CMPluginOnedrive : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)COneDriveService::Init, (pfnUninitProto)COneDriveService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)COneDriveService::Init, (pfnUninitProto)COneDriveService::UnInit); } } g_pluginOnedrive; diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp index e05f216698..3e5e63440b 100644 --- a/plugins/CloudFile/src/Services/yandex_service.cpp +++ b/plugins/CloudFile/src/Services/yandex_service.cpp @@ -294,7 +294,7 @@ struct CMPluginYandex : public CMPluginBase { m_hInst = g_plugin.getInst(); - RegisterProtocol(PROTOTYPE_PROTOCOL, (pfnInitProto)CYandexService::Init, (pfnUninitProto)CYandexService::UnInit); + RegisterProtocol(PROTOTYPE_PROTOWITHACCS, (pfnInitProto)CYandexService::Init, (pfnUninitProto)CYandexService::UnInit); } } g_pluginYandex; diff --git a/plugins/CloudFile/src/services.cpp b/plugins/CloudFile/src/services.cpp index 28cda47967..edaad32901 100644 --- a/plugins/CloudFile/src/services.cpp +++ b/plugins/CloudFile/src/services.cpp @@ -95,10 +95,7 @@ INT_PTR Upload(WPARAM wParam, LPARAM lParam) void InitializeServices() { - PROTOCOLDESCRIPTOR pd = { sizeof(pd) }; - pd.type = PROTOTYPE_FILTER; - pd.szName = MODULE; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_FILTER, MODULE); CreateServiceFunction(MODULE PSS_FILE, SendFileInterceptor); diff --git a/plugins/CloudFile/src/stdafx.h b/plugins/CloudFile/src/stdafx.h index d475b54c11..5cfc53b59a 100644 --- a/plugins/CloudFile/src/stdafx.h +++ b/plugins/CloudFile/src/stdafx.h @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/plugins/ConnectionNotify/src/stdafx.h b/plugins/ConnectionNotify/src/stdafx.h index fda6ae7b09..659fac668b 100644 --- a/plugins/ConnectionNotify/src/stdafx.h +++ b/plugins/ConnectionNotify/src/stdafx.h @@ -16,7 +16,6 @@ #include #include #include -#include #ifdef _DEBUG #include "debug.h" diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index f3c32a4037..1eb4113e24 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -283,8 +283,11 @@ static void GetProtocolStrings(CMStringW &buffer) char **protoListMy = (char**)alloca((protoCount + accCount) * sizeof(char*)); for (int i = 0; i < protoCount; i++) - if (protoList[i]->type == PROTOTYPE_PROTOCOL) + switch (protoList[i]->type) { + case PROTOTYPE_PROTOCOL: + case PROTOTYPE_PROTOWITHACCS: protoListMy[protoCountMy++] = protoList[i]->szName; + } for (int j = 0; j < accCount; j++) { int i; diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index 72c1dc1e2e..922ca181ce 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -52,11 +52,7 @@ extern "C" __declspec(dllexport) int Load() mir_getLP(&pluginInfoEx); // register plugin module - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = (char*)szModuleName; - pd.type = PROTOTYPE_ENCRYPTION; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_ENCRYPTION, szModuleName); // hook events HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded); diff --git a/plugins/CyrTranslit/src/TransliterationProtocol.cpp b/plugins/CyrTranslit/src/TransliterationProtocol.cpp index 52eb90b6ef..53382af667 100644 --- a/plugins/CyrTranslit/src/TransliterationProtocol.cpp +++ b/plugins/CyrTranslit/src/TransliterationProtocol.cpp @@ -28,11 +28,7 @@ char *TransliterationProtocol::MODULE_NAME = "ProtoCyrTranslitByIKR"; void TransliterationProtocol::initialize() { - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = MODULE_NAME; - pd.type = PROTOTYPE_TRANSLATION; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_TRANSLATION, MODULE_NAME); CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE, sendMessage); } diff --git a/plugins/Exchange/src/stdafx.h b/plugins/Exchange/src/stdafx.h index 1358ddbb07..075d19ddd9 100644 --- a/plugins/Exchange/src/stdafx.h +++ b/plugins/Exchange/src/stdafx.h @@ -40,7 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include "resource.h" #include "version.h" diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 092e6cc6f0..abb3068398 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -202,11 +202,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(SERVICE_NAME "/FESendFile", OnSendFile); CreateServiceFunction(SERVICE_NAME "/FERecvFile", OnRecvFile); - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = SERVICE_NAME; - pd.type = PROTOTYPE_FILTER; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_FILTER, SERVICE_NAME); HookEvent(ME_OPT_INITIALISE, OnOptInitialise); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 945ab5984d..c3add00af0 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -11,7 +11,6 @@ There is no warranty. #include "version.h" CLIST_INTERFACE *pcli; -HINSTANCE g_hInstance; int hLangpack; UINT hTimer; HANDLE hMirandaStarted, hOptionsInitial; @@ -37,6 +36,19 @@ static PLUGININFOEX pluginInfoEx = { 0x243955e0, 0x75d9, 0x4cc3, { 0x9b, 0x28, 0x6f, 0x9c, 0x5a, 0xf4, 0x53, 0x2d } } }; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CMPlugin g_plugin; + +extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; + +///////////////////////////////////////////////////////////////////////////////////////// + INT_PTR GetCaps(WPARAM wParam, LPARAM) { if (wParam == PFLAGNUM_2 && opt.ShowCustomIcon) @@ -75,11 +87,6 @@ static int OnMirandaStart(WPARAM, LPARAM) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - extern "C" int __declspec(dllexport) Load() { mir_getLP(&pluginInfoEx); @@ -146,6 +153,8 @@ extern "C" int __declspec(dllexport) Load() return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { if (hTimer) @@ -161,17 +170,3 @@ extern "C" int __declspec(dllexport) Unload(void) UnhookEvent(hOptionsInitial); return 0; } - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CMPlugin : public PLUGIN -{ - CMPlugin() : - PLUGIN(MODULE_NAME) - { - RegisterProtocol(PROTOTYPE_VIRTUAL); - } -} - g_plugin; - -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index 4aafb314f6..9d15fbe1ac 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -272,7 +272,7 @@ int OptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.position = -790000000; - odp.hInstance = g_hInstance; + odp.hInstance = g_plugin.getInst(); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT); odp.szTitle.a = LPGEN("GmailNotifier"); odp.szGroup.a = LPGEN("Network"); diff --git a/plugins/GmailNotifier/src/stdafx.h b/plugins/GmailNotifier/src/stdafx.h index c098816cef..f5cedab022 100644 --- a/plugins/GmailNotifier/src/stdafx.h +++ b/plugins/GmailNotifier/src/stdafx.h @@ -20,7 +20,6 @@ #include "m_clc.h" #include "m_popup.h" #include "m_netlib.h" -#include #define WM_SHELLNOTIFY WM_USER+5 #define IDI_TRAY WM_USER+6 @@ -73,7 +72,6 @@ struct optionSettings extern OBJLIST g_accs; extern optionSettings opt; -extern HINSTANCE g_hInstance; extern HNETLIBUSER hNetlibUser; extern UINT hTimer; extern short ID_STATUS_NONEW; @@ -93,3 +91,12 @@ void DeleteResults(resultLink *); void BuildList(void); Account* GetAccountByContact(MCONTACT hContact); + +struct CMPlugin : public PLUGIN +{ + CMPlugin() : + PLUGIN(MODULE_NAME) + { + RegisterProtocol(PROTOTYPE_VIRTUAL); + } +}; diff --git a/plugins/LotusNotify/src/stdafx.h b/plugins/LotusNotify/src/stdafx.h index 9a95f7a7f8..aba429fb15 100644 --- a/plugins/LotusNotify/src/stdafx.h +++ b/plugins/LotusNotify/src/stdafx.h @@ -22,7 +22,6 @@ #include #include #include -#include // Notesapi headers #define W32 diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index d316b47cd0..cee700e68b 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -74,11 +74,7 @@ extern "C" int __declspec(dllexport) Load(void) nlu.szSettingsModule = MODULE; hNetlib = Netlib_RegisterUser(&nlu); - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = MODULE; - pd.type = PROTOTYPE_FILTER; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_FILTER, MODULE); hRecvMessage = CreateHookableEvent(MODULE PSR_MESSAGE); CreateProtoServiceFunction(MODULE, PSR_MESSAGE, FilterRecvMessage); diff --git a/plugins/MirLua/src/stdafx.h b/plugins/MirLua/src/stdafx.h index 3b5d8ffb6d..98b45c6a4a 100644 --- a/plugins/MirLua/src/stdafx.h +++ b/plugins/MirLua/src/stdafx.h @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp index 16ff5afaa8..e548c017dc 100644 --- a/plugins/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/src/dllmain.cpp @@ -72,11 +72,7 @@ extern "C" __declspec(dllexport) int Load(void) //////////////////////////////////////////////////////////////////////////// // init plugin - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = MODULENAME; - pd.type = PROTOTYPE_ENCRYPTION; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_ENCRYPTION, MODULENAME); // remove us as a filter to all contacts - fix filter type problem if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) { diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index e83731181b..148555015d 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -136,11 +136,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) HookEvent(ME_MSG_WINDOWEVENT, onWindowEvent); HookEvent(ME_MSG_ICONPRESSED, onIconPressed); - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = szGPGModuleName; - pd.type = PROTOTYPE_ENCRYPTION; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_ENCRYPTION, szGPGModuleName); CreateProtoServiceFunction(szGPGModuleName, PSR_MESSAGE, RecvMsgSvc); CreateProtoServiceFunction(szGPGModuleName, PSS_MESSAGE, SendMsgSvc); diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h index f0f8cd793e..834e47b174 100644 --- a/plugins/NewsAggregator/Src/stdafx.h +++ b/plugins/NewsAggregator/Src/stdafx.h @@ -45,7 +45,6 @@ Boston, MA 02111-1307, USA. #include #include #include -#include #include #include diff --git a/plugins/Non-IM Contact/src/stdafx.h b/plugins/Non-IM Contact/src/stdafx.h index c8f6738916..1497c970df 100644 --- a/plugins/Non-IM Contact/src/stdafx.h +++ b/plugins/Non-IM Contact/src/stdafx.h @@ -44,7 +44,6 @@ struct DLGTEMPLATEEX #include #include #include -#include #include #include diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index 5f9f29486d..ea4fed341e 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/plugins/Rate/src/stdafx.h b/plugins/Rate/src/stdafx.h index be91171499..e04a7de369 100644 --- a/plugins/Rate/src/stdafx.h +++ b/plugins/Rate/src/stdafx.h @@ -28,7 +28,6 @@ #include #include #include -#include #include "resource.h" #include "version.h" diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 87a021d713..4cfa2d69b2 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -326,11 +326,7 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) } // register plugin module - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = sizeof(pd); - pd.szName = (char*)MODULENAME; - pd.type = PROTOTYPE_ENCRYPTION; - Proto_RegisterModule(&pd); + Proto_RegisterModule(PROTOTYPE_ENCRYPTION, MODULENAME); // hook events HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded); diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index d4c4fdf5d0..73a303a393 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -832,7 +832,7 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void) for (int i = 0; i < protoCount; i++) { PROTOCOLDESCRIPTOR *pd = proto[i]; - if (pd->type == PROTOTYPE_PROTOCOL && pd->cbSize == sizeof(*pd)) + if (pd->type == PROTOTYPE_PROTOWITHACCS) AddProtoAsCategory(pd->szName, defaultFile); } diff --git a/plugins/StartPosition/src/stdafx.h b/plugins/StartPosition/src/stdafx.h index a4995fad9b..c6a7682aef 100644 --- a/plugins/StartPosition/src/stdafx.h +++ b/plugins/StartPosition/src/stdafx.h @@ -28,7 +28,6 @@ along with this program. If not, see . #include #include #include -#include #include "resource.h" #include "version.h" diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas index 33098c7f42..3025ab76f3 100644 --- a/plugins/Watrack/proto/proto.pas +++ b/plugins/Watrack/proto/proto.pas @@ -318,13 +318,8 @@ begin end; procedure SetProtocol; -var - desc:TPROTOCOLDESCRIPTOR; begin - desc.cbSize:=SizeOf(desc); - desc.szName:=PluginShort; - desc._type :=PROTOTYPE_TRANSLATION; - Proto_RegisterModule(@desc); + Proto_RegisterModule(PROTOTYPE_TRANSLATION,PluginShort); hSRM:=CreateProtoServiceFunction(PluginShort,PSR_MESSAGE ,@ReceiveMessageProcW); end; diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h index 26c46861ea..9d0c550575 100644 --- a/plugins/Weather/src/stdafx.h +++ b/plugins/Weather/src/stdafx.h @@ -54,7 +54,6 @@ along with this program. If not, see . #include #include #include -#include #include #include diff --git a/plugins/WebView/src/stdafx.h b/plugins/WebView/src/stdafx.h index 64808dddad..3ce8c77b06 100644 --- a/plugins/WebView/src/stdafx.h +++ b/plugins/WebView/src/stdafx.h @@ -31,7 +31,6 @@ #include #include #include -#include #include "resource.h" #include "version.h" diff --git a/plugins/YAMN/src/stdafx.h b/plugins/YAMN/src/stdafx.h index eb842b2efa..b5612aa639 100644 --- a/plugins/YAMN/src/stdafx.h +++ b/plugins/YAMN/src/stdafx.h @@ -29,7 +29,6 @@ #include #include #include -#include #include "main.h" #include "mails/decode.h" diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr index a61dae29c5..d7cb1dade7 100644 --- a/plugins/mRadio/mradio.dpr +++ b/plugins/mRadio/mradio.dpr @@ -201,16 +201,9 @@ exports Load, Unload, MirandaPluginInfoEx; -var - desc:TPROTOCOLDESCRIPTOR; - begin // register protocol - desc.cbSize:=SizeOf(desc); - desc.szName:=PluginName; - desc._type :=PROTOTYPE_VIRTUAL; - Proto_RegisterModule(@desc); - + Proto_RegisterModule(PROTOTYPE_VIRTUAL,PluginName); Proto_SetUniqueId(PluginName,optStationURL); DisableThreadLibraryCalls(hInstance); -- cgit v1.2.3