libosmscout
0.1
|
Utility class for downloading map db described by AvailableMapsModelMap over http. More...
#include <MapDownloader.h>
Public Member Functions | |
uint64_t | expectedSize () const override |
QString | getMapName () const |
QStringList | getMapPath () const |
MapDownloadJob (QNetworkAccessManager *webCtrl, AvailableMapsModelMap map, QDir target, bool replaceExisting) | |
void | start () |
~MapDownloadJob () override | |
Cancel downloading, when db is not downloaded successfully, remove it from disk (even already downloaded files). More... | |
![]() | |
void | cancel () |
Cancel downloading, remove temporary files (of unfinished jobs), emit canceled signal. More... | |
DownloadJob (const DownloadJob &)=delete | |
DownloadJob (DownloadJob &&)=delete | |
DownloadJob (QNetworkAccessManager *webCtrl, QDir target, bool replaceExisting) | |
QDir | getDestinationDirectory () const |
QString | getDownloadingFile () |
QString | getError () const |
double | getProgress () |
bool | isDone () const |
bool | isDownloading () const |
bool | isReplaceExisting () const |
bool | isSuccessful () const |
DownloadJob & | operator= (const DownloadJob &)=delete |
DownloadJob & | operator== (const DownloadJob &&)=delete |
void | start (const QString &serverBasePath, const QStringList &files) |
~DownloadJob () override | |
Additional Inherited Members | |
![]() | |
void | downloadNextFile () |
void | onDownloadProgress (uint64_t) |
void | onJobFailed (QString errorMessage, bool recoverable) |
void | onJobFinished (QString path) |
![]() | |
void | canceled () |
void | downloadProgress () |
void | failed (QString error) |
void | finished () |
![]() | |
void | clearJobs () |
Clear all file download jobs, it removes temporary *.download files. More... | |
![]() | |
bool | canceledByUser {false} |
bool | done {false} |
uint64_t | downloadedBytes {0} |
QString | error |
QList< FileDownloader * > | jobs |
bool | replaceExisting |
bool | started {false} |
bool | successful {false} |
QDir | target |
QNetworkAccessManager * | webCtrl |
Utility class for downloading map db described by AvailableMapsModelMap over http.
osmscout::MapDownloadJob::MapDownloadJob | ( | QNetworkAccessManager * | webCtrl, |
AvailableMapsModelMap | map, | ||
QDir | target, | ||
bool | replaceExisting | ||
) |
|
override |
Cancel downloading, when db is not downloaded successfully, remove it from disk (even already downloaded files).
References osmscout::DownloadJob::clearJobs(), osmscout::DownloadJob::started, osmscout::DownloadJob::successful, and osmscout::DownloadJob::target.
|
inlineoverridevirtual |
Implements osmscout::DownloadJob.
References osmscout::AvailableMapsModelMap::getSize().
|
inline |
References osmscout::AvailableMapsModelItem::getName().
|
inline |
References osmscout::AvailableMapsModelItem::getPath().
void osmscout::MapDownloadJob::start | ( | ) |