diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
| -rw-r--r-- | protocols/SkypeWeb/src/requests/capabilities.h | 41 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/chatrooms.h | 92 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 89 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/history.h | 56 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/login.h | 43 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/oauth.h | 74 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/profile.h | 33 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/search.h | 33 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/status.h | 32 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/requests/subscriptions.h | 56 |
10 files changed, 0 insertions, 549 deletions
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h deleted file mode 100644 index 0c6d64eb37..0000000000 --- a/protocols/SkypeWeb/src/requests/capabilities.h +++ /dev/null @@ -1,41 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_CAPS_H_
-#define _SKYPE_REQUEST_CAPS_H_
-
-struct SendCapabilitiesRequest : public AsyncHttpRequest
-{
- SendCapabilitiesRequest(const char *hostname, CSkypeProto *ppro) :
- AsyncHttpRequest(REQUEST_PUT, HOST_DEFAULT, "/users/ME/endpoints/" + mir_urlEncode(ppro->m_szId) + "/presenceDocs/messagingService", &CSkypeProto::OnCapabilitiesSended)
- {
- JSONNode privateInfo; privateInfo.set_name("privateInfo");
- privateInfo << CHAR_PARAM("epname", hostname);
-
- JSONNode publicInfo; publicInfo.set_name("publicInfo");
- publicInfo << CHAR_PARAM("capabilities", "Audio|Video") << INT_PARAM("typ", 125)
- << CHAR_PARAM("skypeNameVersion", "Miranda NG Skype") << CHAR_PARAM("nodeInfo", "xx") << CHAR_PARAM("version", g_szMirVer);
-
- JSONNode node;
- node << CHAR_PARAM("id", "messagingService") << CHAR_PARAM("type", "EndpointPresenceDoc")
- << CHAR_PARAM("selfLink", "uri") << privateInfo << publicInfo;
-
- m_szParam = node.write().c_str();
- }
-};
-
-#endif //_SKYPE_REQUEST_CAPS_H_
diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h deleted file mode 100644 index e2d6a6773a..0000000000 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ /dev/null @@ -1,92 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_CHATS_H_
-#define _SKYPE_REQUEST_CHATS_H_
-
-struct CreateChatroomRequest : public AsyncHttpRequest
-{
- CreateChatroomRequest(const LIST<char> &skypenames, CSkypeProto *ppro) :
- AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, "/threads")
- {
- //{"members":[{"id":"8:user3","role":"User"},{"id":"8:user2","role":"User"},{"id":"8:user1","role":"Admin"}]}
- JSONNode node;
- JSONNode members(JSON_ARRAY); members.set_name("members");
-
- for (auto &it : skypenames) {
- JSONNode member;
- member << CHAR_PARAM("id", it) << CHAR_PARAM("role", !mir_strcmpi(it, ppro->m_szSkypename) ? "Admin" : "User");
- members << member;
- }
- node << members;
- m_szParam = node.write().c_str();
- }
-};
-
-struct GetChatMembersRequest : public AsyncHttpRequest
-{
- GetChatMembersRequest(const LIST<char> &ids, SESSION_INFO *si) :
- AsyncHttpRequest(REQUEST_POST, HOST_PEOPLE, "/profiles", &CSkypeProto::OnGetChatMembers)
- {
- JSONNode node, mris(JSON_ARRAY); mris.set_name("mris");
- for (auto &it : ids)
- mris.push_back(JSONNode("", it));
- node << mris << CHAR_PARAM("locale", "en-US");
- m_szParam = node.write().c_str();
-
- pUserInfo = si;
- }
-};
-
-struct GetChatInfoRequest : public AsyncHttpRequest
-{
- GetChatInfoRequest(const wchar_t *chatId) :
- AsyncHttpRequest(REQUEST_GET, HOST_DEFAULT, 0, &CSkypeProto::OnGetChatInfo)
- {
- m_szUrl.AppendFormat("/threads/%S", chatId);
-
- this << CHAR_PARAM("view", "msnp24Equivalent");
- }
-};
-
-struct InviteUserToChatRequest : public AsyncHttpRequest
-{
- InviteUserToChatRequest(const char *chatId, const char *skypename, const char *role) :
- AsyncHttpRequest(REQUEST_PUT, HOST_DEFAULT)
- {
- m_szUrl.AppendFormat("/threads/%s/members/%s", chatId, skypename);
-
- JSONNode node;
- node << CHAR_PARAM("role", role);
- m_szParam = node.write().c_str();
- }
-};
-
-struct SetChatPropertiesRequest : public AsyncHttpRequest
-{
- SetChatPropertiesRequest(const char *chatId, const char *propname, const char *value) :
- AsyncHttpRequest(REQUEST_PUT, HOST_DEFAULT)
- {
- m_szUrl.AppendFormat("/threads/%s/properties?name=%s", chatId, propname);
-
- JSONNode node;
- node << CHAR_PARAM(propname, value);
- m_szParam = node.write().c_str();
- }
-};
-
-#endif //_SKYPE_REQUEST_CHATS_H_
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h deleted file mode 100644 index 85abbec5b7..0000000000 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ /dev/null @@ -1,89 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_CONTACTS_H_
-#define _SKYPE_REQUEST_CONTACTS_H_
-
-struct GetContactListRequest : public AsyncHttpRequest
-{
- GetContactListRequest() :
- AsyncHttpRequest(REQUEST_GET, HOST_CONTACTS, "/users/SELF/contacts", &CSkypeProto::LoadContactList)
- {
- }
-};
-
-struct GetContactsAuthRequest : public AsyncHttpRequest
-{
- GetContactsAuthRequest() :
- AsyncHttpRequest(REQUEST_GET, HOST_CONTACTS, "/users/SELF/invites", &CSkypeProto::LoadContactsAuth)
- {
- }
-};
-
-struct AddContactRequest : public AsyncHttpRequest
-{
- AddContactRequest(const char *who, const char *greeting = "") :
- AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS, "/users/SELF/contacts")
- {
- JSONNode node;
- node << CHAR_PARAM("mri", who) << CHAR_PARAM("greeting", greeting);
- m_szParam = node.write().c_str();
- }
-};
-
-struct AuthAcceptRequest : public AsyncHttpRequest
-{
- AuthAcceptRequest(const char *who) :
- AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS)
- {
- m_szUrl.AppendFormat("/users/SELF/invites/%s/accept", mir_urlEncode(who).c_str());
- }
-};
-
-struct AuthDeclineRequest : public AsyncHttpRequest
-{
- AuthDeclineRequest(const char *who) :
- AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS)
- {
- m_szUrl.AppendFormat("/users/SELF/invites/%s/decline", mir_urlEncode(who).c_str());
- }
-};
-
-struct BlockContactRequest : public AsyncHttpRequest
-{
- BlockContactRequest(CSkypeProto *ppro, MCONTACT hContact) :
- AsyncHttpRequest(REQUEST_PUT, HOST_CONTACTS, "/users/SELF/contacts/blocklist/" + ppro->getId(hContact), &CSkypeProto::OnBlockContact)
- {
- m_szParam = "{\"report_abuse\":\"false\",\"ui_version\":\"skype.com\"}";
- pUserInfo = (void *)hContact;
- }
-};
-
-struct UnblockContactRequest : public AsyncHttpRequest
-{
- UnblockContactRequest(CSkypeProto *ppro, MCONTACT hContact) :
- AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS, 0, &CSkypeProto::OnUnblockContact)
- {
- m_szUrl.AppendFormat("/users/SELF/contacts/blocklist/%s", ppro->getId(hContact).c_str());
- pUserInfo = (void *)hContact;
-
- // TODO: user ip address
- this << CHAR_PARAM("reporterIp", "123.123.123.123") << CHAR_PARAM("uiVersion", g_szMirVer);
- }
-};
-
-#endif //_SKYPE_REQUEST_CONTACTS_H_
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h deleted file mode 100644 index 8bfa44fa3e..0000000000 --- a/protocols/SkypeWeb/src/requests/history.h +++ /dev/null @@ -1,56 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_HISTORY_H_
-#define _SKYPE_REQUEST_HISTORY_H_
-
-struct SyncConversations : public AsyncHttpRequest
-{
- SyncConversations() :
- AsyncHttpRequest(REQUEST_GET, HOST_DEFAULT, "/users/ME/conversations", &CSkypeProto::OnSyncConversations)
- {
- this << INT_PARAM("startTime", 0) << INT_PARAM("pageSize", 100)
- << CHAR_PARAM("view", "msnp24Equivalent") << CHAR_PARAM("targetType", "Passport|Skype|Lync|Thread");
- }
-};
-
-struct GetHistoryRequest : public AsyncHttpRequest
-{
- CMStringA m_who;
-
- GetHistoryRequest(MCONTACT _1, const char *who, int pageSize, int64_t timestamp, bool bOperative) :
- AsyncHttpRequest(REQUEST_GET, HOST_DEFAULT, "/users/ME/conversations/" + mir_urlEncode(who) + "/messages", &CSkypeProto::OnGetServerHistory),
- m_who(who)
- {
- hContact = _1;
- if (bOperative)
- pUserInfo = this;
-
- this << INT64_PARAM("startTime", timestamp) << INT_PARAM("pageSize", pageSize)
- << CHAR_PARAM("view", "msnp24Equivalent") << CHAR_PARAM("targetType", "Passport|Skype|Lync|Thread");
- }
-};
-
-struct EmptyHistoryRequest : public AsyncHttpRequest
-{
- EmptyHistoryRequest(const char *who) :
- AsyncHttpRequest(REQUEST_DELETE, HOST_DEFAULT, "/users/ME/conversations/" + mir_urlEncode(who) + "/messages")
- {
- }
-};
-
-#endif //_SKYPE_REQUEST_HISTORY_H_
diff --git a/protocols/SkypeWeb/src/requests/login.h b/protocols/SkypeWeb/src/requests/login.h deleted file mode 100644 index 74adeafe71..0000000000 --- a/protocols/SkypeWeb/src/requests/login.h +++ /dev/null @@ -1,43 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_LOGIN_H_
-#define _SKYPE_REQUEST_LOGIN_H_
-
-struct LoginOAuthRequest : public AsyncHttpRequest
-{
- LoginOAuthRequest(CMStringA username, const char *password) :
- AsyncHttpRequest(REQUEST_POST, HOST_API, "/login/skypetoken", &CSkypeProto::OnLoginOAuth)
- {
- username.MakeLower();
- const char *pszLogin = username;
- if (int iOffset = username.Find(':'))
- pszLogin += iOffset + 1;
-
- CMStringA hashStr(::FORMAT, "%s\nskyper\n%s", pszLogin, password);
-
- uint8_t digest[16];
- mir_md5_hash((const uint8_t*)hashStr.GetString(), hashStr.GetLength(), digest);
-
- this << CHAR_PARAM("scopes", "client")
- << CHAR_PARAM("clientVersion", mir_urlEncode("0/7.4.85.102/259/").c_str())
- << CHAR_PARAM("username", mir_urlEncode(pszLogin).c_str())
- << CHAR_PARAM("passwordHash", mir_urlEncode(ptrA(mir_base64_encode(digest, sizeof(digest)))).c_str());
- }
-};
-
-#endif //_SKYPE_REQUEST_LOGIN_H_
diff --git a/protocols/SkypeWeb/src/requests/oauth.h b/protocols/SkypeWeb/src/requests/oauth.h deleted file mode 100644 index 131a3a97fa..0000000000 --- a/protocols/SkypeWeb/src/requests/oauth.h +++ /dev/null @@ -1,74 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_OAUTH_H_
-#define _SKYPE_REQUEST_OAUTH_H_
-
-struct OAuthRequest : public AsyncHttpRequest
-{
- OAuthRequest() :
- AsyncHttpRequest(REQUEST_GET, HOST_OTHER, "https://login.live.com/login.srf", &CSkypeProto::OnOAuthStart)
- {
- flags |= NLHRF_REDIRECT;
-
- this << CHAR_PARAM("wa", "wsignin1.0") << CHAR_PARAM("wp", "MBI_SSL")
- << CHAR_PARAM("wreply", "https://lw.skype.com/login/oauth/proxy?site_name=lw.skype.com")
- << CHAR_PARAM("cobrandid", "90010");
- }
-
- OAuthRequest(const char *login, const char *password, const char *cookies, const char *ppft) :
- AsyncHttpRequest(REQUEST_POST, HOST_OTHER, "https://login.live.com/ppsecure/post.srf", &CSkypeProto::OnOAuthConfirm)
- {
- this << CHAR_PARAM("wa", "wsignin1.0") << CHAR_PARAM("wp", "MBI_SSL")
- << CHAR_PARAM("wreply", "https://lw.skype.com/login/oauth/proxy?site_name=lw.skype.com")
- << CHAR_PARAM("cobrandid", "90010");
- m_szUrl.AppendFormat("?%s", m_szParam.c_str());
- m_szParam.Empty();
-
- AddHeader("Cookie", cookies);
-
- if (auto *delim = strchr(login, ':'))
- login = delim + 1;
-
- this << CHAR_PARAM("login", login) << CHAR_PARAM("passwd", password) << CHAR_PARAM("PPFT", ppft);
- }
-
- OAuthRequest(const char *cookies, const char* ppft, const char* opid) :
- AsyncHttpRequest(REQUEST_POST, HOST_OTHER, "https://login.live.com/ppsecure/post.srf", &CSkypeProto::OnOAuthAuthorize)
- {
- this << CHAR_PARAM("wa", "wsignin1.0") << CHAR_PARAM("wp", "MBI_SSL")
- << CHAR_PARAM("wreply", "https://lw.skype.com/login/oauth/proxy?site_name=lw.skype.com")
- << CHAR_PARAM("cobrandid", "90010")
- << CHAR_PARAM("id", "293290")
- << CHAR_PARAM("opid", opid);
-
- m_szUrl.AppendFormat("?%s", m_szParam.c_str());
- m_szParam.Empty();
-
- AddHeader("Cookie", cookies);
-
- this << CHAR_PARAM("type", "28") << CHAR_PARAM("PPFT", ppft);
- }
-
- OAuthRequest(const char *t) :
- AsyncHttpRequest(REQUEST_POST, HOST_LOGIN, "/login/microsoft", &CSkypeProto::OnOAuthEnd)
- {
- this << CHAR_PARAM ("t", t) << CHAR_PARAM("site_name", "lw.skype.com") << INT_PARAM ("oauthPartner", 999);
- }
-};
-
-#endif //_SKYPE_REQUEST_OAUTH_H_
diff --git a/protocols/SkypeWeb/src/requests/profile.h b/protocols/SkypeWeb/src/requests/profile.h deleted file mode 100644 index c00efc780f..0000000000 --- a/protocols/SkypeWeb/src/requests/profile.h +++ /dev/null @@ -1,33 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_PROFILE_H_
-#define _SKYPE_REQUEST_PROFILE_H_
-
-struct GetProfileRequest : public AsyncHttpRequest
-{
- GetProfileRequest(CSkypeProto *ppro, MCONTACT hContact) :
- AsyncHttpRequest(REQUEST_GET, HOST_API, 0, &CSkypeProto::LoadProfile)
- {
- m_szUrl.AppendFormat("/users/%s/profile", (hContact == 0) ? "self" : mir_urlEncode(ppro->getId(hContact)));
- pUserInfo = (void *)hContact;
-
- AddHeader("Accept", "application/json");
- }
-};
-
-#endif //_SKYPE_REQUEST_PROFILE_H_
diff --git a/protocols/SkypeWeb/src/requests/search.h b/protocols/SkypeWeb/src/requests/search.h deleted file mode 100644 index 5910a05434..0000000000 --- a/protocols/SkypeWeb/src/requests/search.h +++ /dev/null @@ -1,33 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_SEARCH_H_
-#define _SKYPE_REQUEST_SEARCH_H_
-
-struct GetSearchRequest : public AsyncHttpRequest
-{
- GetSearchRequest(const char *string) :
- AsyncHttpRequest(REQUEST_GET, HOST_GRAPH, "/v2.0/search/", &CSkypeProto::OnSearch)
- {
- this << CHAR_PARAM("requestid", Utils_GenerateUUID())
- << CHAR_PARAM("locale", "en-US") << CHAR_PARAM("searchstring", string);
-
- AddHeader("Accept", "application/json");
- }
-};
-
-#endif //_SKYPE_REQUEST_SEARCH_H_
diff --git a/protocols/SkypeWeb/src/requests/status.h b/protocols/SkypeWeb/src/requests/status.h deleted file mode 100644 index bcd2e38bc3..0000000000 --- a/protocols/SkypeWeb/src/requests/status.h +++ /dev/null @@ -1,32 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_STATUS_H_
-#define _SKYPE_REQUEST_STATUS_H_
-
-struct SetStatusRequest : public AsyncHttpRequest
-{
- SetStatusRequest(const char *status) :
- AsyncHttpRequest(REQUEST_PUT, HOST_DEFAULT, "/users/ME/presenceDocs/messagingService", &CSkypeProto::OnStatusChanged)
- {
- JSONNode node(JSON_NODE);
- node << CHAR_PARAM("status", status);
- m_szParam = node.write().c_str();
- }
-};
-
-#endif //_SKYPE_REQUEST_STATUS_H_
diff --git a/protocols/SkypeWeb/src/requests/subscriptions.h b/protocols/SkypeWeb/src/requests/subscriptions.h deleted file mode 100644 index ba9fda206c..0000000000 --- a/protocols/SkypeWeb/src/requests/subscriptions.h +++ /dev/null @@ -1,56 +0,0 @@ -/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _SKYPE_REQUEST_SUBSCIPTIONS_H_
-#define _SKYPE_REQUEST_SUBSCIPTIONS_H_
-
-struct CreateSubscriptionsRequest : public AsyncHttpRequest
-{
- CreateSubscriptionsRequest() :
- AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, "/users/ME/endpoints/SELF/subscriptions", &CSkypeProto::OnSubscriptionsCreated)
- {
- JSONNode interestedResources(JSON_ARRAY); interestedResources.set_name("interestedResources");
- interestedResources << CHAR_PARAM("", "/v1/users/ME/conversations/ALL/properties")
- << CHAR_PARAM("", "/v1/users/ME/conversations/ALL/messages")
- << CHAR_PARAM("", "/v1/users/ME/contacts/ALL")
- << CHAR_PARAM("", "/v1/threads/ALL");
-
- JSONNode node;
- node << CHAR_PARAM("channelType", "httpLongPoll") << CHAR_PARAM("template", "raw") << interestedResources;
- m_szParam = node.write().c_str();
- }
-};
-
-struct CreateContactsSubscriptionRequest : public AsyncHttpRequest
-{
- CreateContactsSubscriptionRequest(const LIST<char> &skypenames) :
- AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, "/users/ME/contacts")
- {
- JSONNode contacts(JSON_ARRAY); contacts.set_name("contacts");
- for (auto &it : skypenames) {
- JSONNode contact;
- contact << CHAR_PARAM("id", it);
- contacts << contact;
- }
-
- JSONNode node;
- node << contacts;
- m_szParam = node.write().c_str();
- }
-};
-
-#endif //_SKYPE_REQUEST_SUBSCIPTIONS_H_
|
