summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-01 09:23:58 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-01 09:23:58 +0000
commit09fa77d73829e76123ac7a9b73bc90def12e9d9c (patch)
tree20c5e5a4fc83c672e0505db662e88c16635c5d9d /protocols/Tox/src/tox_proto.h
parenta76b0175b2cb203f4a0cc68c99588f23ef945eb6 (diff)
Tox:
- refactoring - updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@11970 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.h')
-rw-r--r--protocols/Tox/src/tox_proto.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index eab3eb509b..03fdfa1a78 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -68,7 +68,7 @@ private:
char *password;
mir_cs toxLock;
TCHAR *accountName;
- HANDLE hNetlib, hPollingThread, hToxEvent;
+ HANDLE hNetlib, hPollingThread;
bool isTerminated, isConnected;
CTransferList *transfers;
@@ -119,18 +119,19 @@ private:
WORD GetContactStatus(MCONTACT hContact);
void SetContactStatus(MCONTACT hContact, WORD status);
void SetAllContactsStatus(WORD status);
- bool IsMe(const std::string &id);
- MCONTACT FindContact(const std::string &id);
- MCONTACT FindContact(const int friendNumber);
- MCONTACT AddContact(const std::string &id, const std::tstring &dnsId, bool isTemporary = false);
+
+ MCONTACT GetContact(const int friendNumber);
+ MCONTACT GetContact(const char *pubKey);
+
+ MCONTACT AddContact(const char *address, const std::tstring &dnsId, bool isTemporary = false);
MCONTACT GetContactFromAuthEvent(MEVENT hEvent);
- void LoadFriendList();
+ void __cdecl LoadFriendList(void*);
int __cdecl OnContactDeleted(MCONTACT, LPARAM);
- static void OnFriendRequest(Tox *tox, const uint8_t *address, const uint8_t *message, const uint16_t messageSize, void *arg);
+ static void OnFriendRequest(Tox *tox, const uint8_t *pubKey, const uint8_t *message, const uint16_t messageSize, void *arg);
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);
@@ -178,11 +179,6 @@ private:
static void ShowNotification(const TCHAR *caption, const TCHAR *message, int flags = 0, MCONTACT hContact = NULL);
MEVENT AddDbEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob);
-
- std::vector<uint8_t> HexStringToData(std::string hex);
- std::string DataToHexString(std::vector<uint8_t>);
-
- std::string ToxAddressToId(std::string);
static bool IsFileExists(std::tstring path);
};