QXmppFileUpload Class
Provides progress of stateless file sharing uploads. More...
| Header: | #include <QXmppFileUpload> |
| Since: | QXmpp 1.5 |
Public Types
| struct | FileResult |
| Result |
Public Functions
| quint64 | bytesTotal() const |
| quint64 | bytesTransferred() const |
| void | cancel() |
| bool | isFinished() const |
| float | progress() const |
| QXmppFileUpload::Result | result() const |
Signals
| void | finished() |
| void | progressChanged() |
Detailed Description
Member Type Documentation
[alias] QXmppFileUpload::Result
Contains FileResult (successfully finished), QXmpp::Cancelled (manually cancelled) or QXmppError (an error occured while uploading).
Member Function Documentation
quint64 QXmppFileUpload::bytesTotal() const
Returns the number of bytes that totally need to be transferred.
quint64 QXmppFileUpload::bytesTransferred() const
Returns the number of bytes that have been uploaded or downloaded.
void QXmppFileUpload::cancel()
Cancels the file transfer. finished() will be emitted.
[signal] void QXmppFileUpload::finished()
Emitted when the upload has finished.
bool QXmppFileUpload::isFinished() const
Returns whether the file transfer is finished.
float QXmppFileUpload::progress() const
Returns the current progress between 0.0 and 1.0.
Note: Getter function for property progress.
[signal] void QXmppFileUpload::progressChanged()
Emitted when new bytes have been transferred.
Note: Notifier signal for property progress.
QXmppFileUpload::Result QXmppFileUpload::result() const
Returns the result of the upload.
The upload must be finished when calling this.