QXmppFileDownload Class

Provides progress of stateless file sharing uploads. More...

Header: #include <QXmppFileDownload>
Since: QXmpp 1.5

Public Types

Public Functions

quint64 bytesTotal() const
quint64 bytesTransferred() const
void cancel()
bool isFinished() const
float progress() const
QXmppFileDownload::Result result() const

Signals

void finished()
void progressChanged()

Detailed Description

Member Type Documentation

[alias] QXmppFileDownload::Result

Contains QXmpp::Success (successfully finished), QXmpp::Cancelled (manually cancelled) or QXmppError (an error occured while downloading).

Member Function Documentation

quint64 QXmppFileDownload::bytesTotal() const

Returns the number of bytes that totally need to be transferred.

quint64 QXmppFileDownload::bytesTransferred() const

Returns the number of bytes that have been uploaded or downloaded.

void QXmppFileDownload::cancel()

Cancels the file transfer. finished() will be emitted.

[signal] void QXmppFileDownload::finished()

Emitted when the download has finished.

bool QXmppFileDownload::isFinished() const

Returns whether the file transfer is finished.

float QXmppFileDownload::progress() const

Returns the current progress between 0.0 and 1.0.

Note: Getter function for property progress.

[signal] void QXmppFileDownload::progressChanged()

Emitted when new bytes have been transferred.

Note: Notifier signal for property progress.

QXmppFileDownload::Result QXmppFileDownload::result() const

Returns the result of the download.

The download must be finished when calling this.