From 2600097dcc6e357d4d8df6105e9afb66b6d4b296 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 31 Jan 2017 19:01:52 +0300 Subject: - NUF_HTTPGATEWAY: unused option removed; - NETLIBUSER::szDescriptiveName replaced with MAllStrings; - code cleaning. --- plugins/Console/src/Console.cpp | 2 +- plugins/CrashDumper/src/upload.cpp | 2 +- plugins/CryptoPP/src/main.cpp | 2 +- plugins/Dropbox/src/dropbox_events.cpp | 2 +- plugins/HTTPServer/src/main.cpp | 2 +- plugins/LotusNotify/src/debug.cpp | 2 +- plugins/MirFox/src/MirandaUtils.cpp | 2 +- plugins/MirLua/src/main.cpp | 2 +- plugins/NewsAggregator/Src/Utils.cpp | 4 ++-- plugins/Non-IM Contact/src/http.cpp | 2 +- plugins/PackUpdater/Src/Utils.cpp | 4 ++-- plugins/PasteIt/src/PasteIt.cpp | 2 +- plugins/Ping/src/ping.cpp | 7 +------ plugins/PluginUpdater/src/Utils.cpp | 4 ++-- plugins/Quotes/src/HTTPSession.cpp | 2 +- plugins/SecureIM/src/commonheaders.cpp | 2 +- plugins/SendScreenshotPlus/src/Main.cpp | 2 +- plugins/SmileyAdd/src/download.cpp | 2 +- plugins/Watrack_MPD/src/init.cpp | 2 +- plugins/Weather/src/weather_http.cpp | 2 +- plugins/WebView/src/main.cpp | 2 +- plugins/YAMN/src/proto/netlib.cpp | 2 +- 22 files changed, 25 insertions(+), 30 deletions(-) (limited to 'plugins') diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 542baf1dc0..dec5f24afb 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -932,7 +932,7 @@ static int OnFastDump(WPARAM wParam, LPARAM lParam) DUMPMSG *dumpMsg = (DUMPMSG *)mir_alloc(len); wchar_t *str = dumpMsg->szMsg; - char *szModule = (wParam) ? ((NETLIBUSER *)wParam)->szDescriptiveName : "[Core]"; + char *szModule = (wParam) ? ((NETLIBUSER *)wParam)->szDescriptiveName.a : "[Core]"; mir_strncpy(dumpMsg->szModule, szModule, _countof(dumpMsg->szModule)); wchar_t *ucs2 = mir_a2u(logMsg->pszHead); diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp index 26359b0b74..7b0eff23b2 100644 --- a/plugins/CrashDumper/src/upload.cpp +++ b/plugins/CrashDumper/src/upload.cpp @@ -217,7 +217,7 @@ void UploadInit(void) NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = (char*)PluginName; - nlu.ptszDescriptiveName = TranslateT("Crash Dumper HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("Crash Dumper HTTP connections"); hNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index 3b2c814f29..dc5e3c67e9 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -121,7 +121,7 @@ void InitNetlib() { NETLIBUSER nl_user = {}; nl_user.szSettingsModule = (LPSTR)szModuleName; - nl_user.szDescriptiveName = (LPSTR)szModuleName; + nl_user.szDescriptiveName.a = (LPSTR)szModuleName; nl_user.flags = NUF_NOOPTIONS; hNetlibUser = Netlib_RegisterUser(&nl_user); } diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index 0384bb127c..77f5e2c820 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -26,7 +26,7 @@ int CDropbox::OnModulesLoaded(WPARAM, LPARAM) NETLIBUSER nlu = {}; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nlu.szSettingsModule = MODULE; - nlu.ptszDescriptiveName = L"Dropbox"; + nlu.szDescriptiveName.w = L"Dropbox"; hNetlibConnection = Netlib_RegisterUser(&nlu); GetDefaultContact(); diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 2670c256f0..a6126e8f51 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -741,7 +741,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_INCOMING; nlu.szSettingsModule = MODULE; - nlu.szDescriptiveName = Translate("HTTP Server"); + nlu.szDescriptiveName.a = Translate("HTTP Server"); hNetlibUser = Netlib_RegisterUser(& nlu); if (!hNetlibUser) { MessageBox(NULL, "Failed to register NetLib user", MSG_BOX_TITEL, MB_OK); diff --git a/plugins/LotusNotify/src/debug.cpp b/plugins/LotusNotify/src/debug.cpp index e814d6f508..6c59964094 100644 --- a/plugins/LotusNotify/src/debug.cpp +++ b/plugins/LotusNotify/src/debug.cpp @@ -8,7 +8,7 @@ void logRegister(){ NETLIBUSER nlu = {}; nlu.flags = NUF_UNICODE | NUF_NOOPTIONS; nlu.szSettingsModule = PLUGINNAME; - nlu.ptszDescriptiveName = mir_a2u(PLUGINNAME); + nlu.szDescriptiveName.w = mir_a2u(PLUGINNAME); netlibHandle = Netlib_RegisterUser(&nlu); } diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index a5b89fbf77..c0bbeded82 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -32,7 +32,7 @@ void MirandaUtils::netlibRegister(){ NETLIBUSER nlu = {}; nlu.flags = NUF_UNICODE | NUF_NOOPTIONS; nlu.szSettingsModule = PLUGIN_DB_ID; - nlu.ptszDescriptiveName = TranslateT("MirFox log"); + nlu.szDescriptiveName.w = TranslateT("MirFox log"); netlibHandle = Netlib_RegisterUser(&nlu); } diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index 03aed915d7..7648ecf930 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -62,7 +62,7 @@ extern "C" int __declspec(dllexport) Load(void) NETLIBUSER nlu = {}; nlu.flags = NUF_NOOPTIONS; - nlu.szDescriptiveName = MODULE; + nlu.szDescriptiveName.a = MODULE; nlu.szSettingsModule = MODULE; hNetlib = Netlib_RegisterUser(&nlu); diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 242218e4c1..e9863f83a5 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -32,8 +32,8 @@ bool IsMyContact(MCONTACT hContact) void NetlibInit() { NETLIBUSER nlu = {}; - nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY; - nlu.ptszDescriptiveName = TranslateT("NewsAggregator HTTP connection"); + nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szDescriptiveName.w = TranslateT("NewsAggregator HTTP connection"); nlu.szSettingsModule = MODULE; hNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp index 38eb3c510d..54e16954e4 100644 --- a/plugins/Non-IM Contact/src/http.cpp +++ b/plugins/Non-IM Contact/src/http.cpp @@ -95,6 +95,6 @@ void NetlibInit() NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = MODNAME; - nlu.ptszDescriptiveName = TranslateT("Non-IM Contacts"); + nlu.szDescriptiveName.w = TranslateT("Non-IM Contacts"); hNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index 9396d59be2..9a8ce67da2 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -50,8 +50,8 @@ void IcoLibInit() BOOL NetlibInit() { NETLIBUSER nlu = {}; - nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY; - nlu.ptszDescriptiveName = TranslateT("Pack Updater HTTP connection"); + nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szDescriptiveName.w = TranslateT("Pack Updater HTTP connection"); nlu.szSettingsModule = MODNAME; hNetlibUser = Netlib_RegisterUser(&nlu); diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index ce2c20ad34..19a818d1bd 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -394,7 +394,7 @@ extern "C" int __declspec(dllexport) Load(void) NETLIBUSER nlu = {}; nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_HTTPCONNS; nlu.szSettingsModule = MODULE; - nlu.ptszDescriptiveName = TranslateT("Paste It HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("Paste It HTTP connections"); g_hNetlibUser = Netlib_RegisterUser(&nlu); pasteToWebs[0] = new PasteToWeb1(); diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 45096e79c7..7688afb496 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -86,12 +86,7 @@ int OnModulesLoaded(WPARAM, LPARAM) NETLIBUSER nl_user = {}; nl_user.szSettingsModule = PLUG; nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - nl_user.ptszDescriptiveName = TranslateT("Ping Plugin"); - nl_user.szHttpGatewayHello = 0; - nl_user.szHttpGatewayUserAgent = 0; - nl_user.pfnHttpGatewayInit = 0; - nl_user.pfnHttpGatewayWrapSend = 0; - nl_user.pfnHttpGatewayUnwrapRecv = 0; + nl_user.szDescriptiveName.w = TranslateT("Ping Plugin"); hNetlibUser = Netlib_RegisterUser(&nl_user); diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 73d8036345..c136c5c20c 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -58,8 +58,8 @@ void InitIcoLib() void InitNetlib() { NETLIBUSER nlu = {}; - nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY; - nlu.ptszDescriptiveName = TranslateT("Plugin Updater HTTP connections"); + nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szDescriptiveName.w = TranslateT("Plugin Updater HTTP connections"); nlu.szSettingsModule = MODNAME; hNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/plugins/Quotes/src/HTTPSession.cpp b/plugins/Quotes/src/HTTPSession.cpp index 345b3d0cec..7c9ea5a880 100644 --- a/plugins/Quotes/src/HTTPSession.cpp +++ b/plugins/Quotes/src/HTTPSession.cpp @@ -35,7 +35,7 @@ public: NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = QUOTES_PROTOCOL_NAME; - nlu.ptszDescriptiveName = TranslateT("Quotes HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("Quotes HTTP connections"); g_hNetLib = Netlib_RegisterUser(&nlu); return (NULL != g_hNetLib); } diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 199942925c..31fe1d8792 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -99,7 +99,7 @@ void InitNetlib() { NETLIBUSER nl_user = {}; nl_user.szSettingsModule = (LPSTR)MODULENAME; - nl_user.szDescriptiveName = (LPSTR)MODULENAME; + nl_user.szDescriptiveName.a = (LPSTR)MODULENAME; nl_user.flags = NUF_NOOPTIONS; hNetlibUser = Netlib_RegisterUser(&nl_user); diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 9ad0d286f5..9b9645c8f9 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -234,7 +234,7 @@ int hook_ModulesLoaded(WPARAM, LPARAM) // Netlib register NETLIBUSER nlu = {}; nlu.szSettingsModule = __PLUGIN_NAME; - nlu.ptszDescriptiveName = TranslateT("SendSS HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("SendSS HTTP connections"); nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; //|NUF_NOHTTPSOPTION; g_hNetlibUser = Netlib_RegisterUser(&nlu); // load my button class / or use UInfoEx diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 04df9baf8a..3d0c5ebcba 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -221,7 +221,7 @@ void DownloadInit(void) NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = MODULENAME; - nlu.ptszDescriptiveName = TranslateT("SmileyAdd HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("SmileyAdd HTTP connections"); hNetlibUser = Netlib_RegisterUser(&nlu); GetSmileyCacheFolder(); diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp index 2d2989289c..4ed6cfb8ee 100755 --- a/plugins/Watrack_MPD/src/init.cpp +++ b/plugins/Watrack_MPD/src/init.cpp @@ -59,7 +59,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) { NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - nlu.ptszDescriptiveName = TranslateT("Watrack MPD connection"); + nlu.szDescriptiveName.w = TranslateT("Watrack MPD connection"); nlu.szSettingsModule = __PLUGIN_NAME; ghNetlibUser = Netlib_RegisterUser(&nlu); InitVars(); diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp index e1dde203ea..d2ffb09070 100644 --- a/plugins/Weather/src/weather_http.cpp +++ b/plugins/Weather/src/weather_http.cpp @@ -156,7 +156,7 @@ void NetlibInit(void) NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = WEATHERPROTONAME; - nlu.ptszDescriptiveName = TranslateT("Weather HTTP connections"); + nlu.szDescriptiveName.w = TranslateT("Weather HTTP connections"); hNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index bcb0c4a2e2..2709aa050f 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -150,7 +150,7 @@ extern "C" int __declspec(dllexport) Load() NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS; nlu.szSettingsModule = MODULENAME; - nlu.szDescriptiveName = tempNdesc; + nlu.szDescriptiveName.a = tempNdesc; hNetlibUser = Netlib_RegisterUser(&nlu); // register webview protocol diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp index b737dc89e2..24485fe871 100644 --- a/plugins/YAMN/src/proto/netlib.cpp +++ b/plugins/YAMN/src/proto/netlib.cpp @@ -43,7 +43,7 @@ HANDLE RegisterNLClient(const char *name) NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS; - nlu.szDescriptiveName = desc; + nlu.szDescriptiveName.a = desc; nlu.szSettingsModule = (char *)name; hNetlibUser = Netlib_RegisterUser(&nlu); -- cgit v1.2.3