summaryrefslogtreecommitdiff
path: root/protocols/Steam/src
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/Steam/src
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/Steam/src')
-rw-r--r--protocols/Steam/src/steam_pooling.cpp2
-rw-r--r--protocols/Steam/src/steam_proto.cpp11
-rw-r--r--protocols/Steam/src/steam_proto.h1
3 files changed, 3 insertions, 11 deletions
diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp
index e1dcb1ff28..912af1e7a5 100644
--- a/protocols/Steam/src/steam_pooling.cpp
+++ b/protocols/Steam/src/steam_pooling.cpp
@@ -35,10 +35,8 @@ void CSteamProto::ParsePollData(JSONNODE *data)
if (_tcsstr(type, _T("my_")) == NULL)
{
PROTORECVEVENT recv = { 0 };
- recv.flags = PREF_UTF;
recv.timestamp = timestamp;
recv.szMessage = szMessage;
-
ProtoChainRecvMsg(hContact, &recv);
}
else
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 405f598d5e..9196e03aa5 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -202,7 +202,7 @@ DWORD_PTR __cdecl CSteamProto:: GetCaps(int type, MCONTACT)
case PFLAGNUM_2:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT;
case PFLAGNUM_4:
- return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_IMSENDUTF | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE;
+ return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE;
case PFLAGNUM_5:
return PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT;
case PFLAG_UNIQUEIDTEXT:
@@ -240,7 +240,7 @@ int __cdecl CSteamProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, lstrlenA(pre->szMessage), (BYTE*)pre->szMessage);
}
-int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
+int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int, const char *msg)
{
UINT hMessage = InterlockedIncrement(&hMessageProcess);
@@ -248,10 +248,7 @@ int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
param->hContact = hContact;
param->hMessage = (HANDLE)hMessage;
param->msg = msg;
- param->flags = flags;
-
ForkThread(&CSteamProto::SendMsgThread, (void*)param);
-
return hMessage;
}
@@ -266,14 +263,12 @@ void __cdecl CSteamProto::SendMsgThread(void *arg)
return;
}
- CMStringA message = (param->flags & PREF_UNICODE) ? ptrA(mir_utf8encode(param->msg)) : param->msg; // TODO: mir_utf8encode check taken from FacebookRM, is it needed? Usually we get PREF_UTF8 flag instead.
-
ptrA token(getStringA("TokenSecret"));
ptrA umqid(getStringA("UMQID"));
ptrA steamId(getStringA(param->hContact, "SteamID"));
PushRequest(
- new SteamWebApi::SendMessageRequest(token, umqid, steamId, message),
+ new SteamWebApi::SendMessageRequest(token, umqid, steamId, param->msg),
&CSteamProto::OnMessageSent,
param,
ARG_MIR_FREE);
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h
index 1a2e7f38f2..157fb71a8b 100644
--- a/protocols/Steam/src/steam_proto.h
+++ b/protocols/Steam/src/steam_proto.h
@@ -22,7 +22,6 @@ struct SendMessageParam
MCONTACT hContact;
HANDLE hMessage;
const char *msg;
- int flags;
};
struct STEAM_SEARCH_RESULT