diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests/trouter.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/trouter.h | 36 |
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
-//
|