summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/capabilities.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-07 21:50:05 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-07 21:50:05 +0000
commit90a05404a6ded56141c0230f663686439f8fa146 (patch)
tree6531783fbbedc04db025526243342823ed9ccd65 /protocols/SkypeWeb/src/requests/capabilities.h
parentde593c8e4ae504a8d159cc272740846ef9c20ca6 (diff)
SkypeWeb:
- added ability to getting contacts statuses - partly reworked login flow git-svn-id: http://svn.miranda-ng.org/main/trunk@12665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/capabilities.h')
-rw-r--r--protocols/SkypeWeb/src/requests/capabilities.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h
new file mode 100644
index 0000000000..3c2894ac91
--- /dev/null
+++ b/protocols/SkypeWeb/src/requests/capabilities.h
@@ -0,0 +1,25 @@
+#ifndef _SKYPE_REQUEST_CAPS_H_
+#define _SKYPE_REQUEST_CAPS_H_
+
+class SendCapabilitiesRequest : public HttpRequest
+{
+public:
+ SendCapabilitiesRequest(const char *regToken, const char *endpointID, const char *server = "client-s.gateway.messenger.live.com") :
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/endpoints/%s/presenceDocs/messagingService", server, ptrA(mir_urlEncode(endpointID)))
+ {
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
+ << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
+ CMStringA data;
+
+ int bitness = 32;
+#ifdef _WIN64
+ bitness = 64;
+#endif
+ data.AppendFormat("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"Miranda NG Skype\",\"nodeInfo\":\"xx\",\"version\":\"%s x%d\"}}", MIRANDA_VERSION_STRING, bitness);
+ Body <<
+ VALUE(data);
+ }
+};
+#endif //_SKYPE_REQUEST_CAPS_H_ \ No newline at end of file