summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/poll.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/api/poll.h')
-rw-r--r--protocols/Steam/src/api/poll.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/Steam/src/api/poll.h b/protocols/Steam/src/api/poll.h
new file mode 100644
index 0000000000..fec71c98e4
--- /dev/null
+++ b/protocols/Steam/src/api/poll.h
@@ -0,0 +1,28 @@
+#ifndef _STEAM_REQUEST_POLL_H_
+#define _STEAM_REQUEST_POLL_H_
+
+class PollRequest : public HttpRequest
+{
+public:
+ PollRequest(const char *token, const char *umqId, UINT32 messageId, int idleSeconds) :
+ HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Poll/v0001")
+ {
+ timeout = (STEAM_API_TIMEOUT + 5) * 1000;
+ flags |= NLHRF_PERSISTENT;
+
+ CMStringA data;
+ data.AppendFormat("access_token=%s&umqid=%s&message=%u&secidletime=%d&sectimeout=%d",
+ token,
+ umqId,
+ messageId,
+ idleSeconds,
+ STEAM_API_TIMEOUT);
+
+ SetData(data, data.GetLength());
+
+ AddHeader("Connection", "keep-alive");
+ AddHeader("Content-Type", "application/x-www-form-urlencoded");
+ }
+};
+
+#endif //_STEAM_REQUEST_POLL_H_