From 499aee4b2b43b2835a4fb13410cd195fb5a4311a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jan 2017 15:28:56 +0300 Subject: message acks: read confirmations --- protocols/Discord/src/proto.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'protocols/Discord/src/proto.h') diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 21f59e3377..f9a0c99481 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -173,6 +173,9 @@ class CDiscordProto : public PROTO SnowFlake m_ownId; + mir_cs csMarkReadQueue; + LIST arMarkReadQueue; + OBJLIST arUsers; CDiscordUser* FindUser(SnowFlake id); CDiscordUser* FindUser(const wchar_t *pwszUsername, int iDiscriminator); @@ -222,6 +225,7 @@ public: int __cdecl OnModulesLoaded(WPARAM, LPARAM); int __cdecl OnPreShutdown(WPARAM, LPARAM); int __cdecl OnOptionsInit(WPARAM, LPARAM); + int __cdecl OnDbEventRead(WPARAM, LPARAM); // dispatch commands void OnCommandMessage(const JSONNode&); @@ -238,6 +242,7 @@ public: void OnReceiveFriends(NETLIBHTTPREQUEST*, AsyncHttpRequest*); void OnReceiveGateway(NETLIBHTTPREQUEST*, AsyncHttpRequest*); void OnReceiveGuilds(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + void OnReceiveMessage(NETLIBHTTPREQUEST*, AsyncHttpRequest*); void OnReceiveMessageAck(NETLIBHTTPREQUEST*, AsyncHttpRequest*); void OnReceiveToken(NETLIBHTTPREQUEST*, AsyncHttpRequest*); @@ -255,6 +260,8 @@ public: CMStringW GetAvatarFilename(MCONTACT hContact); - static void CALLBACK HeartbeatTimerProc(HWND hwnd, UINT msg, UINT_PTR id, DWORD); __forceinline int getHeartbeatInterval() const { return m_iHartbeatInterval; } + + static void CALLBACK HeartbeatTimerProc(HWND hwnd, UINT msg, UINT_PTR id, DWORD); + static void CALLBACK MarkReadTimerProc(HWND hwnd, UINT msg, UINT_PTR id, DWORD); }; -- cgit v1.2.3