diff options
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/requests/capabilities.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/endpoint.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/history.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/login.h | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/mslogin.h | 22 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/oauth.h | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/trouter.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_search.cpp | 3 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/stdafx.h | 1 |
10 files changed, 24 insertions, 26 deletions
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h index 5cf4524f67..174b486ed7 100644 --- a/protocols/SkypeWeb/src/requests/capabilities.h +++ b/protocols/SkypeWeb/src/requests/capabilities.h @@ -22,7 +22,7 @@ class SendCapabilitiesRequest : public HttpRequest {
public:
SendCapabilitiesRequest(const char *hostname, LoginInfo &li) :
- HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/endpoints/%s/presenceDocs/messagingService", li.endpoint.szServer, ptrA(mir_urlEncode(li.endpoint.szId)))
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/endpoints/%s/presenceDocs/messagingService", li.endpoint.szServer, mir_urlEncode(li.endpoint.szId).c_str())
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h index fb75857195..70cc922fcd 100644 --- a/protocols/SkypeWeb/src/requests/endpoint.h +++ b/protocols/SkypeWeb/src/requests/endpoint.h @@ -37,7 +37,7 @@ class DeleteEndpointRequest : public HttpRequest {
public:
DeleteEndpointRequest(LoginInfo &li) :
- HttpRequest(REQUEST_DELETE, FORMAT, "%s/v1/users/ME/endpoints/%s", li.endpoint.szServer, ptrA(mir_urlEncode(li.endpoint.szId)))
+ HttpRequest(REQUEST_DELETE, FORMAT, "%s/v1/users/ME/endpoints/%s", li.endpoint.szServer, mir_urlEncode(li.endpoint.szId).c_str())
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h index 28a4816c02..2f82821b31 100644 --- a/protocols/SkypeWeb/src/requests/history.h +++ b/protocols/SkypeWeb/src/requests/history.h @@ -50,7 +50,7 @@ class GetHistoryRequest : public HttpRequest {
public:
GetHistoryRequest(const char *username, int pageSize, bool isChat, LONGLONG timestamp, LoginInfo &li) :
- HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations/%d:%s/messages", li.endpoint.szServer, isChat ? 19 : 8, ptrA(mir_urlEncode(username)))
+ HttpRequest(REQUEST_GET, FORMAT, "%s/v1/users/ME/conversations/%d:%s/messages", li.endpoint.szServer, isChat ? 19 : 8, mir_urlEncode(username).c_str())
{
Url
<< LONG_VALUE("startTime", timestamp)
diff --git a/protocols/SkypeWeb/src/requests/login.h b/protocols/SkypeWeb/src/requests/login.h index 703cc89f62..a76dd3d15d 100644 --- a/protocols/SkypeWeb/src/requests/login.h +++ b/protocols/SkypeWeb/src/requests/login.h @@ -32,9 +32,9 @@ public: Body
<< CHAR_VALUE("scopes", "client")
- << CHAR_VALUE("clientVersion", ptrA(mir_urlEncode("0/7.4.85.102/259/")))
- << CHAR_VALUE("username", ptrA(mir_urlEncode(username)))
- << CHAR_VALUE("passwordHash", pass_ptrA(mir_urlEncode(ptrA(mir_base64_encode(digest, sizeof(digest))))));
+ << CHAR_VALUE("clientVersion", mir_urlEncode("0/7.4.85.102/259/").c_str())
+ << CHAR_VALUE("username", mir_urlEncode(username).c_str())
+ << CHAR_VALUE("passwordHash", mir_urlEncode(ptrA(mir_base64_encode(digest, sizeof(digest)))).c_str());
}
};
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 6e020d0a4c..d2cf5d69dc 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -70,7 +70,7 @@ class SendTypingRequest : public HttpRequest {
public:
SendTypingRequest(const char *username, int iState, LoginInfo &li) :
- HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", li.endpoint.szServer, ptrA(mir_urlEncode(username)))
+ HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", li.endpoint.szServer, mir_urlEncode(username).c_str())
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
diff --git a/protocols/SkypeWeb/src/requests/mslogin.h b/protocols/SkypeWeb/src/requests/mslogin.h index cbfd5815a1..7064847454 100644 --- a/protocols/SkypeWeb/src/requests/mslogin.h +++ b/protocols/SkypeWeb/src/requests/mslogin.h @@ -28,7 +28,7 @@ public: Url
<< INT_VALUE ("client_id", 578134)
- << CHAR_VALUE ("redirect_uri", ptrA(mir_urlEncode("https://web.skype.com")));
+ << CHAR_VALUE ("redirect_uri", mir_urlEncode("https://web.skype.com"));
}
LoginMSRequest(const char *login, const char *password, const char *cookies_str, const char *ppft) :
HttpRequest(REQUEST_POST, "login.live.com/ppsecure/post.srf")
@@ -42,8 +42,8 @@ public: << CHAR_VALUE ("Cookie", cookies_str);
Body
- << CHAR_VALUE ("login", ptrA(mir_urlEncode(login)))
- << CHAR_VALUE ("passwd", ptrA(mir_urlEncode(password)))
+ << CHAR_VALUE ("login", mir_urlEncode(login))
+ << CHAR_VALUE ("passwd", mir_urlEncode(password))
<< CHAR_VALUE ("PPFT", ppft);
}
LoginMSRequest(const char *t) :
@@ -51,16 +51,16 @@ public: {
Url
<< INT_VALUE ("client_id", 578134)
- << CHAR_VALUE ("redirect_uri", ptrA(mir_urlEncode("https://web.skype.com")));
+ << CHAR_VALUE ("redirect_uri", mir_urlEncode("https://web.skype.com"));
Headers
<< CHAR_VALUE ("Content-Type", "application/x-www-form-urlencoded");
Body
- << CHAR_VALUE ("t", ptrA(mir_urlEncode(t)))
+ << CHAR_VALUE ("t", mir_urlEncode(t))
<< INT_VALUE ("oauthPartner", 999)
<< INT_VALUE ("client_id", 578134)
- << CHAR_VALUE ("redirect_uri", ptrA(mir_urlEncode("https://web.skype.com")));
+ << CHAR_VALUE ("redirect_uri", mir_urlEncode("https://web.skype.com"));
}
LoginMSRequest(const char *t, int) :
@@ -68,16 +68,16 @@ public: {
Url
<< INT_VALUE ("client_id", 578134)
- << CHAR_VALUE ("redirect_uri", ptrA(mir_urlEncode("https://web.skype.com")));
+ << CHAR_VALUE ("redirect_uri", mir_urlEncode("https://web.skype.com"));
Headers
<< CHAR_VALUE ("Content-Type", "application/x-www-form-urlencoded");
Body
- << CHAR_VALUE ("t", ptrA(mir_urlEncode(t)))
+ << CHAR_VALUE ("t", mir_urlEncode(t))
<< INT_VALUE ("oauthPartner", 999)
<< INT_VALUE ("client_id", 578134)
- << CHAR_VALUE ("redirect_uri", ptrA(mir_urlEncode("https://web.skype.com")));
+ << CHAR_VALUE ("redirect_uri", mir_urlEncode("https://web.skype.com"));
}
LoginMSRequest(const char *url, const char *login, const char *cookies_str, const char *ppft, const char *code) :
@@ -88,9 +88,9 @@ public: Body
<< CHAR_VALUE ("oct", code)
<< INT_VALUE ("AdTD", 1)
- << CHAR_VALUE ("login", ptrA(mir_urlEncode(login)))
+ << CHAR_VALUE ("login", mir_urlEncode(login))
<< INT_VALUE ("type", 19)
- << CHAR_VALUE ("PPFT", ptrA(mir_urlEncode(ppft)));
+ << CHAR_VALUE ("PPFT", mir_urlEncode(ppft));
}
};
diff --git a/protocols/SkypeWeb/src/requests/oauth.h b/protocols/SkypeWeb/src/requests/oauth.h index 6b5fba438d..b633e04db8 100644 --- a/protocols/SkypeWeb/src/requests/oauth.h +++ b/protocols/SkypeWeb/src/requests/oauth.h @@ -47,8 +47,8 @@ public: << CHAR_VALUE("Cookie", cookies); Body - << CHAR_VALUE("login", ptrA(mir_urlEncode(login))) - << CHAR_VALUE("passwd", ptrA(mir_urlEncode(password))) + << CHAR_VALUE("login", mir_urlEncode(login)) + << CHAR_VALUE("passwd", mir_urlEncode(password)) << CHAR_VALUE("PPFT", ppft); } @@ -59,7 +59,7 @@ public: << CHAR_VALUE ("Content-Type", "application/x-www-form-urlencoded"); Body - << CHAR_VALUE ("t", ptrA(mir_urlEncode(t))) + << CHAR_VALUE ("t", mir_urlEncode(t)) << CHAR_VALUE("site_name", "lw.skype.com") << INT_VALUE ("oauthPartner", 999); } diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h index 5441b4092a..7373a4ec57 100644 --- a/protocols/SkypeWeb/src/requests/trouter.h +++ b/protocols/SkypeWeb/src/requests/trouter.h @@ -118,7 +118,7 @@ public: << CHAR_VALUE("v", "v2")
<< INT_VALUE("p", 443)
<< CHAR_VALUE("ccid", ccid.c_str())
- << CHAR_VALUE("tc", ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}")))
+ << CHAR_VALUE("tc", mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}"))
<< LONG_VALUE("t", time(NULL) * 1000);
Headers
@@ -146,7 +146,7 @@ public: << CHAR_VALUE("v", "v2")
<< INT_VALUE("p", 443)
<< CHAR_VALUE("ccid", ccid.c_str())
- << CHAR_VALUE("tc", ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}")))
+ << CHAR_VALUE("tc", mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}"))
<< LONG_VALUE("t", time(NULL) * 1000);
Headers
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index eac043d5d4..28a3a32344 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -27,8 +27,7 @@ void CSkypeProto::SearchBasicThread(void* id) {
debugLogA("CSkypeProto::OnSearchBasicThread");
if (IsOnline()) {
- ptrA szString(mir_urlEncode(T2Utf((wchar_t*)id)));
- SendRequest(new GetSearchRequest(szString, li), &CSkypeProto::OnSearch);
+ SendRequest(new GetSearchRequest(mir_urlEncode(T2Utf((wchar_t*)id)), li), &CSkypeProto::OnSearch);
}
}
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h index bf477f5cd3..bf98658877 100644 --- a/protocols/SkypeWeb/src/stdafx.h +++ b/protocols/SkypeWeb/src/stdafx.h @@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_chat_int.h>
#include <m_genmenu.h>
#include <m_clc.h>
-#include <m_string.h>
#include <m_json.h>
#include <m_gui.h>
#include <m_imgsrvc.h>
|