summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-21 16:11:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-21 16:11:58 +0000
commit48266e479d1fcf5153b29c612866845990fccad8 (patch)
treec8cbc908cd3c5f08731e5e8d7eaac6b568007d09 /protocols/SkypeWeb
parentebdb556f152734035846f120eb8112f88ef91281 (diff)
war against atavisms continues
- everything that goes to PSS_MESSAGE should be sent as utf8 string; - thus PREF_UNICODE & PREF_UTF support discontinued, these constants are removed; - support for PREF_UNICODE & PREF_UTF in protocols also removed; - PREF_UNICODE used in file transfers (PROTOFILERECVT) replaced with PRFF_UNICODE / PRFF_TCHAR git-svn-id: http://svn.miranda-ng.org/main/trunk@13734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp1
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp17
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp2
3 files changed, 5 insertions, 15 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 873186e0d9..0a33ee44e8 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -151,7 +151,6 @@ void CSkypeProto::LoadContactsAuth(const NETLIBHTTPREQUEST *response)
delSetting(hContact, "Auth");
PROTORECVEVENT pre = { 0 };
- pre.flags = PREF_UTF;
pre.timestamp = time(NULL);
pre.lParam = (DWORD)(sizeof(DWORD) * 2 + mir_strlen(skypename) + reason.GetLength() + 5);
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 72b359247c..65c26869d4 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -30,7 +30,6 @@ int CSkypeProto::OnReceiveMessage(const char *messageId, const char *url, time_t
return 0;
PROTORECVEVENT recv = { 0 };
- recv.flags = PREF_UTF;
recv.timestamp = timestamp;
recv.szMessage = content;
recv.lParam = emoteOffset;
@@ -68,7 +67,7 @@ struct SendMessageParam
};
// outcoming message flow
-int CSkypeProto::OnSendMessage(MCONTACT hContact, int flags, const char *szMessage)
+int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage)
{
if (!IsOnline())
{
@@ -80,22 +79,14 @@ int CSkypeProto::OnSendMessage(MCONTACT hContact, int flags, const char *szMessa
param->hContact = hContact;
param->hMessage = time(NULL);
- ptrA message;
- if (flags & PREF_UNICODE)
- message = mir_utf8encodeW((wchar_t*)&szMessage[mir_strlen(szMessage) + 1]);
- else if (flags & PREF_UTF)
- message = mir_strdup(szMessage);
- else
- message = mir_utf8encode(szMessage);
-
ptrA username(getStringA(hContact, "Skypename"));
debugLogA(__FUNCTION__ " clientmsgid = %d", param->hMessage);
- if (strncmp(message, "/me ", 4) == 0)
- SendRequest(new SendActionRequest(RegToken, SelfSkypeName, param->hMessage, &message[4], Server), &CSkypeProto::OnMessageSent, param);
+ if (strncmp(szMessage, "/me ", 4) == 0)
+ SendRequest(new SendActionRequest(RegToken, SelfSkypeName, param->hMessage, &szMessage[4], Server), &CSkypeProto::OnMessageSent, param);
else
- SendRequest(new SendMessageRequest(RegToken, username, param->hMessage, message, Server), &CSkypeProto::OnMessageSent, param);
+ SendRequest(new SendMessageRequest(RegToken, username, param->hMessage, szMessage, Server), &CSkypeProto::OnMessageSent, param);
return param->hMessage;
}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index dc51bca888..dc95b115ea 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -85,7 +85,7 @@ DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT)
case PFLAGNUM_3:
return PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_HEAVYDND;
case PFLAGNUM_4:
- return PF4_FORCEADDED | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE | PF4_IMSENDUTF;
+ return PF4_FORCEADDED | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE;
case PFLAG_UNIQUEIDTEXT:
return (INT_PTR)"Skypename";
case PFLAG_UNIQUEIDSETTING: