summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-29 17:31:22 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-29 17:31:22 +0000
commit343e3cb94c2985078f3e2e0510a024ecfa58b87f (patch)
treeeee427a67161795aa60ee9663ccf10e48560f5bb /protocols/SkypeWeb/src/requests
parentcdd84a443d08a4f5748b52b102ce17dfd267acc5 (diff)
SkypeWeb: TRouter support part 2.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13249 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r--protocols/SkypeWeb/src/requests/trouter.h36
1 files changed, 32 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h
index dad1caabbf..30cd906992 100644
--- a/protocols/SkypeWeb/src/requests/trouter.h
+++ b/protocols/SkypeWeb/src/requests/trouter.h
@@ -49,6 +49,38 @@ public:
//{"sr":"AUKRNgA8_eKV0Ibsx037Gbd8GVrsDg8zLQRt1pH8sCyIAile3gtoWmlq2x1yZ_VNZ3tf","issuer":"edf","sp":"connect","st":"1430236511619","se":"1430318082619","sig":"nYczCdlBENCxoAFLy7lPkGELVV1w5TcUnpSUE2G7GLA"}
};
+class RegisterTrouterRequest : public HttpRequest
+{
+public:
+ RegisterTrouterRequest(const char *token, const char *trouterUrl) :
+ HttpRequest(REQUEST_POST, "prod.registrar.skype.com/v2/registrations")
+ {
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml")
+ << CHAR_VALUE("X-Skypetoken", token);
+
+ CMStringA data;
+ data.AppendFormat("{\"clientDescription\":{\"aesKey\":\"\",\"languageId\":\"en-US\",\"platform\":\"SWX\",\"templateKey\":\"SkypeWeb_1.0\"},\"registrationId\":\"eafc0311-7bb4-4a93-4f32-7fce2496d724\",\"nodeId\":\"\",\"transports\":{\"TROUTER\":[{\"context\":\"\",\"path\":\"%s\",\"ttl\":3600}]}}", trouterUrl);
+
+ Body << VALUE(data);
+ }
+};
+
+class HealthTrouterRequest : public HttpRequest
+{
+public:
+ HealthTrouterRequest(const char *ccid) :
+ HttpRequest(REQUEST_POST, "go.trouter.io/v2/h")
+ {
+ Url
+ << CHAR_VALUE("ccid", ccid);
+
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript, text/html,application/xhtml+xml, application/xml");
+
+ }
+};
+
class GetTrouterRequest : public HttpRequest
{
public:
@@ -103,7 +135,3 @@ public:
}
};
-//https://193-149-88-55.drip.trouter.io/socket.io/1/xhr-polling/18a1cfae-225a-4b87-83a9-031547c4dd2a?sr=ACSsBADYbV964VzQTW9TMJz0WbnjqF_oEqWsUWgFUnTOeNL-_X3unXd0TusIZ3tvNxvB&issuer=edf&sp=connect&st=1430320100020&se=1430402662020&sig=SV9dpQcUPzRbDHsFSNn338VRvdyCTcYo1CvFZBGhBIA&r=193.149.88.55&v=v2&p=443&ccid=XNBNb1MwnPRZ&dom=web.skype.com&tc=%7B%22cv%22:%222014.8.26%22,%22hr%22:%22%22,%22ua%22:%22SWX%22,%22v%22:%221.2.273%22%7D&t=1430320585701
-
-//is websocket
-//