summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_transfers.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-30 11:37:47 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-30 11:37:47 +0000
commitce49c84f3a26f016f9232d2bffdc830d7fd6169f (patch)
treec6bbdab7b5a42f65461a5d495d962c4ff69b9e97 /protocols/Tox/src/tox_transfers.cpp
parentbeaf93e92827b7bcc77c9f6b2a0c7097d355151c (diff)
Tox:
- switch to offline when connection is lost - file transfer support - code refactoring - project reordering - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@10340 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_transfers.cpp')
-rw-r--r--protocols/Tox/src/tox_transfers.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/protocols/Tox/src/tox_transfers.cpp b/protocols/Tox/src/tox_transfers.cpp
deleted file mode 100644
index 51bab8aac3..0000000000
--- a/protocols/Tox/src/tox_transfers.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "common.h"
-
-void CToxProto::SendFileAsync(void* arg)
-{
- CFile *file = (CFile*)arg;
- const CFileTransfer *transfer = file->GetTransfer();
- CToxProto *proto = (CToxProto*)transfer->GetProtoInstance();
-}
-
-void CToxProto::SendFilesAsync(void* arg)
-{
- CFileTransfer *transfer = (CFileTransfer*)arg;
-
- std::string toxId(getStringA(transfer->GetContactHandle(), TOX_SETTINGS_ID));
- std::vector<uint8_t> clientId = HexStringToData(toxId);
-
- uint32_t number = tox_get_friend_number(tox, clientId.data());
-
- for (int i = 0; transfer->GetFileCount(); i++)
- {
- CFile *file = transfer->GetFileAt(i);
-
- int hFile = tox_new_file_sender(tox, number, file->GetSize(), (uint8_t*)file->GetName(), strlen(file->GetName()));
- if (hFile < 0)
- {
- debugLogA("CToxProto::SendFilesAsync: cannot send file");
- }
- file->SetNumber(hFile);
-
- transfer->Wait();
- }
-}
-
-CFileTransfer *CToxProto::GetFileTransferByFileNumber(int fileNumber)
-{
- for (int i = 0; fileTransfers.getCount(); i++)
- {
- if (fileTransfers[i]->HasFile(fileNumber))
- {
- return fileTransfers[i];
- }
- }
- return NULL;
-} \ No newline at end of file