libqutim  0.3.1.0
qutim_sdk_0_3::FileTransferJob Class Referenceabstract

#include <filetransfer.h>

+ Inheritance diagram for qutim_sdk_0_3::FileTransferJob:

Public Types

enum  Direction { Outgoing, Incoming }
 
enum  ErrorType {
  NetworkError, Canceled, NotSupported, IOError,
  NoError
}
 
enum  State { Initiation, Started, Finished, Error }
 

Public Slots

void accept ()
 
void stop ()
 

Public Member Functions

 FileTransferJob (ChatUnit *unit, Direction direction, FileTransferFactory *factory)
 
virtual ~FileTransferJob ()
 
QDir baseDir () const
 
ChatUnitchatUnit () const
 
int currentIndex () const
 
Direction direction () const
 
ErrorType error () const
 
LocalizedString errorString ()
 
QString fileName () const
 
int filesCount () const
 
qint64 fileSize () const
 
FileTransferInfo info (int index) const
 
bool isAccepted ()
 
qint64 progress () const
 
void send (const QUrl &url, const QString &title=QString())
 
void send (const QDir &baseDir, const QStringList &files, const QString &title)
 
State state () const
 
LocalizedString stateString ()
 
QString title () const
 
qint64 totalSize () const
 

Protected Member Functions

virtual void doReceive ()=0
 
virtual void doSend ()=0
 
virtual void doStop ()=0
 
void init (int filesCount, qint64 totalSize, const QString &title)
 
QIODevice * setCurrentIndex (int index)
 
void setError (ErrorType error)
 
void setErrorString (const LocalizedString &error)
 
void setFileInfo (int index, const FileTransferInfo &info)
 
void setFileProgress (qint64 fileProgress)
 
void setState (State state)
 
void setStateString (const LocalizedString &state)
 
virtual void virtual_hook (int id, void *data)
 

Properties

qutim_sdk_0_3::ChatUnit chatUnit
 
int currentIndex
 
QString fileName
 
int filesCount
 
qint64 fileSize
 
qint64 progress
 
qutim_sdk_0_3::FileTransferJob::State state
 
QString title
 
qint64 totalSize
 

Friends

class FileTransferManager
 

Member Enumeration Documentation

Enumerator
Outgoing 
Incoming 
Enumerator
NetworkError 
Canceled 
NotSupported 
IOError 
NoError 
Enumerator
Initiation 
Started 
Finished 
Error 

Constructor & Destructor Documentation

qutim_sdk_0_3::FileTransferJob::FileTransferJob ( ChatUnit unit,
Direction  direction,
FileTransferFactory factory 
)
virtual qutim_sdk_0_3::FileTransferJob::~FileTransferJob ( )
virtual

Member Function Documentation

void qutim_sdk_0_3::FileTransferJob::accept ( )
slot
QDir qutim_sdk_0_3::FileTransferJob::baseDir ( ) const
ChatUnit* qutim_sdk_0_3::FileTransferJob::chatUnit ( ) const
int qutim_sdk_0_3::FileTransferJob::currentIndex ( ) const
Direction qutim_sdk_0_3::FileTransferJob::direction ( ) const
virtual void qutim_sdk_0_3::FileTransferJob::doReceive ( )
protectedpure virtual
virtual void qutim_sdk_0_3::FileTransferJob::doSend ( )
protectedpure virtual
virtual void qutim_sdk_0_3::FileTransferJob::doStop ( )
protectedpure virtual
ErrorType qutim_sdk_0_3::FileTransferJob::error ( ) const
LocalizedString qutim_sdk_0_3::FileTransferJob::errorString ( )
QString qutim_sdk_0_3::FileTransferJob::fileName ( ) const
int qutim_sdk_0_3::FileTransferJob::filesCount ( ) const
qint64 qutim_sdk_0_3::FileTransferJob::fileSize ( ) const
FileTransferInfo qutim_sdk_0_3::FileTransferJob::info ( int  index) const
void qutim_sdk_0_3::FileTransferJob::init ( int  filesCount,
qint64  totalSize,
const QString &  title 
)
protected
bool qutim_sdk_0_3::FileTransferJob::isAccepted ( )
qint64 qutim_sdk_0_3::FileTransferJob::progress ( ) const
void qutim_sdk_0_3::FileTransferJob::send ( const QUrl &  url,
const QString &  title = QString() 
)
void qutim_sdk_0_3::FileTransferJob::send ( const QDir &  baseDir,
const QStringList &  files,
const QString &  title 
)
QIODevice* qutim_sdk_0_3::FileTransferJob::setCurrentIndex ( int  index)
protected
void qutim_sdk_0_3::FileTransferJob::setError ( ErrorType  error)
protected
void qutim_sdk_0_3::FileTransferJob::setErrorString ( const LocalizedString error)
protected
void qutim_sdk_0_3::FileTransferJob::setFileInfo ( int  index,
const FileTransferInfo info 
)
protected
void qutim_sdk_0_3::FileTransferJob::setFileProgress ( qint64  fileProgress)
protected
void qutim_sdk_0_3::FileTransferJob::setState ( State  state)
protected
void qutim_sdk_0_3::FileTransferJob::setStateString ( const LocalizedString state)
protected
State qutim_sdk_0_3::FileTransferJob::state ( ) const
LocalizedString qutim_sdk_0_3::FileTransferJob::stateString ( )
void qutim_sdk_0_3::FileTransferJob::stop ( )
slot
QString qutim_sdk_0_3::FileTransferJob::title ( ) const
qint64 qutim_sdk_0_3::FileTransferJob::totalSize ( ) const
virtual void qutim_sdk_0_3::FileTransferJob::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Friends And Related Function Documentation

friend class FileTransferManager
friend

Property Documentation

qutim_sdk_0_3::ChatUnit qutim_sdk_0_3::FileTransferJob::chatUnit
read
int qutim_sdk_0_3::FileTransferJob::currentIndex
read
QString qutim_sdk_0_3::FileTransferJob::fileName
read
int qutim_sdk_0_3::FileTransferJob::filesCount
read
qint64 qutim_sdk_0_3::FileTransferJob::fileSize
read
qint64 qutim_sdk_0_3::FileTransferJob::progress
read
qutim_sdk_0_3::FileTransferJob::State qutim_sdk_0_3::FileTransferJob::state
read
QString qutim_sdk_0_3::FileTransferJob::title
read
qint64 qutim_sdk_0_3::FileTransferJob::totalSize
read

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

Generated by Doxygen