summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/pending.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/api/pending.h')
-rw-r--r--protocols/Steam/src/api/pending.h51
1 files changed, 15 insertions, 36 deletions
diff --git a/protocols/Steam/src/api/pending.h b/protocols/Steam/src/api/pending.h
index b8e8e6e15f..bcac0170cc 100644
--- a/protocols/Steam/src/api/pending.h
+++ b/protocols/Steam/src/api/pending.h
@@ -1,13 +1,12 @@
#ifndef _STEAM_REQUEST_PENDING_H_
#define _STEAM_REQUEST_PENDING_H_
-class ApprovePendingRequest : public HttpRequest
+struct ApprovePendingRequest : public HttpRequest
{
-public:
- ApprovePendingRequest(const char *token, const char *sessionId, const char *steamId, const char *who) :
+ ApprovePendingRequest(const char *token, const char *sessionId, int64_t steamId, const char *who) :
HttpRequest(REQUEST_POST, "")
{
- m_szUrl.Format(STEAM_WEB_URL "/profiles/%s/home_process", steamId);
+ m_szUrl.Format(STEAM_WEB_URL "/profiles/%lld/home_process", steamId);
char cookie[MAX_PATH];
mir_snprintf(cookie, "steamLogin=%s||oauth:%s;sessionid=%s;mobileClientVersion=1291812;forceMobile=1;mobileClient=ios",
@@ -15,24 +14,17 @@ public:
AddHeader("Cookie", cookie);
- this
- << CHAR_PARAM("sessionID", sessionId)
- << CHAR_PARAM("id", who)
- << CHAR_PARAM("perform", "accept")
- << CHAR_PARAM("action", "approvePending")
- << CHAR_PARAM("itype", "friend")
- << INT_PARAM("json", 1)
- << INT_PARAM("xml", 0);
+ this << CHAR_PARAM("sessionID", sessionId) << CHAR_PARAM("id", who) << CHAR_PARAM("perform", "accept")
+ << CHAR_PARAM("action", "approvePending") << CHAR_PARAM("itype", "friend") << INT_PARAM("json", 1) << INT_PARAM("xml", 0);
}
};
-class IgnorePendingRequest : public HttpRequest
+struct IgnorePendingRequest : public HttpRequest
{
-public:
- IgnorePendingRequest(const char *token, const char *sessionId, const char *steamId, const char *who) :
+ IgnorePendingRequest(const char *token, const char *sessionId, int64_t steamId, const char *who) :
HttpRequest(REQUEST_POST, "")
{
- m_szUrl.Format(STEAM_WEB_URL "/profiles/%s/home_process", steamId);
+ m_szUrl.Format(STEAM_WEB_URL "/profiles/%lld/home_process", steamId);
char cookie[MAX_PATH];
mir_snprintf(cookie, "steamLogin=%s||oauth:%s;sessionid=%s;mobileClientVersion=1291812;forceMobile=1;mobileClient=ios",
@@ -40,24 +32,17 @@ public:
AddHeader("Cookie", cookie);
- this
- << CHAR_PARAM("sessionID", sessionId)
- << CHAR_PARAM("id", who)
- << CHAR_PARAM("perform", "ignore")
- << CHAR_PARAM("action", "approvePending")
- << CHAR_PARAM("itype", "friend")
- << INT_PARAM("json", 1)
- << INT_PARAM("xml", 0);
+ this << CHAR_PARAM("sessionID", sessionId) << CHAR_PARAM("id", who) << CHAR_PARAM("perform", "ignore")
+ << CHAR_PARAM("action", "approvePending") << CHAR_PARAM("itype", "friend") << INT_PARAM("json", 1) << INT_PARAM("xml", 0);
}
};
-class BlockPendingRequest : public HttpRequest
+struct BlockPendingRequest : public HttpRequest
{
-public:
- BlockPendingRequest(const char *token, const char *sessionId, const char *steamId, const char *who) :
+ BlockPendingRequest(const char *token, const char *sessionId, int64_t steamId, const char *who) :
HttpRequest(REQUEST_POST, "")
{
- m_szUrl.Format(STEAM_WEB_URL "/profiles/%s/home_process", steamId);
+ m_szUrl.Format(STEAM_WEB_URL "/profiles/%lld/home_process", steamId);
char cookie[MAX_PATH];
mir_snprintf(cookie, "steamLogin=%s||oauth:%s;sessionid=%s;mobileClientVersion=1291812;forceMobile=1;mobileClient=ios",
@@ -65,14 +50,8 @@ public:
AddHeader("Cookie", cookie);
- this
- << CHAR_PARAM("sessionID", sessionId)
- << CHAR_PARAM("id", who)
- << CHAR_PARAM("perform", "block")
- << CHAR_PARAM("action", "approvePending")
- << CHAR_PARAM("itype", "friend")
- << INT_PARAM("json", 1)
- << INT_PARAM("xml", 0);
+ this << CHAR_PARAM("sessionID", sessionId) << CHAR_PARAM("id", who) << CHAR_PARAM("perform", "block")
+ << CHAR_PARAM("action", "approvePending") << CHAR_PARAM("itype", "friend") << INT_PARAM("json", 1) << INT_PARAM("xml", 0);
}
};