LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::ITransferManager Class Referenceabstract

This interface must be implemented by transfer managers returned from IAccount::GetTransferManager(). More...

#include "itransfermanager.h"

Public Member Functions

virtual ~ITransferManager ()
 
virtual bool IsAvailable () const =0
 Returns whether transfer manager is available. More...
 
virtual QObject * SendFile (const QString &id, const QString &variant, const QString &name, const QString &comment)=0
 Requests a file transfer with the remote party. More...
 

Protected Member Functions

virtual void fileOffered (QObject *job)=0
 Notifies about incoming transfer request. More...
 

Detailed Description

This interface must be implemented by transfer managers returned from IAccount::GetTransferManager().

Definition at line 182 of file itransfermanager.h.

Constructor & Destructor Documentation

◆ ~ITransferManager()

virtual LC::Azoth::ITransferManager::~ITransferManager ( )
inlinevirtual

Definition at line 185 of file itransfermanager.h.

Member Function Documentation

◆ fileOffered()

virtual void LC::Azoth::ITransferManager::fileOffered ( QObject *  job)
protectedpure virtual

Notifies about incoming transfer request.

This signal should be emitted by the transfer manager whenever another party issues a file transfer request.

The passed obj represents the transfer job, and it must implement the ITransferJob interface.

Ownership of the obj is transferred to the signal handler.

Note
This function is expected to be a signal.
Parameters
[out]jobThe transfer job, implementing ITransferJob.

◆ IsAvailable()

virtual bool LC::Azoth::ITransferManager::IsAvailable ( ) const
pure virtual

Returns whether transfer manager is available.

This method returns whether file transfers are available via the corresponding IAccount.

For example, an XMPP implementation may have in-band transfers prohibited and no SOCKS server to perform the transfers out of band. In this case this method should return false, though technically XMPP supports file transfers.

Returns
Whether files can be sent right now through this transfer manager.

◆ SendFile()

virtual QObject* LC::Azoth::ITransferManager::SendFile ( const QString &  id,
const QString &  variant,
const QString &  name,
const QString &  comment 
)
pure virtual

Requests a file transfer with the remote party.

The entry is identified by the ID, which is the result of ICLEntry::GetEntryID().

If the variant is an empty string, or there is no such variant, the file should be transferred the the variant with the highest priority.

The returned object represents the file transfer request, and, further on, the file transfer job, should it be accepted. The returned object must implement ITransferJob. Ownership is transferred to the caller.

Parameters
[in]idThe id of the remote party, as ICLEntry::GetEntryID().
[in]variantThe entry variant to transfer with.
[in]nameThe path to the file that should be transferred.
[in]commentThe comment describing the file to be sent, if applicable.
Returns
The transfer job object representing this transfer and implement ITransferJob.

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