From 56b177cff6de7a1cef5e02d508fce4b53baddba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 21 Dec 2015 10:37:41 +0000 Subject: Steam: Implement loading history/offline messages at login (finally!) git-svn-id: http://svn.miranda-ng.org/main/trunk@15923 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/api/history.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 protocols/Steam/src/api/history.h (limited to 'protocols/Steam/src/api') diff --git a/protocols/Steam/src/api/history.h b/protocols/Steam/src/api/history.h new file mode 100644 index 0000000000..fc3c7c8a6b --- /dev/null +++ b/protocols/Steam/src/api/history.h @@ -0,0 +1,27 @@ +#ifndef _STEAM_REQUEST_HISTORY_H_ +#define _STEAM_REQUEST_HISTORY_H_ + +class GetConversationsRequest : public HttpRequest +{ +public: + GetConversationsRequest(const char *token) : + HttpRequest(REQUEST_GET, STEAM_API_URL "/IFriendMessagesService/GetActiveMessageSessions/v0001") + { + AddParameter("access_token", token); + } +}; + +class GetHistoryMessagesRequest : public HttpRequest +{ +public: + GetHistoryMessagesRequest(const char *token, const char *steamId, const char *who, time_t since) : + HttpRequest(REQUEST_GET, STEAM_API_URL "/IFriendMessagesService/GetRecentMessages/v0001") + { + AddParameter("access_token", token); + AddParameter("steamid1", steamId); + AddParameter("steamid2", who); + AddParameter("rtime32_start_time=%d", since); + } +}; + +#endif //_STEAM_REQUEST_HISTORY_H_ -- cgit v1.2.3