diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-31 19:01:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-31 19:01:52 +0300 |
commit | 2600097dcc6e357d4d8df6105e9afb66b6d4b296 (patch) | |
tree | fe6a1f8a777531ef1a28d373301dacdfc4854544 /protocols | |
parent | 5f9ab0cf3c13bd2a0cae62bd9c5427ad302ac540 (diff) |
- NUF_HTTPGATEWAY: unused option removed;
- NETLIBUSER::szDescriptiveName replaced with MAllStrings;
- code cleaning.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Discord/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_ws.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraAvatars.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/MinecraftDynmap/src/proto.cpp | 5 | ||||
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_network.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_ws.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_netlib.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 2 |
20 files changed, 29 insertions, 28 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index a670de6faa..7fd35eec98 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -52,7 +52,7 @@ CAimProto::CAimProto(const char* aProtoName, const wchar_t* aUserName) : nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName);
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
char szP2P[128];
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 03e903e46f..b0d47a941e 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -79,14 +79,14 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : nlu.szSettingsModule = m_szModuleName; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; descr.Format(TranslateT("%s server connection"), m_tszUserName); - nlu.ptszDescriptiveName = descr.GetBuffer(); + nlu.szDescriptiveName.w = descr.GetBuffer(); m_hNetlibUser = Netlib_RegisterUser(&nlu); CMStringA module(FORMAT, "%s.Gateway", m_szModuleName); nlu.szSettingsModule = module.GetBuffer(); nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_UNICODE; descr.Format(TranslateT("%s gateway connection"), m_tszUserName); - nlu.ptszDescriptiveName = descr.GetBuffer(); + nlu.szDescriptiveName.w = descr.GetBuffer(); m_hGatewayNetlibUser = Netlib_RegisterUser(&nlu); } diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 8c63120cb4..246fbdd480 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -88,7 +88,7 @@ FacebookProto::FacebookProto(const char* proto_name, const wchar_t* username) : nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nlu.szSettingsModule = m_szModuleName; mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName); - nlu.ptszDescriptiveName = descr; + nlu.szDescriptiveName.w = descr; m_hNetlibUser = Netlib_RegisterUser(&nlu); if (m_hNetlibUser == NULL) { wchar_t error[200]; diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 5606f0a398..3fe2a9d605 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -45,7 +45,7 @@ GGPROTO::GGPROTO(const char *pszProtoName, const wchar_t *tszUserName) : NETLIBUSER nlu = {};
nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 440359e82a..b062662c29 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -181,7 +181,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
@@ -189,7 +189,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) mir_snprintf(szTemp2, "%s DCC", m_szModuleName);
nlu.szSettingsModule = szTemp2;
mir_snwprintf(name, TranslateT("%s client-to-client connections"), m_tszUserName);
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
hNetlibDCC = Netlib_RegisterUser(&nlu);
GCREGISTER gcr = {};
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index fcc6cb3d8f..a97e56df77 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -161,7 +161,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) : NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.ptszDescriptiveName = szBuffer;
+ nlu.szDescriptiveName.w = szBuffer;
nlu.szSettingsModule = m_szModuleName;
nlu.szHttpGatewayHello = "http://http.proxy.icq.com/hello";
nlu.szHttpGatewayUserAgent = NETLIB_USER_AGENT;
@@ -175,7 +175,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const wchar_t* aUserName) : mir_snprintf(szP2PModuleName, "%sP2P", m_szModuleName);
mir_snwprintf(szBuffer, TranslateT("%s client-to-client connections"), m_tszUserName);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_UNICODE;
- nlu.ptszDescriptiveName = szBuffer;
+ nlu.szDescriptiveName.w = szBuffer;
nlu.szSettingsModule = szP2PModuleName;
nlu.minIncomingPorts = 1;
m_hDirectNetlibUser = Netlib_RegisterUser(&nlu);
diff --git a/protocols/JabberG/src/jabber_ws.cpp b/protocols/JabberG/src/jabber_ws.cpp index db491e365b..29129a74f8 100644 --- a/protocols/JabberG/src/jabber_ws.cpp +++ b/protocols/JabberG/src/jabber_ws.cpp @@ -32,8 +32,8 @@ BOOL CJabberProto::WsInit(void) mir_snwprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = {};
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
- nlu.ptszDescriptiveName = name;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
+ nlu.szDescriptiveName.w = name;
nlu.szSettingsModule = m_szModuleName;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
return m_hNetlibUser != NULL;
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index de646f2c2a..7c80a1230a 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -61,7 +61,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = MRA_AVT_SECT_NAME;
- nlu.ptszDescriptiveName = szBuffer;
+ nlu.szDescriptiveName.w = szBuffer;
pmraaqAvatarsQueue->hNetlibUser = Netlib_RegisterUser(&nlu);
if (pmraaqAvatarsQueue->hNetlibUser) {
pmraaqAvatarsQueue->iThreadsCount = db_get_dw(NULL, MRA_AVT_SECT_NAME, "WorkThreadsCount", MRA_AVT_DEFAULT_WRK_THREAD_COUNTS);
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 75a684f233..4ced9192fc 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -41,7 +41,7 @@ CMraProto::CMraProto(const char* _module, const wchar_t* _displayName) : NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
InitMenus();
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 0868dd76e7..44cd861286 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -140,7 +140,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const wchar_t* aUserName) : NETLIBUSER nlu1 = {};
nlu1.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu1.szSettingsModule = szDbsettings;
- nlu1.ptszDescriptiveName = szBuffer;
+ nlu1.szDescriptiveName.w = szBuffer;
mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName);
mir_snwprintf(szBuffer, TranslateT("%s plugin HTTPS connections"), m_tszUserName);
@@ -149,7 +149,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const wchar_t* aUserName) : NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = szBuffer;
+ nlu.szDescriptiveName.w = szBuffer;
nlu.szHttpGatewayUserAgent = (char*)MSN_USER_AGENT;
nlu.pfnHttpGatewayInit = msn_httpGatewayInit;
diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index a29f44c89a..83a05652d2 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -43,11 +43,12 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t // Create standard network connection wchar_t descr[512]; + mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName); + NETLIBUSER nlu = {}; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nlu.szSettingsModule = m_szModuleName; - mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName); - nlu.ptszDescriptiveName = descr; + nlu.szDescriptiveName.w = descr; m_hNetlibUser = Netlib_RegisterUser(&nlu); if (m_hNetlibUser == NULL) { wchar_t error[200]; diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 57434aa3b1..3eae533cda 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -47,7 +47,7 @@ PROTO<OmegleProto>(proto_name, username) nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName);
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
if (m_hNetlibUser == NULL) {
wchar_t error[200];
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 3890deb053..2013429bbc 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -20,7 +20,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const wchar_t* tszUserN NETLIBUSER nlu = {};
nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
RegisterGLibLogger();
diff --git a/protocols/SkypeWeb/src/skype_network.cpp b/protocols/SkypeWeb/src/skype_network.cpp index de12a06b7b..49920c47dc 100644 --- a/protocols/SkypeWeb/src/skype_network.cpp +++ b/protocols/SkypeWeb/src/skype_network.cpp @@ -23,7 +23,7 @@ void CSkypeProto::InitNetwork() NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.ptszDescriptiveName = name.GetBuffer();
+ nlu.szDescriptiveName.w = name.GetBuffer();
nlu.szSettingsModule = m_szModuleName;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
}
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index e9fc5ba35c..aef0747f81 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -70,7 +70,7 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) NETLIBUSER nlu = {}; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - nlu.ptszDescriptiveName = name; + nlu.szDescriptiveName.w = name; nlu.szSettingsModule = m_szModuleName; m_hNetlibUser = Netlib_RegisterUser(&nlu); diff --git a/protocols/Tlen/src/tlen_ws.cpp b/protocols/Tlen/src/tlen_ws.cpp index 98b21892d4..3da3a54c88 100644 --- a/protocols/Tlen/src/tlen_ws.cpp +++ b/protocols/Tlen/src/tlen_ws.cpp @@ -28,10 +28,10 @@ BOOL TlenWsInit(TlenProtocol *proto) wchar_t name[128];
NETLIBUSER nlu = {};
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
nlu.szSettingsModule = proto->m_szModuleName;
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
mir_snwprintf(name, TranslateT("%s connection"), proto->m_tszUserName);
proto->m_hNetlibUser = Netlib_RegisterUser(&nlu);
diff --git a/protocols/Tox/src/tox_netlib.cpp b/protocols/Tox/src/tox_netlib.cpp index 3376697df5..f41f312722 100644 --- a/protocols/Tox/src/tox_netlib.cpp +++ b/protocols/Tox/src/tox_netlib.cpp @@ -7,7 +7,7 @@ void CToxProto::InitNetlib() NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.ptszDescriptiveName = name;
+ nlu.szDescriptiveName.w = name;
nlu.szSettingsModule = m_szModuleName;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 8160e13e14..19bc5452e7 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -306,7 +306,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) // Create standard network connection
mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName);
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
if (m_hNetlibUser == NULL) {
wchar_t error[200];
@@ -319,7 +319,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) mir_snprintf(module, "%sAv", m_szModuleName);
nlu.szSettingsModule = module;
mir_snwprintf(descr, TranslateT("%s avatar connection"), m_tszUserName);
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
hAvatarNetlib_ = Netlib_RegisterUser(&nlu);
if (hAvatarNetlib_ == NULL) {
wchar_t error[200];
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index a4d1e4f1b8..145f7545ee 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -67,7 +67,7 @@ CVkProto::CVkProto(const char *szModuleName, const wchar_t *pwszUserName) : NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
Clist_GroupCreate(NULL, m_vkOptions.pwszDefaultGroup);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 23246c783f..c41266f98c 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -38,7 +38,7 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = descr;
+ nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
if (m_hNetlibUser == NULL) {
wchar_t error[200];
|