From 4330c62d2fa5b2752036b43018044c7c01b10695 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 12 Aug 2014 18:28:50 +0000 Subject: Tox: contact name, status, status message saving git-svn-id: http://svn.miranda-ng.org/main/trunk@10167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.h | 11 +++++++---- 1 file changed, 7 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 f443528421..53c1c3bf7d 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -99,17 +99,19 @@ private: static void OnFriendRequest(Tox *tox, const uint8_t *userId, const uint8_t *message, const uint16_t messageSize, void *arg); static void OnFriendMessage(Tox *tox, const int friendnumber, const uint8_t *message, const uint16_t messageSize, void *arg); - static void OnFriendNameChange(Tox *tox, const int friendId, const uint8_t *name, const uint16_t nameSize, void *arg); - static void OnStatusMessageChanged(Tox *tox, const int friendId, const uint8_t* message, const uint16_t messageSize, void *arg); - static void OnUserStatusChanged(Tox *tox, int32_t friendnumber, uint8_t TOX_USERSTATUS, void *userdata); + static void OnFriendNameChange(Tox *tox, const int friendnumber, const uint8_t *name, const uint16_t nameSize, void *arg); + static void OnStatusMessageChanged(Tox *tox, const int friendnumber, const uint8_t* message, const uint16_t messageSize, void *arg); + static void OnUserStatusChanged(Tox *tox, int32_t friendnumber, uint8_t usertatus, void *arg); static void OnConnectionStatusChanged(Tox *tox, const int friendId, const uint8_t status, void *arg); static void OnAction(Tox *tox, const int friendId, const uint8_t *message, const uint16_t messageSize, void *arg); static void OnReadReceipt(Tox *tox, int32_t friendnumber, uint32_t receipt, void *arg); // contacts + void SetContactStatus(MCONTACT hContact, WORD status); + void SetAllContactsStatus(WORD status); bool IsProtoContact(MCONTACT hContact); MCONTACT FindContact(const char *clientId); - MCONTACT AddContact(const char *clientId, const char *nick, bool isHidden = false); + MCONTACT AddContact(const char *clientId, bool isHidden = false); void LoadContactList(); @@ -121,6 +123,7 @@ private: // utils TOX_USERSTATUS MirandaToToxStatus(int status); + int ToxToMirandaStatus(TOX_USERSTATUS userstatus); HANDLE AddDbEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob); -- cgit v1.2.3