From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/chatrooms.h | 4 ++-- protocols/SkypeWeb/src/requests/messages.h | 6 +++--- protocols/SkypeWeb/src/requests/subscriptions.h | 2 +- protocols/SkypeWeb/src/requests/trouter.h | 6 ++---- protocols/SkypeWeb/src/skype_proto.cpp | 2 +- protocols/SkypeWeb/src/skype_search.cpp | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h index f5a1dfd6db..57e76b2cf2 100644 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ b/protocols/SkypeWeb/src/requests/chatrooms.h @@ -54,7 +54,7 @@ public: json_push_back(node, json_new_a("contenttype", "text")); json_push_back(node, json_new_a("content", ptrA(mir_utf8encode(message)))); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); json_delete(node); @@ -79,7 +79,7 @@ public: json_push_back(node, json_new_a("content", ptrA(mir_utf8encode(message)))); json_push_back(node, json_new_i("skypeemoteoffset", 4)); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); json_delete(node); diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 922253b0df..3523a95f47 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -34,7 +34,7 @@ public: json_push_back(node, json_new_a("contenttype", "text")); json_push_back(node, json_new_a("content", message)); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); json_delete(node); @@ -62,7 +62,7 @@ public: json_push_back(node, json_new_a("content", content)); json_push_back(node, json_new_i("skypeemoteoffset", (int)(mir_strlen(username) + 1))); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); json_delete(node); @@ -88,7 +88,7 @@ public: json_push_back(node, json_new_a("contenttype", "text")); json_push_back(node, json_new_a("content", "")); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); json_delete(node); diff --git a/protocols/SkypeWeb/src/requests/subscriptions.h b/protocols/SkypeWeb/src/requests/subscriptions.h index 718d342d72..c0777819b0 100644 --- a/protocols/SkypeWeb/src/requests/subscriptions.h +++ b/protocols/SkypeWeb/src/requests/subscriptions.h @@ -42,7 +42,7 @@ public: json_push_back(interestedResources, json_new_a(NULL, "/v1/threads/ALL")); json_push_back(node, interestedResources); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h index 89bad5a14b..1d68e78470 100644 --- a/protocols/SkypeWeb/src/requests/trouter.h +++ b/protocols/SkypeWeb/src/requests/trouter.h @@ -40,10 +40,8 @@ public: JSONNODE *node = json_new(5); json_push_back(node, json_new_a("sr", sr)); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); - - Body << VALUE(data); + Body << VALUE(T2Utf(ptrT(json_write(node)))); json_delete(node); } //{"sr":"AUKRNgA8_eKV0Ibsx037Gbd8GVrsDg8zLQRt1pH8sCyIAile3gtoWmlq2x1yZ_VNZ3tf","issuer":"edf","sp":"connect","st":"1430236511619","se":"1430318082619","sig":"nYczCdlBENCxoAFLy7lPkGELVV1w5TcUnpSUE2G7GLA"} @@ -85,7 +83,7 @@ public: json_push_back(transports, TROUTER); json_push_back(node, transports); - ptrA data(mir_utf8encodeT(ptrT(json_write(node)))); + T2Utf data(ptrT(json_write(node))); Body << VALUE(data); diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index fde3788e65..26628255b3 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -168,7 +168,7 @@ int CSkypeProto::AuthRequest(MCONTACT hContact, const PROTOCHAR *szMessage) ptrA token(getStringA("TokenSecret")); ptrA skypename(getStringA(hContact, SKYPE_SETTINGS_ID)); - PushRequest(new AddContactRequest(token, skypename, ptrA(mir_utf8encodeT(szMessage)))); + PushRequest(new AddContactRequest(token, skypename, T2Utf(szMessage))); return 0; } diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index 67f3892f02..b74daf47c1 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -30,7 +30,7 @@ void CSkypeProto::SearchBasicThread(void* id) return; ptrT idT((TCHAR *)id); - ptrA string(mir_urlEncode(ptrA(mir_utf8encodeT(idT)))); + ptrA string(mir_urlEncode(T2Utf(idT))); SendRequest(new GetSearchRequest(TokenSecret, string), &CSkypeProto::OnSearch); } -- cgit v1.2.3