|
QXmpp Version: 1.12.0
|
Inherits QObject.
Public Types | |
| using | Result = std::variant< QUrl, QXmpp::Cancelled, QXmppError > |
Public Member Functions | |
| float | progress () const |
| quint64 | bytesSent () const |
| quint64 | bytesTotal () const |
| void | cancel () |
| bool | isFinished () const |
| std::optional< Result > | result () const |
| Q_SIGNAL void | progressChanged () |
| Q_SIGNAL void | finished (const QXmppHttpUpload::Result &result) |
Properties | |
| float | progress |
| quint64 | bytesSent |
| quint64 | bytesTotal |
Friends | |
| class | QXmppHttpUploadManager |
Object that represents an ongoing or finished upload.
Represents the result of an upload. It can either be a url to the uploaded file, a QXmppHttpUpload::Cancelled unit struct, or an error as QXmppError.
| quint64 QXmppHttpUpload::bytesSent | ( | ) | const |
The number of bytes sent so far.
| quint64 QXmppHttpUpload::bytesTotal | ( | ) | const |
The number of bytes that need to be sent in total to complete the upload.
| void QXmppHttpUpload::cancel | ( | ) |
Cancels the upload.
| QXmppHttpUpload::finished | ( | const QXmppHttpUpload::Result & | result | ) |
Emitted when the upload has finished for any reason (success, cancelled, error).
| result | Result of the upload |
| bool QXmppHttpUpload::isFinished | ( | ) | const |
Returns whether the upload is already finished.
| float QXmppHttpUpload::progress | ( | ) | const |
Returns the current progress of the upload as a floating point number between 0 and 1.
| QXmppHttpUpload::progressChanged | ( | ) |
Emitted when the upload has made progress.
| std::optional< QXmppHttpUpload::Result > QXmppHttpUpload::result | ( | ) | const |
If the upload has already finished, returns the result of the upload as QXmppHttpUpload::Result, otherwise returns an empty std::optional.
|
read |
Number of bytes sent so far
|
read |
Number of bytes that need to be sent in total to complete the upload
|
read |
The current progress of the upload as a floating point number between 0 and 1.