iberbox  2.1.1
iberbox::TransferData Class Reference
Collaboration diagram for iberbox::TransferData:

Public Types

enum  TransferStatus {
  STARTING, QUEUED, RETRYING, ACTIVE,
  FINISHED, LAST_STATUS
}
 The transfer status enum. More...
 
enum  TransferType {
  UPLOAD, DOWNLOAD, METADATA_UPLOAD, METADATA_DOWNLOAD,
  LAST_TYPE
}
 

Public Member Functions

unsigned getCrypto () const
 Gets the crypto... More...
 
std::vector< uint8_t > * getData ()
 
uint64_t getEndPosition () const
 
Error getError () const
 
const char * getErrorName () const
 
const std::string getErrorNameString () const
 
int getErrorType () const
 
const char * getFile () const
 Gets the path of the file being transferred. More...
 
const std::string getFileString () const
 Gets the File String object. More...
 
std::vector< uint8_t > * getFullHash () const
 Gets the Full Hash object. More...
 
std::vector< uint8_t > * getKey () const
 Gets the Key object. More...
 
uint64_t getModificationTime () const
 
Node getNode () const
 Gets the Node object. More...
 
uint64_t getNodeId () const
 Gets the Node Id object. More...
 
int getNodeType () const
 Gets the Node Type object. More...
 
uint64_t getPreviousProgress () const
 
uint64_t getPriority () const
 Gets the priority of the transfer. More...
 
uint64_t getProgress () const
 Gets the progress of the transfer. More...
 
uint8_t getRetries () const
 
uint64_t getRetryTime () const
 
const char * getSession () const
 Gets the Session object. More...
 
uint64_t getSize () const
 
std::vector< uint8_t > * getSparseHash () const
 Gets the Sparse Hash object. More...
 
uint64_t getSpeed () const
 
uint64_t getStartPosition () const
 
int getStatus () const
 Gets the status of the transfer. More...
 
int getTag () const
 Gets the tag that identifies the transfer. More...
 
int getType () const
 Gets the type of the transfer. More...
 
bool isFinished () const
 
bool isRetrying () const
 
virtual ~TransferData ()
 

Static Public Member Functions

static const char * getStatusName (unsigned type)
 
static const std::string getStatusNameString (unsigned type)
 
static const char * getTypeName (unsigned type)
 Gets the transfer type name. More...
 
static const std::string getTypeNameString (unsigned type)
 Gets the transfer type name. More...
 

Member Enumeration Documentation

◆ TransferStatus

The transfer status enum.

Enumerator
STARTING 
QUEUED 
RETRYING 
ACTIVE 
FINISHED 
LAST_STATUS 

◆ TransferType

Enumerator
UPLOAD 
DOWNLOAD 
METADATA_UPLOAD 
METADATA_DOWNLOAD 
LAST_TYPE 

Constructor & Destructor Documentation

◆ ~TransferData()

virtual iberbox::TransferData::~TransferData ( )
virtual

Referenced by getStatusNameString().

Member Function Documentation

◆ getCrypto()

unsigned iberbox::TransferData::getCrypto ( ) const

Gets the crypto...

Todo:
Returns
unsigned

Referenced by getStatusNameString().

◆ getData()

std::vector<uint8_t>* iberbox::TransferData::getData ( )

Referenced by getStatusNameString().

◆ getEndPosition()

uint64_t iberbox::TransferData::getEndPosition ( ) const

Referenced by getStatusNameString().

◆ getError()

Error iberbox::TransferData::getError ( ) const

Referenced by getStatusNameString().

◆ getErrorName()

const char* iberbox::TransferData::getErrorName ( ) const

Referenced by getStatusNameString().

◆ getErrorNameString()

const std::string iberbox::TransferData::getErrorNameString ( ) const

Referenced by getStatusNameString().

◆ getErrorType()

int iberbox::TransferData::getErrorType ( ) const

Referenced by getStatusNameString().

◆ getFile()

const char* iberbox::TransferData::getFile ( ) const

Gets the path of the file being transferred.

Returns
The file path

Referenced by getStatusNameString().

◆ getFileString()

const std::string iberbox::TransferData::getFileString ( ) const

Gets the File String object.

Returns
const std::string

Referenced by getStatusNameString().

◆ getFullHash()

std::vector<uint8_t>* iberbox::TransferData::getFullHash ( ) const

Gets the Full Hash object.

Returns
std::vector<uint8_t>*

Referenced by getStatusNameString().

◆ getKey()

std::vector<uint8_t>* iberbox::TransferData::getKey ( ) const

Gets the Key object.

Returns
std::vector<uint8_t>*

Referenced by getStatusNameString().

◆ getModificationTime()

uint64_t iberbox::TransferData::getModificationTime ( ) const

Referenced by getStatusNameString().

◆ getNode()

Node iberbox::TransferData::getNode ( ) const

Gets the Node object.

Returns
Node

Referenced by getStatusNameString().

◆ getNodeId()

uint64_t iberbox::TransferData::getNodeId ( ) const

Gets the Node Id object.

Returns
uint64_t

Referenced by getStatusNameString().

◆ getNodeType()

int iberbox::TransferData::getNodeType ( ) const

Gets the Node Type object.

Returns
int

Referenced by getStatusNameString().

◆ getPreviousProgress()

uint64_t iberbox::TransferData::getPreviousProgress ( ) const

Referenced by getStatusNameString().

◆ getPriority()

uint64_t iberbox::TransferData::getPriority ( ) const

Gets the priority of the transfer.

Returns
The priority of the transfer.

Referenced by getStatusNameString().

◆ getProgress()

uint64_t iberbox::TransferData::getProgress ( ) const

Gets the progress of the transfer.

Returns
uint64_t

Referenced by getStatusNameString().

◆ getRetries()

uint8_t iberbox::TransferData::getRetries ( ) const

Referenced by getStatusNameString().

◆ getRetryTime()

uint64_t iberbox::TransferData::getRetryTime ( ) const

Referenced by getStatusNameString().

◆ getSession()

const char* iberbox::TransferData::getSession ( ) const

Gets the Session object.

Returns
const char*

Referenced by getStatusNameString().

◆ getSize()

uint64_t iberbox::TransferData::getSize ( ) const

Referenced by getStatusNameString().

◆ getSparseHash()

std::vector<uint8_t>* iberbox::TransferData::getSparseHash ( ) const

Gets the Sparse Hash object.

Returns
std::vector<uint8_t>*

Referenced by getStatusNameString().

◆ getSpeed()

uint64_t iberbox::TransferData::getSpeed ( ) const

Referenced by getStatusNameString().

◆ getStartPosition()

uint64_t iberbox::TransferData::getStartPosition ( ) const

Referenced by getStatusNameString().

◆ getStatus()

int iberbox::TransferData::getStatus ( ) const

Gets the status of the transfer.

The valid status values are described in TransferData::TransferStatus.

Returns
The status of the transfer.

Referenced by getStatusNameString().

◆ getStatusName()

static const char* iberbox::TransferData::getStatusName ( unsigned  type)
inlinestatic

References LAST_STATUS.

Referenced by getStatusNameString().

◆ getStatusNameString()

◆ getTag()

int iberbox::TransferData::getTag ( ) const

Gets the tag that identifies the transfer.

Returns
int

Referenced by getStatusNameString().

◆ getType()

int iberbox::TransferData::getType ( ) const

Gets the type of the transfer.

Returns
int

Referenced by getStatusNameString().

◆ getTypeName()

static const char* iberbox::TransferData::getTypeName ( unsigned  type)
inlinestatic

Gets the transfer type name.

type valid values are described in TransferType enum

Parameters
typeThe transfer type.
Returns
The transfer type name as a char array.

References LAST_TYPE.

Referenced by getTypeNameString().

◆ getTypeNameString()

static const std::string iberbox::TransferData::getTypeNameString ( unsigned  type)
inlinestatic

Gets the transfer type name.

type valid values are described in TransferType enum

Parameters
typeThe transfer type.
Returns
The transfer type as a std::string.

References getTypeName().

◆ isFinished()

bool iberbox::TransferData::isFinished ( ) const

Referenced by getStatusNameString().

◆ isRetrying()

bool iberbox::TransferData::isRetrying ( ) const

Referenced by getStatusNameString().


The documentation for this class was generated from the following file: