Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::DownloadOpReport Class Referencefinal

The DownloadOpReport class details the result of a single file download.

#include <qx/network/qx-downloadopreport.h>

Collaboration diagram for Qx::DownloadOpReport:
[legend]

Public Types

enum  Result {
  Completed = 0 ,
  Skipped = 1 ,
  Aborted = 2 ,
  Failed = 3
}
 

Public Member Functions

Result result () const
 
QString resultString () const
 
DownloadTask task () const
 
bool wasSuccessful () const
 
- Public Member Functions inherited from Qx::AbstractError<"Qx::DownloadOpReport", 4 >
 operator bool () const
 
bool operator!= (const AbstractError &other) const=default
 
bool operator== (const AbstractError &other) const=default
 

Static Public Member Functions

static DownloadOpReport abortedDownload (const DownloadTask &task)
 
static DownloadOpReport completedDownload (const DownloadTask &task)
 
static DownloadOpReport failedDownload (const DownloadTask &task, QString error)
 
static DownloadOpReport skippedDownload (const DownloadTask &task)
 

Additional Inherited Members

- Static Public Attributes inherited from Qx::AbstractError<"Qx::DownloadOpReport", 4 >
static constexpr quint16 TYPE_CODE
 
static constexpr QLatin1StringView TYPE_NAME
 
- Protected Member Functions inherited from Qx::IError
 IError ()=default
 
virtual QString deriveCaption () const
 
virtual QString deriveDetails () const
 
bool operator!= (const IError &other) const =default
 
bool operator== (const IError &other) const =default
 

Member Enumeration Documentation

◆ Result

This enum represents the result of a processed download task.

Enumerator
Completed 

A successfully completed download.

Skipped 

A skipped download

Aborted 

An aborted download.

Failed 

A failed download.

Member Function Documentation

◆ abortedDownload()

DownloadOpReport Qx::DownloadOpReport::abortedDownload ( const DownloadTask & task)
static

Constructs an operation report that notes the download task was aborted.

◆ completedDownload()

DownloadOpReport Qx::DownloadOpReport::completedDownload ( const DownloadTask & task)
static

Constructs an operation report that notes the download task completed successfully.

◆ failedDownload()

DownloadOpReport Qx::DownloadOpReport::failedDownload ( const DownloadTask & task,
QString error )
static

Constructs an operation report that notes the download task failed.

◆ result()

DownloadOpReport::Result Qx::DownloadOpReport::result ( ) const

Returns the result of the task this report describes.

◆ resultString()

QString Qx::DownloadOpReport::resultString ( ) const

Returns a string representation of the result.

◆ skippedDownload()

DownloadOpReport Qx::DownloadOpReport::skippedDownload ( const DownloadTask & task)
static

Constructs an operation report that notes the download task was skipped.

◆ task()

DownloadTask Qx::DownloadOpReport::task ( ) const

Returns the task this report describes.

◆ wasSuccessful()

bool Qx::DownloadOpReport::wasSuccessful ( ) const

Returns true if the download task completed successfully; otherwise, returns false.


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