diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-27 16:11:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-27 16:11:15 +0300 |
commit | 49e856bee9b637156e659dcf0e65180dd5a4e077 (patch) | |
tree | 7c753bc2bdeda08956101d1b4604ec063989c2a8 /protocols/SkypeWeb/src/requests/search.h | |
parent | 59bcd6091e2332308e4aac5a05d3b719f15aa031 (diff) |
SkypeWeb:
- massive code cleanup, old http junk wiped out & replaced with standard MHttpRequest class
- old MS login code removed;
- basic url replaced with modern one;
Diffstat (limited to 'protocols/SkypeWeb/src/requests/search.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/search.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/SkypeWeb/src/requests/search.h b/protocols/SkypeWeb/src/requests/search.h index 275c5df80f..3df9f2fda2 100644 --- a/protocols/SkypeWeb/src/requests/search.h +++ b/protocols/SkypeWeb/src/requests/search.h @@ -18,23 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef _SKYPE_REQUEST_SEARCH_H_
#define _SKYPE_REQUEST_SEARCH_H_
-class GetSearchRequest : public HttpRequest
+struct GetSearchRequest : public AsyncHttpRequest
{
-public:
GetSearchRequest(const char *string, CSkypeProto *ppro) :
- HttpRequest(REQUEST_GET, "skypegraph.skype.com/search/v1.1/namesearch/swx/")
+ AsyncHttpRequest(REQUEST_GET, "skypegraph.skype.com/search/v1.1/namesearch/swx/", &CSkypeProto::OnSearch)
{
+ this << CHAR_PARAM("requestid", "skype.com-1.48.78-00000000-0000-0000-0000-000000000000")
+ << CHAR_PARAM("locale", "en-US") << CHAR_PARAM("searchstring", string);
- wchar_t locale[LOCALE_NAME_MAX_LENGTH] = L"en-US";
- //LCIDToLocaleName(Langpack_GetDefaultLocale(), locale, _countof(locale), 0); //FIXME: xp support
-
- Url
- << CHAR_VALUE("requestid", "skype.com-1.48.78-00000000-0000-0000-0000-000000000000")
- << CHAR_VALUE("locale", T2Utf(locale))
- << CHAR_VALUE("searchstring", string);
- Headers
- << CHAR_VALUE("Accept", "application/json")
- << CHAR_VALUE("X-Skypetoken", ppro->m_szApiToken);
+ AddHeader("Accept", "application/json");
+ AddHeader("X-Skypetoken", ppro->m_szApiToken);
}
};
|