Manages the file transfer service of toxcore.
More...
#include <corefile.h>
|
void | handleAvatarOffer (uint32_t friendId, uint32_t fileId, bool accept, uint64_t filesize) |
|
void | sendFile (uint32_t friendId, QString filename, QString filePath, long long filesize) |
|
void | sendAvatarFile (uint32_t friendId, const QByteArray &data) |
|
void | pauseResumeFile (uint32_t friendId, uint32_t fileId) |
|
void | cancelFileSend (uint32_t friendId, uint32_t fileId) |
|
void | cancelFileRecv (uint32_t friendId, uint32_t fileId) |
|
void | rejectFileRecvRequest (uint32_t friendId, uint32_t fileId) |
|
void | acceptFileRecvRequest (uint32_t friendId, uint32_t fileId, QString path) |
|
unsigned | corefileIterationInterval () |
| Get corefile iteration interval. More...
|
|
|
static constexpr uint64_t | getFriendKey (uint32_t friendId, uint32_t fileId) |
|
static void | connectCallbacks (Tox &tox) |
|
static void | onFileReceiveCallback (Tox *tox, uint32_t friendId, uint32_t fileId, uint32_t kind, uint64_t filesize, const uint8_t *fname, size_t fnameLen, void *vCore) |
|
static void | onFileControlCallback (Tox *tox, uint32_t friendId, uint32_t fileId, Tox_File_Control control, void *vCore) |
|
static void | onFileDataCallback (Tox *tox, uint32_t friendId, uint32_t fileId, uint64_t pos, size_t length, void *vCore) |
|
static void | onFileRecvChunkCallback (Tox *tox, uint32_t friendId, uint32_t fileId, uint64_t position, const uint8_t *data, size_t length, void *vCore) |
|
static QString | getCleanFileName (QString filename) |
|
Manages the file transfer service of toxcore.
Definition at line 46 of file corefile.h.
◆ CoreFile()
CoreFile::CoreFile |
( |
Tox * |
core, |
|
|
CompatibleRecursiveMutex & |
coreLoopLock |
|
) |
| |
|
private |
◆ acceptFileRecvRequest()
void CoreFile::acceptFileRecvRequest |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
QString |
path |
|
) |
| |
◆ addFile()
void CoreFile::addFile |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
const ToxFile & |
file |
|
) |
| |
|
private |
◆ cancelFileRecv()
void CoreFile::cancelFileRecv |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
◆ cancelFileSend()
void CoreFile::cancelFileSend |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
◆ connectCallbacks()
void CoreFile::connectCallbacks |
( |
Tox & |
tox | ) |
|
|
staticprivate |
◆ corefileIterationInterval()
unsigned CoreFile::corefileIterationInterval |
( |
| ) |
|
Get corefile iteration interval.
tox_iterate calls to get good file transfer performances
- Returns
- The maximum amount of time in ms that Core should wait between two tox_iterate() calls.
Definition at line 65 of file corefile.cpp.
◆ fileNameChanged
void CoreFile::fileNameChanged |
( |
const ToxPk & |
friendPk | ) |
|
|
signal |
◆ fileReceiveRequested
void CoreFile::fileReceiveRequested |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileSendFailed
void CoreFile::fileSendFailed |
( |
uint32_t |
friendId, |
|
|
const QString & |
fname |
|
) |
| |
|
signal |
◆ fileSendStarted
void CoreFile::fileSendStarted |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferAccepted
void CoreFile::fileTransferAccepted |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferBrokenUnbroken
void CoreFile::fileTransferBrokenUnbroken |
( |
ToxFile |
file, |
|
|
bool |
broken |
|
) |
| |
|
signal |
◆ fileTransferCancelled
void CoreFile::fileTransferCancelled |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferFinished
void CoreFile::fileTransferFinished |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferInfo
void CoreFile::fileTransferInfo |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferPaused
void CoreFile::fileTransferPaused |
( |
ToxFile |
file | ) |
|
|
signal |
◆ fileTransferRemotePausedUnpaused
void CoreFile::fileTransferRemotePausedUnpaused |
( |
ToxFile |
file, |
|
|
bool |
paused |
|
) |
| |
|
signal |
◆ findFile()
ToxFile * CoreFile::findFile |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
|
private |
◆ getCleanFileName()
QString CoreFile::getCleanFileName |
( |
QString |
filename | ) |
|
|
staticprivate |
◆ getFriendKey()
static constexpr uint64_t CoreFile::getFriendKey |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
|
inlinestaticconstexprprivate |
◆ handleAvatarOffer()
void CoreFile::handleAvatarOffer |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
bool |
accept, |
|
|
uint64_t |
filesize |
|
) |
| |
◆ makeCoreFile()
CoreFilePtr CoreFile::makeCoreFile |
( |
Core * |
core, |
|
|
Tox * |
tox, |
|
|
CompatibleRecursiveMutex & |
coreLoopLock |
|
) |
| |
|
static |
◆ onConnectionStatusChanged
void CoreFile::onConnectionStatusChanged |
( |
uint32_t |
friendId, |
|
|
Status::Status |
state |
|
) |
| |
|
privateslot |
◆ onFileControlCallback()
static void CoreFile::onFileControlCallback |
( |
Tox * |
tox, |
|
|
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
Tox_File_Control |
control, |
|
|
void * |
vCore |
|
) |
| |
|
staticprivate |
◆ onFileDataCallback()
static void CoreFile::onFileDataCallback |
( |
Tox * |
tox, |
|
|
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
uint64_t |
pos, |
|
|
size_t |
length, |
|
|
void * |
vCore |
|
) |
| |
|
staticprivate |
◆ onFileReceiveCallback()
static void CoreFile::onFileReceiveCallback |
( |
Tox * |
tox, |
|
|
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
uint32_t |
kind, |
|
|
uint64_t |
filesize, |
|
|
const uint8_t * |
fname, |
|
|
size_t |
fnameLen, |
|
|
void * |
vCore |
|
) |
| |
|
staticprivate |
◆ onFileRecvChunkCallback()
static void CoreFile::onFileRecvChunkCallback |
( |
Tox * |
tox, |
|
|
uint32_t |
friendId, |
|
|
uint32_t |
fileId, |
|
|
uint64_t |
position, |
|
|
const uint8_t * |
data, |
|
|
size_t |
length, |
|
|
void * |
vCore |
|
) |
| |
|
staticprivate |
◆ pauseResumeFile()
void CoreFile::pauseResumeFile |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
◆ rejectFileRecvRequest()
void CoreFile::rejectFileRecvRequest |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
◆ removeFile()
void CoreFile::removeFile |
( |
uint32_t |
friendId, |
|
|
uint32_t |
fileId |
|
) |
| |
|
private |
◆ sendAvatarFile()
void CoreFile::sendAvatarFile |
( |
uint32_t |
friendId, |
|
|
const QByteArray & |
data |
|
) |
| |
◆ sendFile()
void CoreFile::sendFile |
( |
uint32_t |
friendId, |
|
|
QString |
filename, |
|
|
QString |
filePath, |
|
|
long long |
filesize |
|
) |
| |
◆ coreLoopLock
CompatibleRecursiveMutex* CoreFile::coreLoopLock = nullptr |
|
private |
◆ fileMap
◆ tox
The documentation for this class was generated from the following files: