LeechCraft Azoth  0.6.70-10870-g558588d6ec
Modular multiprotocol IM plugin for LeechCraft
LeechCraft::Azoth::ITransferJob Class Referenceabstract

This interface must be implemented by objects representing file transfer jobs. More...

#include "itransfermanager.h"

Public Member Functions

virtual ~ITransferJob ()
 
virtual QString GetSourceID () const =0
 Returns the ID of the other party. More...
 
virtual QString GetName () const =0
 Returns the name of the file. More...
 
virtual qint64 GetSize () const =0
 Returns the size of the file. More...
 
virtual QString GetComment () const =0
 Returns the human-readable comment. More...
 
virtual TransferDirection GetDirection () const =0
 Returns the direction of the transfer. More...
 
virtual void Accept (const QString &out)=0
 Accepts an incoming transfer. More...
 
virtual void Abort ()=0
 Rejects or aborts a transfer. More...
 

Protected Member Functions

virtual void transferProgress (qint64 done, qint64 total)=0
 Notifies about transfer progress. More...
 
virtual void errorAppeared (TransferError error, const QString &msg)=0
 Notifies about error. More...
 
virtual void stateChanged (TransferState state)=0
 Notifies about state changes. More...
 

Detailed Description

This interface must be implemented by objects representing file transfer jobs.

Definition at line 105 of file itransfermanager.h.

Constructor & Destructor Documentation

◆ ~ITransferJob()

virtual LeechCraft::Azoth::ITransferJob::~ITransferJob ( )
inlinevirtual

Definition at line 108 of file itransfermanager.h.

Member Function Documentation

◆ Abort()

virtual void LeechCraft::Azoth::ITransferJob::Abort ( )
pure virtual

Rejects or aborts a transfer.

This method is used to reject an incoming file transfer request or abort an already accepted one that's in progress.

◆ Accept()

virtual void LeechCraft::Azoth::ITransferJob::Accept ( const QString &  out)
pure virtual

Accepts an incoming transfer.

This method only makes sense in incoming file transfers. It is used to accept the transfer and write the file the path given by the out parameter.

Parameters
[in]outThe file path to save the incoming data to.

◆ errorAppeared()

virtual void LeechCraft::Azoth::ITransferJob::errorAppeared ( TransferError  error,
const QString &  msg 
)
protectedpure virtual

Notifies about error.

Note
This function is expected to be a signal.
Parameters
[out]errorThe error condition.
[out]msgThe human-readable message describing the error.

◆ GetComment()

virtual QString LeechCraft::Azoth::ITransferJob::GetComment ( ) const
pure virtual

Returns the human-readable comment.

Returns
The text describing this transfer job.

◆ GetDirection()

virtual TransferDirection LeechCraft::Azoth::ITransferJob::GetDirection ( ) const
pure virtual

Returns the direction of the transfer.

Returns
The direction of the transfer.

◆ GetName()

virtual QString LeechCraft::Azoth::ITransferJob::GetName ( ) const
pure virtual

Returns the name of the file.

Returns
The name of the file.

◆ GetSize()

virtual qint64 LeechCraft::Azoth::ITransferJob::GetSize ( ) const
pure virtual

Returns the size of the file.

Returns
The size of the file, or -1 if size is not known.

◆ GetSourceID()

virtual QString LeechCraft::Azoth::ITransferJob::GetSourceID ( ) const
pure virtual

Returns the ID of the other party.

The returned string should be compatible with the return value of ICLEntry::GetEntryID(), that is, it should be equal to that one of the corresponding ICLEntry.

Returns
The ID of the other party, as ICLEntry::GetEntryID().

◆ stateChanged()

virtual void LeechCraft::Azoth::ITransferJob::stateChanged ( TransferState  state)
protectedpure virtual

Notifies about state changes.

Note
This function is expected to be a signal.
Parameters
[out]stateThe new state of the transfer job.

◆ transferProgress()

virtual void LeechCraft::Azoth::ITransferJob::transferProgress ( qint64  done,
qint64  total 
)
protectedpure virtual

Notifies about transfer progress.

Note
This function is expected to be a signal.
Parameters
[out]doneThe amount of data already transferred.
[out]totalThe total amount of data.

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