summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/SkypeWeb/src
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff)
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r--protocols/SkypeWeb/src/requests/chatrooms.h4
-rw-r--r--protocols/SkypeWeb/src/requests/messages.h6
-rw-r--r--protocols/SkypeWeb/src/requests/subscriptions.h2
-rw-r--r--protocols/SkypeWeb/src/requests/trouter.h6
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_search.cpp2
6 files changed, 10 insertions, 12 deletions
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);
}