|
QXmpp Version: 1.15.1
|


Public Types | |
| enum | Direction { IncomingDirection , OutgoingDirection } |
| This enum is used to describe the direction of a transfer job. More... | |
| enum | Error { NoError = 0 , AbortError , FileAccessError , FileCorruptError , ProtocolError } |
| This enum is used to describe the type of error encountered by a transfer job. More... | |
| enum | Method { NoMethod = 0 , InBandMethod = 1 , SocksMethod = 2 , AnyMethod = 3 } |
| This enum is used to describe a transfer method. More... | |
| enum | State { OfferState = 0 , StartState = 1 , TransferState = 2 , FinishedState = 3 } |
| This enum is used to describe the state of a transfer job. More... | |
Public Member Functions | |
| QXmppTransferJob::Direction | direction () const |
| Returns the job's transfer direction. | |
| QString | jid () const |
| Returns the remote party's JID. | |
| QXmppTransferJob::Method | method () const |
| Returns the job's transfer method. | |
| QXmppTransferJob::State | state () const |
| Returns the job's state. | |
| QXmppTransferJob::Error | error () const |
| QString | sid () const |
| qint64 | speed () const |
| QXmppTransferFileInfo | fileInfo () const |
| QUrl | localFileUrl () const |
| Returns the local file URL. | |
| void | setLocalFileUrl (const QUrl &localFileUrl) |
| Q_SIGNAL void | error (QXmppTransferJob::Error error) |
| Q_SIGNAL void | finished () |
| Q_SIGNAL void | localFileUrlChanged (const QUrl &localFileUrl) |
| This signal is emitted when the local file URL changes. | |
| Q_SIGNAL void | progress (qint64 done, qint64 total) |
| This signal is emitted to indicate the progress of this transfer job. | |
| Q_SIGNAL void | stateChanged (QXmppTransferJob::State state) |
| This signal is emitted when the transfer job changes state. | |
| Q_SLOT void | abort () |
| Q_SLOT void | accept (const QString &filePath) |
| Q_SLOT void | accept (QIODevice *output) |
Public Member Functions inherited from QXmppLoggable | |
| QXmppLoggable (QObject *parent=nullptr) | |
| Q_SIGNAL void | setGauge (const QString &gauge, double value) |
| Sets the given gauge to value. | |
| Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
| This signal is emitted to send logging messages. | |
| Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1) |
| Updates the given counter by amount. | |
Properties | |
| Direction | direction |
| The job's transfer direction. | |
| QUrl | localFileUrl |
| The local file URL. | |
| QString | jid |
| The remote party's JID. | |
| Method | method |
| The job's transfer method. | |
| State | state |
| The job's state. | |
| QString | fileName |
| The name of the file. | |
| qint64 | fileSize |
| The size of the file. | |
Friends | |
| class | QXmppTransferManager |
| class | QXmppTransferManagerPrivate |
| class | QXmppTransferIncomingJob |
| class | QXmppTransferOutgoingJob |
Additional Inherited Members | |
Protected Member Functions inherited from QXmppLoggable | |
| void | debug (const QString &message) |
| Logs a debugging message. | |
| void | info (const QString &message) |
| Logs an informational message. | |
| void | warning (const QString &message) |
| Logs a warning message. | |
| void | logReceived (const QString &message) |
| Logs a received packet. | |
| void | logSent (const QString &message) |
| Logs a sent packet. | |
The QXmppTransferJob class represents a single file transfer job.
This enum is used to describe the type of error encountered by a transfer job.
| void QXmppTransferJob::abort | ( | ) |
Call this method if you wish to abort on ongoing transfer job.
| void QXmppTransferJob::accept | ( | const QString & | filePath | ) |
Call this method if you wish to accept an incoming transfer job.
| void QXmppTransferJob::accept | ( | QIODevice * | iodevice | ) |
Call this method if you wish to accept an incoming transfer job.
| QXmppTransferJob::Error QXmppTransferJob::error | ( | ) | const |
Returns the last error that was encountered.
| Q_SIGNAL void QXmppTransferJob::error | ( | QXmppTransferJob::Error | error | ) |
This signal is emitted when an error is encountered while processing the transfer job.
| QXmppTransferFileInfo QXmppTransferJob::fileInfo | ( | ) | const |
Returns meta-data about the file being transferred.
| Q_SIGNAL void QXmppTransferJob::finished | ( | ) |
This signal is emitted when the transfer job is finished.
You can determine if the job completed successfully by testing whether error() returns QXmppTransferJob::NoError.
Note: Do not delete the job in the slot connected to this signal, instead use deleteLater().
| void QXmppTransferJob::setLocalFileUrl | ( | const QUrl & | localFileUrl | ) |
Sets the local file URL.
| QString QXmppTransferJob::sid | ( | ) | const |
Returns the job's session identifier.
| qint64 QXmppTransferJob::speed | ( | ) | const |
Returns the job's transfer speed in bytes per second.
If the transfer has not started yet or is already finished, returns 0.