Loading...
Searching...
No Matches
QXmppFileDownload Class Reference

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

Inherits QObject.

## Classes

struct | Downloaded

## Public Types

enum | HashVerificationResult { NoStrongHashes , HashVerified }
using | Result = std::variant< Downloaded, QXmpp::Cancelled, QXmppError >
| Contains QXmpp::Success (successfully finished), QXmpp::Cancelled (manually cancelled) or QXmppError (an error occured while downloading).

## Public Member Functions

float | progress () const
Q_SIGNAL void | progressChanged ()
| Emitted when new bytes have been transferred.
void | cancel ()
| Cancels the file transfer. finished() will be emitted.
bool | isFinished () const
| Returns whether the file transfer is finished.
quint64 | bytesTransferred () const
| Returns the number of bytes that have been uploaded or downloaded.
quint64 | bytesTotal () const
| Returns the number of bytes that totally need to be transferred.
Result | result () const
| Returns the result of the download.
Q_SIGNAL void | finished ()

## Properties

float | progress
| Progress of the file download between 0.0 and 1.0.

## Friends

class | QXmppFileSharingManager

## Detailed Description

Provides progress of stateless file sharing uploads.

Since
  QXmpp 1.5

## Member Enumeration Documentation

## HashVerificationResult

enum QXmppFileDownload::HashVerificationResult

Describes the result of the hash verification.

Enumerator
NoStrongHashes | File did not contain strong hashes (or no hashes at all) and no verification was done. This value is not used when a hash value did not match. In that case the whole file download returns an error.
HashVerified | The file integrity could be proved using a strong hash algorithm.

## Member Function Documentation

## finished()

QXmppFileDownload::finished | ( |  | ) |

Emitted when the download has finished.

## progress()

float QXmppFileDownload::progress | ( |  | ) | const

Returns the current progress between 0.0 and 1.0.

## result()

QXmppFileDownload::Result QXmppFileDownload::result | ( |  | ) | const

Returns the result of the download.

The download must be finished when calling this.

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

- QXmppFileSharingManager.h
- QXmppFileSharingManager.cpp