|
libosmscout 1.1.1
|
#include <libosmscout-client-qt/include/osmscoutclientqt/FileDownloader.h>


Public Slots | |
| void | onJobFailed (QString errorMessage, bool recoverable) |
| void | onJobFinished (QString path) |
| void | onDownloadProgress (uint64_t) |
| void | downloadNextFile () |
Signals | |
| void | finished () |
| void | failed (QString error) |
| void | canceled () |
| void | downloadProgress () |
Public Member Functions | |
| DownloadJob (QNetworkAccessManager *webCtrl, QDir target, bool replaceExisting) | |
| ~DownloadJob () override | |
| DownloadJob (const DownloadJob &)=delete | |
| DownloadJob (DownloadJob &&)=delete | |
| DownloadJob & | operator= (const DownloadJob &)=delete |
| DownloadJob & | operator== (const DownloadJob &&)=delete |
| void | start (const QString &serverBasePath, const QStringList &files) |
| void | cancel () |
| virtual uint64_t | expectedSize () const =0 |
| bool | isDone () const |
| bool | isSuccessful () const |
| bool | isDownloading () const |
| QString | getError () const |
| bool | isReplaceExisting () const |
| QDir | getDestinationDirectory () const |
| double | getProgress () |
| QString | getDownloadingFile () |
Protected Member Functions | |
| void | clearJobs () |
Protected Attributes | |
| QList< FileDownloader * > | jobs |
| QNetworkAccessManager * | webCtrl |
| QDir | target |
| bool | done {false} |
| bool | started {false} |
| bool | successful {false} |
| bool | canceledByUser {false} |
| uint64_t | downloadedBytes {0} |
| QString | error |
| bool | replaceExisting |
Class that provide abstraction for download job of multiple files in sequence.
| osmscout::DownloadJob::DownloadJob | ( | QNetworkAccessManager * | webCtrl, |
| QDir | target, | ||
| bool | replaceExisting ) |
|
override |
|
delete |
|
delete |
| void osmscout::DownloadJob::cancel | ( | ) |
Cancel downloading, remove temporary files (of unfinished jobs), emit canceled signal. Already downloaded files are retained on disk (this behaviour may be modified by subclass).
|
signal |
|
protected |
Clear all file download jobs, it removes temporary *.download files
|
slot |
|
signal |
|
pure virtual |
Implemented in osmscout::MapDownloadJob, and osmscout::VoiceDownloadJob.
|
signal |
|
signal |
|
inline |
| QString osmscout::DownloadJob::getDownloadingFile | ( | ) |
|
inline |
| double osmscout::DownloadJob::getProgress | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
slot |
|
slot |
|
slot |
|
delete |
|
delete |
| void osmscout::DownloadJob::start | ( | const QString & | serverBasePath, |
| const QStringList & | files ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |