summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-10 13:21:25 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-10 13:21:25 +0000
commit75beae890b1f18d5753748f4935731ed93579ef8 (patch)
tree5cb0461034ec9b19db4b2d928caf79d6746b0974 /protocols/SkypeWeb/src/requests
parente0ec38eb49bfd8dcddd4e46cbbca4fed98028b01 (diff)
flags fix
cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@13506 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r--protocols/SkypeWeb/src/requests/capabilities.h28
-rw-r--r--protocols/SkypeWeb/src/requests/chatrooms.h4
-rw-r--r--protocols/SkypeWeb/src/requests/endpoint.h2
-rw-r--r--protocols/SkypeWeb/src/requests/history.h4
-rw-r--r--protocols/SkypeWeb/src/requests/messages.h4
-rw-r--r--protocols/SkypeWeb/src/requests/poll.h2
-rw-r--r--protocols/SkypeWeb/src/requests/search.h6
-rw-r--r--protocols/SkypeWeb/src/requests/subscriptions.h6
-rw-r--r--protocols/SkypeWeb/src/requests/trouter.h34
9 files changed, 45 insertions, 45 deletions
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h
index f01036a5c3..eb972cafa5 100644
--- a/protocols/SkypeWeb/src/requests/capabilities.h
+++ b/protocols/SkypeWeb/src/requests/capabilities.h
@@ -41,30 +41,30 @@ public:
CMStringA verString(::FORMAT, "%s x%d", g_szMirVer, bitness);
- JSONNODE *node = json_new(5);
+ JSONNODE *node = json_new(5);
JSONNODE *privateInfo = json_new(5);
- JSONNODE *publicInfo = json_new(5);
+ JSONNODE *publicInfo = json_new(5);
json_set_name(privateInfo, "privateInfo");
- json_set_name(publicInfo, "publicInfo");
+ json_set_name(publicInfo, "publicInfo");
- json_push_back(node, json_new_a ("id", "messagingService" ));
- json_push_back(node, json_new_a ("type", "EndpointPresenceDoc" ));
- json_push_back(node, json_new_a ("selfLink", "uri" ));
+ json_push_back(node, json_new_a("id", "messagingService"));
+ json_push_back(node, json_new_a("type", "EndpointPresenceDoc"));
+ json_push_back(node, json_new_a("selfLink", "uri"));
- json_push_back(privateInfo, json_new_a ("epname", compName ));
+ json_push_back(privateInfo, json_new_a("epname", compName));
- json_push_back(publicInfo, json_new_a ("capabilities", "Audio|Video" ));
- json_push_back(publicInfo, json_new_i ("typ", 125 ));
- json_push_back(publicInfo, json_new_a ("skypeNameVersion","Miranda NG Skype" ));
- json_push_back(publicInfo, json_new_a ("nodeInfo", "xx" ));
- json_push_back(publicInfo, json_new_a ("version", verString.GetBuffer() ));
+ json_push_back(publicInfo, json_new_a("capabilities", "Audio|Video"));
+ json_push_back(publicInfo, json_new_i("typ", 125));
+ json_push_back(publicInfo, json_new_a("skypeNameVersion", "Miranda NG Skype"));
+ json_push_back(publicInfo, json_new_a("nodeInfo", "xx"));
+ json_push_back(publicInfo, json_new_a("version", verString.GetBuffer()));
json_push_back(node, privateInfo);
json_push_back(node, publicInfo);
-
+
ptrA data(mir_utf8encodeT(ptrT(json_write(node))));
-
+
Body <<
VALUE(data);
diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h
index 39f2f5eddb..f5a1dfd6db 100644
--- a/protocols/SkypeWeb/src/requests/chatrooms.h
+++ b/protocols/SkypeWeb/src/requests/chatrooms.h
@@ -24,7 +24,7 @@ public:
LoadChatsRequest(const char *regToken, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations", server)
{
- Url
+ Url
<< INT_VALUE("startTime", 0)
<< INT_VALUE("pageSize", 100)
<< CHAR_VALUE("view", "msnp24Equivalent")
@@ -89,7 +89,7 @@ public:
class CreateChatroomRequest : public HttpRequest
{
public:
- CreateChatroomRequest(const char *regToken, const LIST<char> &skypenames,const char *selfname, const char *server = SKYPE_ENDPOINTS_HOST) :
+ CreateChatroomRequest(const char *regToken, const LIST<char> &skypenames, const char *selfname, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/threads", server)
{
//{"members":[{"id":"8:user3","role":"User"},{"id":"8:user2","role":"User"},{"id":"8:user1","role":"Admin"}]}
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h
index 0f83d2b769..bec924d03a 100644
--- a/protocols/SkypeWeb/src/requests/endpoint.h
+++ b/protocols/SkypeWeb/src/requests/endpoint.h
@@ -28,7 +28,7 @@ public:
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
<< FORMAT_VALUE("Authentication", "skypetoken=%s", token);
-
+
Body << VALUE("{}");
}
};
diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h
index 812df6e927..2fb05c824c 100644
--- a/protocols/SkypeWeb/src/requests/history.h
+++ b/protocols/SkypeWeb/src/requests/history.h
@@ -23,7 +23,7 @@ public:
SyncHistoryFirstRequest(const char *regToken, int pageSize = 100, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations", server)
{
- Url
+ Url
<< INT_VALUE("startTime", 0)
<< INT_VALUE("pageSize", pageSize)
<< CHAR_VALUE("view", "msnp24Equivalent")
@@ -52,7 +52,7 @@ public:
GetHistoryRequest(const char *regToken, const char *username, int pageSize = 100, bool isChat = false, LONGLONG timestamp = 0, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations/%s:%s/messages", server, isChat ? "19" : "8", ptrA(mir_urlEncode(username)))
{
- Url
+ Url
<< INT_VALUE("startTime", timestamp)
<< INT_VALUE("pageSize", pageSize)
<< CHAR_VALUE("view", "msnp24Equivalent")
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h
index 054d682619..ed5b6ccc27 100644
--- a/protocols/SkypeWeb/src/requests/messages.h
+++ b/protocols/SkypeWeb/src/requests/messages.h
@@ -78,7 +78,7 @@ public:
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
- << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
+ << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
char *state = (iState == PROTOTYPE_SELFTYPING_ON) ? "Control/Typing" : "Control/ClearTyping";
@@ -99,7 +99,7 @@ class MarkMessageReadRequest : public HttpRequest
{
public:
MarkMessageReadRequest(const char *username, const char *regToken, LONGLONG msgId = 0, LONGLONG msgTimestamp = 0, bool isChat = false, const char *server = SKYPE_ENDPOINTS_HOST) :
- HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/conversations/%s:%s/properties?name=consumptionhorizon", server, !isChat?"8":"19", username)
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/conversations/%s:%s/properties?name=consumptionhorizon", server, !isChat ? "8" : "19", username)
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
diff --git a/protocols/SkypeWeb/src/requests/poll.h b/protocols/SkypeWeb/src/requests/poll.h
index 20a06fd673..9bbf936ace 100644
--- a/protocols/SkypeWeb/src/requests/poll.h
+++ b/protocols/SkypeWeb/src/requests/poll.h
@@ -26,7 +26,7 @@ public:
{
timeout = INFINITE;
flags |= NLHRF_PERSISTENT;
- Headers
+ Headers
<< CHAR_VALUE("Connection", "keep-alive")
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
diff --git a/protocols/SkypeWeb/src/requests/search.h b/protocols/SkypeWeb/src/requests/search.h
index 64283c1964..2b78cdac35 100644
--- a/protocols/SkypeWeb/src/requests/search.h
+++ b/protocols/SkypeWeb/src/requests/search.h
@@ -21,10 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class GetSearchRequest : public HttpRequest
{
public:
- GetSearchRequest(const char *token, const char *string) :
- HttpRequest(REQUEST_GET, "api.skype.com/search/users/any")
+ GetSearchRequest(const char *token, const char *string) :
+ HttpRequest(REQUEST_GET, "api.skype.com/search/users/any")
{
- Url
+ Url
<< CHAR_VALUE("keyWord", string)
<< CHAR_VALUE("contactTypes[]", "skype");
Headers
diff --git a/protocols/SkypeWeb/src/requests/subscriptions.h b/protocols/SkypeWeb/src/requests/subscriptions.h
index d0f8c60460..718d342d72 100644
--- a/protocols/SkypeWeb/src/requests/subscriptions.h
+++ b/protocols/SkypeWeb/src/requests/subscriptions.h
@@ -28,13 +28,13 @@ public:
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
-
+
JSONNODE *node = json_new(5);
JSONNODE *interestedResources = json_new(4);
json_set_name(interestedResources, "interestedResources");
json_push_back(node, json_new_a("channelType", "httpLongPoll"));
- json_push_back(node, json_new_a("template", "raw" ));
+ json_push_back(node, json_new_a("template", "raw"));
json_push_back(interestedResources, json_new_a(NULL, "/v1/users/ME/conversations/ALL/properties"));
json_push_back(interestedResources, json_new_a(NULL, "/v1/users/ME/conversations/ALL/messages"));
@@ -43,7 +43,7 @@ public:
json_push_back(node, interestedResources);
ptrA data(mir_utf8encodeT(ptrT(json_write(node))));
-
+
Body << VALUE(data);
json_delete(node);
diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h
index 0401d0f13a..89bad5a14b 100644
--- a/protocols/SkypeWeb/src/requests/trouter.h
+++ b/protocols/SkypeWeb/src/requests/trouter.h
@@ -19,11 +19,11 @@ class CreateTrouterRequest : public HttpRequest
{
public:
CreateTrouterRequest() :
- HttpRequest(REQUEST_POST,"go.trouter.io/v2/a")
+ HttpRequest(REQUEST_POST, "go.trouter.io/v2/a")
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml");
- //{"secure":true,"ccid":"huzHTfsZt3wZ","connId":"AUKRNgA8_eKV0Ibsx037Gbd8GVrsDg8zLQRt1pH8sCyIAile3gtoWmlq2x1yZ_VNZ3tf","healthUrl":"https://go.trouter.io:443/v2/h","id":"QpE2ADz94pXQhuzHTfsZt3wZ","instance":"193.149.88.131","instancePort":443,"socketio":"https://193-149-88-131.drip.trouter.io:443/","surl":"https://193-149-88-131.drip.trouter.io:8443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/","url":"https://193-149-88-131.drip.trouter.io:443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/"}
+ //{"secure":true,"ccid":"huzHTfsZt3wZ","connId":"AUKRNgA8_eKV0Ibsx037Gbd8GVrsDg8zLQRt1pH8sCyIAile3gtoWmlq2x1yZ_VNZ3tf","healthUrl":"https://go.trouter.io:443/v2/h","id":"QpE2ADz94pXQhuzHTfsZt3wZ","instance":"193.149.88.131","instancePort":443,"socketio":"https://193-149-88-131.drip.trouter.io:443/","surl":"https://193-149-88-131.drip.trouter.io:8443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/","url":"https://193-149-88-131.drip.trouter.io:443/v2/f/QpE2ADz94pXQhuzHTfsZt3wZ/"}
}
};
@@ -37,7 +37,7 @@ public:
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
<< CHAR_VALUE("X-Skypetoken", token);
-
+
JSONNODE *node = json_new(5);
json_push_back(node, json_new_a("sr", sr));
ptrA data(mir_utf8encodeT(ptrT(json_write(node))));
@@ -69,18 +69,18 @@ public:
json_set_name(transports, "transports");
json_set_name(TROUTER, "TROUTER");
- json_push_back(node, json_new_a("registrationId", id ));
- json_push_back(node, json_new_a("nodeId", "" ));
+ json_push_back(node, json_new_a("registrationId", id));
+ json_push_back(node, json_new_a("nodeId", ""));
- json_push_back(clientDescription, json_new_a("aesKey", "" ));
- json_push_back(clientDescription, json_new_a("languageId", "en-US" ));
- json_push_back(clientDescription, json_new_a("platform", "SWX" ));
- json_push_back(clientDescription, json_new_a("templateKey", "SkypeWeb_1.0"));
+ json_push_back(clientDescription, json_new_a("aesKey", ""));
+ json_push_back(clientDescription, json_new_a("languageId", "en-US"));
+ json_push_back(clientDescription, json_new_a("platform", "SWX"));
+ json_push_back(clientDescription, json_new_a("templateKey", "SkypeWeb_1.0"));
json_push_back(node, clientDescription);
-
- json_push_back(TRouter, json_new_a("context", ""));
- json_push_back(TRouter, json_new_a("path", trouterUrl));
- json_push_back(TRouter, json_new_i("ttl", 3600));
+
+ json_push_back(TRouter, json_new_a("context", ""));
+ json_push_back(TRouter, json_new_a("path", trouterUrl));
+ json_push_back(TRouter, json_new_i("ttl", 3600));
json_push_back(TROUTER, TRouter);
json_push_back(transports, TROUTER);
json_push_back(node, transports);
@@ -112,7 +112,7 @@ class GetTrouterRequest : public HttpRequest
{
public:
GetTrouterRequest(const char *socketio, const char *sr, const char *st, const char *se, const char *sig,
- const char *instance, const char *ccid) :
+ const char *instance, const char *ccid) :
HttpRequest(REQUEST_GET, FORMAT, "%ssocket.io/1/", socketio)
{
Url
@@ -127,7 +127,7 @@ public:
<< INT_VALUE("p", 443)
<< CHAR_VALUE("ccid", ccid)
<< CHAR_VALUE("tc", ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}")))
- << INT_VALUE("t", time(NULL)*1000);
+ << INT_VALUE("t", time(NULL) * 1000);
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml");
@@ -138,7 +138,7 @@ class TrouterPollRequest : public HttpRequest
{
public:
TrouterPollRequest(const char *socketio, const char *sr, const char *st, const char *se, const char *sig,
- const char *instance, const char *ccid, const char *sessId) :
+ const char *instance, const char *ccid, const char *sessId) :
HttpRequest(REQUEST_GET, FORMAT, "%ssocket.io/1/xhr-polling/%s", socketio, sessId)
{
timeout = INFINITE;
@@ -155,7 +155,7 @@ public:
<< INT_VALUE("p", 443)
<< CHAR_VALUE("ccid", ccid)
<< CHAR_VALUE("tc", ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}")))
- << INT_VALUE("t", time(NULL)*1000);
+ << INT_VALUE("t", time(NULL) * 1000);
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml");