diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-26 19:15:20 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-26 19:15:20 +0000 |
commit | ab75f8e4a3968c956425844415237a4fa6fcee63 (patch) | |
tree | df2c209dd0197dc3085546606b0581d63f9114ad /protocols/Steam/src/api/login.h | |
parent | 4e9e885747b2037c81ce809f7f6505f8bc8b0e2f (diff) |
Steam: merge new api
git-svn-id: http://svn.miranda-ng.org/main/trunk@13850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/api/login.h')
-rw-r--r-- | protocols/Steam/src/api/login.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/protocols/Steam/src/api/login.h b/protocols/Steam/src/api/login.h new file mode 100644 index 0000000000..64b41f07cb --- /dev/null +++ b/protocols/Steam/src/api/login.h @@ -0,0 +1,32 @@ +#ifndef _STEAM_REQUEST_LOGIN_H_
+#define _STEAM_REQUEST_LOGIN_H_
+
+class LogonRequest : public HttpRequest
+{
+public:
+ LogonRequest(const char *token) :
+ HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logon/v0001")
+ {
+ char data[256];
+ mir_snprintf(data, SIZEOF(data), "access_token=%s&ui_mode=web", token);
+
+ SetData(data, strlen(data));
+ AddHeader("Content-Type", "application/x-www-form-urlencoded");
+ }
+};
+
+class LogoffRequest : public HttpRequest
+{
+public:
+ LogoffRequest(const char *token, const char *umqId) :
+ HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logoff/v0001")
+ {
+ char data[256];
+ mir_snprintf(data, SIZEOF(data), "access_token=%s&umqid=%s", token, umqId);
+
+ SetData(data, strlen(data));
+ AddHeader("Content-Type", "application/x-www-form-urlencoded");
+ }
+};
+
+#endif //_STEAM_REQUEST_LOGIN_H_
|