qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Types | Public Member Functions | Public Attributes | List of all members
ToxFile Struct Reference

#include <toxfile.h>

Collaboration diagram for ToxFile:
Collaboration graph

Public Types

enum  FileStatus {
  INITIALIZING = 0, PAUSED = 1, TRANSMITTING = 2, BROKEN = 3,
  CANCELED = 4, FINISHED = 5
}
 
enum  FileDirection : bool { SENDING = 0, RECEIVING = 1 }
 

Public Member Functions

 ToxFile ()
 
 ToxFile (uint32_t FileNum, uint32_t FriendId, QString FileName, QString filePath, uint64_t filesize, FileDirection Direction)
 ToxFile constructor. More...
 
bool operator== (const ToxFile &other) const
 
bool operator!= (const ToxFile &other) const
 
void setFilePath (QString path)
 
bool open (bool write)
 

Public Attributes

uint8_t fileKind
 Data file (default) or avatar. More...
 
uint32_t fileNum
 
uint32_t friendId
 
QString fileName
 
QString filePath
 
std::shared_ptr< QFile > file
 
FileStatus status
 
FileDirection direction
 
QByteArray avatarData
 
QByteArray resumeFileId
 
std::shared_ptr< QCryptographicHash > hashGenerator = std::make_shared<QCryptographicHash>(QCryptographicHash::Sha256)
 
ToxFilePause pauseStatus
 
ToxFileProgress progress
 

Detailed Description

Definition at line 32 of file toxfile.h.

Member Enumeration Documentation

◆ FileDirection

Enumerator
SENDING 
RECEIVING 

Definition at line 48 of file toxfile.h.

◆ FileStatus

Enumerator
INITIALIZING 
PAUSED 
TRANSMITTING 
BROKEN 
CANCELED 
FINISHED 

Definition at line 36 of file toxfile.h.

Constructor & Destructor Documentation

◆ ToxFile() [1/2]

ToxFile::ToxFile ( )

Definition at line 37 of file toxfile.cpp.

◆ ToxFile() [2/2]

ToxFile::ToxFile ( uint32_t  FileNum,
uint32_t  FriendId,
QString  FileName,
QString  filePath,
uint64_t  filesize,
FileDirection  Direction 
)

ToxFile constructor.

Definition at line 49 of file toxfile.cpp.

Member Function Documentation

◆ open()

bool ToxFile::open ( bool  write)

Definition at line 79 of file toxfile.cpp.

◆ operator!=()

bool ToxFile::operator!= ( const ToxFile other) const

Definition at line 68 of file toxfile.cpp.

◆ operator==()

bool ToxFile::operator== ( const ToxFile other) const

Definition at line 62 of file toxfile.cpp.

◆ setFilePath()

void ToxFile::setFilePath ( QString  path)

Definition at line 73 of file toxfile.cpp.

Member Data Documentation

◆ avatarData

QByteArray ToxFile::avatarData

Definition at line 72 of file toxfile.h.

◆ direction

FileDirection ToxFile::direction

Definition at line 71 of file toxfile.h.

◆ file

std::shared_ptr<QFile> ToxFile::file

Definition at line 69 of file toxfile.h.

◆ fileKind

uint8_t ToxFile::fileKind

Data file (default) or avatar.

Definition at line 64 of file toxfile.h.

◆ fileName

QString ToxFile::fileName

Definition at line 67 of file toxfile.h.

◆ fileNum

uint32_t ToxFile::fileNum

Definition at line 65 of file toxfile.h.

◆ filePath

QString ToxFile::filePath

Definition at line 68 of file toxfile.h.

◆ friendId

uint32_t ToxFile::friendId

Definition at line 66 of file toxfile.h.

◆ hashGenerator

std::shared_ptr<QCryptographicHash> ToxFile::hashGenerator = std::make_shared<QCryptographicHash>(QCryptographicHash::Sha256)

Definition at line 74 of file toxfile.h.

◆ pauseStatus

ToxFilePause ToxFile::pauseStatus

Definition at line 75 of file toxfile.h.

◆ progress

ToxFileProgress ToxFile::progress

Definition at line 76 of file toxfile.h.

◆ resumeFileId

QByteArray ToxFile::resumeFileId

Definition at line 73 of file toxfile.h.

◆ status

FileStatus ToxFile::status

Definition at line 70 of file toxfile.h.


The documentation for this struct was generated from the following files: