From 4de8269dcabbd57e506b85e8285b83229bc30158 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Jul 2019 14:18:59 +0300 Subject: Steam: - fixes #1114 (Contact/auth requests do not work as intended) - massive code cleaning; - version bump --- protocols/Steam/src/steam_proto.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'protocols/Steam/src/steam_proto.h') diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 9fe393f51b..2fe4b12f36 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -36,11 +36,17 @@ struct RequestQueueItem void *param; RequestQueueItem(HttpRequest *request) - : request(request), httpCallback(nullptr), jsonCallback(nullptr), param(nullptr) {} + : request(request), httpCallback(nullptr), jsonCallback(nullptr), param(nullptr) + { + } RequestQueueItem(HttpRequest *request, HttpCallback callback, void *param) - : request(request), httpCallback(callback), jsonCallback(nullptr), param(param) {} + : request(request), httpCallback(callback), jsonCallback(nullptr), param(param) + { + } RequestQueueItem(HttpRequest *request, JsonCallback callback, void *param) - : request(request), httpCallback(nullptr), jsonCallback(callback), param(param) {} + : request(request), httpCallback(nullptr), jsonCallback(callback), param(param) + { + } }; class CSteamProto : public PROTO @@ -126,7 +132,7 @@ protected: // login bool IsOnline(); bool IsMe(const char *steamId); - + void Login(); void Logout(); @@ -183,7 +189,7 @@ protected: void OnSearchByNameStarted(const HttpResponse &response, void *arg); // messages - int OnSendMessage(MCONTACT hContact, const char* message); + int OnSendMessage(MCONTACT hContact, const char *message); void OnMessageSent(const HttpResponse &response, void *arg); int __cdecl OnPreCreateMessage(WPARAM, LPARAM lParam); @@ -244,7 +250,8 @@ protected: INT_PTR __cdecl OnGetEventTextChatStates(WPARAM wParam, LPARAM lParam); // helpers - inline int IdleSeconds() { + inline int IdleSeconds() + { // Based on idle time we report Steam server will mark us as online/away/snooze switch (m_iStatus) { case ID_STATUS_AWAY: @@ -284,4 +291,4 @@ struct CMPlugin : public ACCPROTOPLUGIN int OnReloadIcons(WPARAM wParam, LPARAM lParam); void SetContactExtraIcon(MCONTACT hContact, int status); -#endif //_STEAM_PROTO_H_ \ No newline at end of file +#endif //_STEAM_PROTO_H_ -- cgit v1.2.3