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/profile.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/profile.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/profile.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/requests/profile.h b/protocols/SkypeWeb/src/requests/profile.h index 13e5e50724..5f872b7fe8 100644 --- a/protocols/SkypeWeb/src/requests/profile.h +++ b/protocols/SkypeWeb/src/requests/profile.h @@ -18,15 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef _SKYPE_REQUEST_PROFILE_H_
#define _SKYPE_REQUEST_PROFILE_H_
-class GetProfileRequest : public HttpRequest
+struct GetProfileRequest : public AsyncHttpRequest
{
-public:
- GetProfileRequest(CSkypeProto *ppro, const char *skypename = "self") :
- HttpRequest(REQUEST_GET, FORMAT, "api.skype.com/users/%s/profile", skypename)
+ GetProfileRequest(CSkypeProto *ppro, MCONTACT hContact) :
+ AsyncHttpRequest(REQUEST_GET, 0, &CSkypeProto::LoadProfile)
{
- Headers
- << CHAR_VALUE("X-Skypetoken", ppro->m_szApiToken)
- << CHAR_VALUE("Accept", "application/json");
+ m_szUrl.Format("api.skype.com/users/%s/profile", (hContact == 0) ? "self" : ppro->getId(hContact).c_str());
+ pUserInfo = (void *)hContact;
+
+ AddHeader("X-Skypetoken", ppro->m_szApiToken);
+ AddHeader("Accept", "application/json");
}
};
|