summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-25 18:32:33 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-25 18:32:33 +0000
commit0a776a22a99c20a23763aac28209a00a36126b7b (patch)
tree57f77054ea993310d92c54448f2896d008a9800c /protocols/Tox/src/tox_proto.h
parent9afd590f4fd860d3d023203137129c8870bb8579 (diff)
Tox:
- updated tox core - fixdd contacts adding - some code for file sending git-svn-id: http://svn.miranda-ng.org/main/trunk@10320 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.h')
-rw-r--r--protocols/Tox/src/tox_proto.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index 1154f58a59..addeec0037 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -1,7 +1,7 @@
#ifndef _TOX_PROTO_H_
#define _TOX_PROTO_H_
-#include "common.h"
+class CFile;
struct CToxProto : public PROTO<CToxProto>
{
@@ -75,6 +75,8 @@ private:
bool isTerminated;
bool isConnected;
HANDLE hNetlibUser;
+ ULONG hFileProcess;
+ LIST<CFile> fileSendQueue;
// tox
void InitToxCore();
@@ -116,6 +118,9 @@ private:
static void OnConnectionStatusChanged(Tox *tox, const int number, const uint8_t status, void *arg);
static void OnReadReceipt(Tox *tox, int32_t number, uint32_t receipt, void *arg);
+ //static void OnFileControlCallback(Tox *tox, int32_t number, uint8_t hFile, uint64_t fileSize, uint8_t *name, uint16_t nameSize, void *arg);
+ static void OnFileRequest(Tox *tox, int32_t number, uint8_t isSend, uint8_t fileNumber, uint8_t type, const uint8_t *data, uint16_t length, void *arg);
+
// contacts
WORD GetContactStatus(MCONTACT hContact);
bool IsContactOnline(MCONTACT hContact);
@@ -133,6 +138,10 @@ private:
void __cdecl SearchByIdAsync(void* arg);
void __cdecl SearchByNameAsync(void* arg);
+ // file transfer
+ static int FileSendQueueCompare(const CFile* p1, const CFile* p2);
+ void __cdecl SendFilesAsync(void* arg);
+
// utils
TOX_USERSTATUS MirandaToToxStatus(int status);
int ToxToMirandaStatus(TOX_USERSTATUS userstatus);