From 9c4370db4f2e5f5ee77e03a8c5c4c1e226274768 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 15 Aug 2015 13:10:56 +0000 Subject: SkypeWeb: refactoring part 1 git-svn-id: http://svn.miranda-ng.org/main/trunk@14960 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/subscriptions.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/SkypeWeb/src/requests/subscriptions.h') diff --git a/protocols/SkypeWeb/src/requests/subscriptions.h b/protocols/SkypeWeb/src/requests/subscriptions.h index 403f7368e9..35b3eae39b 100644 --- a/protocols/SkypeWeb/src/requests/subscriptions.h +++ b/protocols/SkypeWeb/src/requests/subscriptions.h @@ -21,12 +21,12 @@ along with this program. If not, see . class CreateSubscriptionsRequest : public HttpRequest { public: - CreateSubscriptionsRequest(const char *regToken, const char *server = SKYPE_ENDPOINTS_HOST) : - HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints/SELF/subscriptions", server) + CreateSubscriptionsRequest(LoginInfo &li) : + HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints/SELF/subscriptions", li.endpoint.szServer) { Headers << CHAR_VALUE("Accept", "application/json, text/javascript") - << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken) + << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", li.endpoint.szToken) << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8"); JSONNode interestedResources(JSON_ARRAY); interestedResources.set_name("interestedResources"); @@ -49,13 +49,13 @@ public: class CreateContactsSubscriptionRequest : public HttpRequest { public: - CreateContactsSubscriptionRequest(const char *regToken, const LIST &skypenames, const char *server = SKYPE_ENDPOINTS_HOST) : - HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/contacts", server) + CreateContactsSubscriptionRequest(const LIST &skypenames, LoginInfo &li) : + HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/contacts", li.endpoint.szServer) { Headers << CHAR_VALUE("Accept", "application/json, text/javascript") << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8") - << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken); + << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", li.endpoint.szToken); JSONNode node; -- cgit v1.2.3