libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::MapDownloadJob Class Reference

Utility class for downloading map db described by AvailableMapsModelMap over http. More...

#include <MapDownloader.h>

Inheritance diagram for osmscout::MapDownloadJob:

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).
Public Member Functions inherited from osmscout::DownloadJob
void cancel ()
 Cancel downloading, remove temporary files (of unfinished jobs), emit canceled signal.
 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

Public Slots inherited from osmscout::DownloadJob
void downloadNextFile ()
void onDownloadProgress (uint64_t)
void onJobFailed (QString errorMessage, bool recoverable)
void onJobFinished (QString path)
Signals inherited from osmscout::DownloadJob
void canceled ()
void downloadProgress ()
void failed (QString error)
void finished ()
Protected Member Functions inherited from osmscout::DownloadJob
void clearJobs ()
 Clear all file download jobs, it removes temporary *.download files.
Protected Attributes inherited from osmscout::DownloadJob
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

Detailed Description

Utility class for downloading map db described by AvailableMapsModelMap over http.

Constructor & Destructor Documentation

◆ MapDownloadJob()

osmscout::MapDownloadJob::MapDownloadJob ( QNetworkAccessManager * webCtrl,
AvailableMapsModelMap map,
QDir target,
bool replaceExisting )

◆ ~MapDownloadJob()

osmscout::MapDownloadJob::~MapDownloadJob ( )
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.

Member Function Documentation

◆ expectedSize()

uint64_t osmscout::MapDownloadJob::expectedSize ( ) const
inlineoverridevirtual

Implements osmscout::DownloadJob.

◆ getMapName()

QString osmscout::MapDownloadJob::getMapName ( ) const
inline

◆ getMapPath()

QStringList osmscout::MapDownloadJob::getMapPath ( ) const
inline

◆ start()


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