From 5abf533213e126786cb859be514656a9fb3a514f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 24 Feb 2015 18:19:08 +0000 Subject: Tox: messages refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@12261 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'protocols/Tox/src/tox_proto.h') diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 66225cc626..40b586e0ed 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -143,6 +143,8 @@ private: MCONTACT GetContactFromAuthEvent(MEVENT hEvent); + int32_t GetToxFriendNumber(MCONTACT hContact); + void __cdecl LoadFriendList(void*); static void OnFriendRequest(Tox *tox, const uint8_t *pubKey, const uint8_t *message, const uint16_t messageSize, void *arg); @@ -184,10 +186,12 @@ private: static INT_PTR CALLBACK ChatRoomInviteProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // messages - static void OnFriendMessage(Tox *tox, const int number, const uint8_t *message, const uint16_t messageSize, void *arg); - static void OnFriendAction(Tox *tox, const int number, const uint8_t *action, const uint16_t actionSize, void *arg); - static void OnTypingChanged(Tox *tox, const int number, uint8_t isTyping, void *arg); - static void OnReadReceipt(Tox *tox, int32_t number, uint32_t receipt, void *arg); + void RegisterIncomingMessage(const int friendNumber, const uint8_t *message, const uint16_t messageSize); + + static void OnFriendMessage(Tox *tox, const int friendNumber, const uint8_t *message, const uint16_t messageSize, void *arg); + static void OnFriendAction(Tox *tox, const int friendNumber, const uint8_t *action, const uint16_t actionSize, void *arg); + static void OnTypingChanged(Tox *tox, const int friendNumber, uint8_t isTyping, void *arg); + static void OnReadReceipt(Tox *tox, int32_t friendNumber, uint32_t receipt, void *arg); int __cdecl OnPreCreateMessage(WPARAM wParam, LPARAM lParam); -- cgit v1.2.3