summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/endpoint.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-15 13:10:56 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-15 13:10:56 +0000
commit9c4370db4f2e5f5ee77e03a8c5c4c1e226274768 (patch)
treee6b9936fb28e85ec702d03ff8db294d2b2f50c15 /protocols/SkypeWeb/src/requests/endpoint.h
parentde6edc08ee0c1faffb6456abc31fc9bd8a5b0e32 (diff)
SkypeWeb: refactoring part 1
git-svn-id: http://svn.miranda-ng.org/main/trunk@14960 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/endpoint.h')
-rw-r--r--protocols/SkypeWeb/src/requests/endpoint.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h
index bec924d03a..1305030ae4 100644
--- a/protocols/SkypeWeb/src/requests/endpoint.h
+++ b/protocols/SkypeWeb/src/requests/endpoint.h
@@ -21,13 +21,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class CreateEndpointRequest : public HttpRequest
{
public:
- CreateEndpointRequest(const char *token, const char *server = SKYPE_ENDPOINTS_HOST) :
- HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints", server)
+ CreateEndpointRequest(LoginInfo &li) :
+ HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints", li.endpoint.szServer)
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("Authentication", "skypetoken=%s", token);
+ << FORMAT_VALUE("Authentication", "skypetoken=%s", li.api.szToken);
Body << VALUE("{}");
}
@@ -36,12 +36,12 @@ public:
class DeleteEndpointRequest : public HttpRequest
{
public:
- DeleteEndpointRequest(const char *regToken, const char *EndpointId, const char *server = SKYPE_ENDPOINTS_HOST) :
- HttpRequest(REQUEST_DELETE, FORMAT, "%s/v1/users/ME/endpoints/%s", server, ptrA(mir_urlEncode(EndpointId)))
+ DeleteEndpointRequest(LoginInfo &li) :
+ HttpRequest(REQUEST_DELETE, FORMAT, "%s/v1/users/ME/endpoints/%s", li.endpoint.szServer, ptrA(mir_urlEncode(li.endpoint.szId)))
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", li.endpoint.szToken);
}
};