libosmscout  1.1.1
Public Member Functions | Static Public Attributes | List of all members
osmscout::MapDownloadJob Class Reference

#include <libosmscout-client-qt/include/osmscout/MapManager.h>

Inheritance diagram for osmscout::MapDownloadJob:
Inheritance graph
[legend]
Collaboration diagram for osmscout::MapDownloadJob:
Collaboration graph
[legend]

Public Member Functions

 MapDownloadJob (QNetworkAccessManager *webCtrl, AvailableMapsModelMap map, QDir target, bool replaceExisting)
 
 ~MapDownloadJob () override
 
void start ()
 
QString getMapName () const
 
QStringList getMapPath () const
 
uint64_t expectedSize () const override
 
- Public Member Functions inherited from osmscout::DownloadJob
 DownloadJob (QNetworkAccessManager *webCtrl, QDir target, bool replaceExisting)
 
 ~DownloadJob () override
 
 DownloadJob (const DownloadJob &)=delete
 
 DownloadJob (DownloadJob &&)=delete
 
DownloadJoboperator= (const DownloadJob &)=delete
 
DownloadJoboperator== (const DownloadJob &&)=delete
 
void start (const QString &serverBasePath, const QStringList &files)
 
void cancel ()
 
bool isDone () const
 
bool isSuccessful () const
 
bool isDownloading () const
 
QString getError () const
 
bool isReplaceExisting () const
 
QDir getDestinationDirectory () const
 
double getProgress ()
 
QString getDownloadingFile ()
 

Static Public Attributes

static const char * FILE_METADATA
 

Additional Inherited Members

- Public Slots inherited from osmscout::DownloadJob
void onJobFailed (QString errorMessage, bool recoverable)
 
void onJobFinished (QString path)
 
void onDownloadProgress (uint64_t)
 
void downloadNextFile ()
 
- Signals inherited from osmscout::DownloadJob
void finished ()
 
void failed (QString error)
 
void canceled ()
 
void downloadProgress ()
 
- Protected Member Functions inherited from osmscout::DownloadJob
void clearJobs ()
 
- Protected Attributes inherited from osmscout::DownloadJob
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
 

Detailed Description

Utility class for downloading map database 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 database is not downloaded successfully, remove it from disk (even already downloaded files).

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()

void osmscout::MapDownloadJob::start ( )

Member Data Documentation

◆ FILE_METADATA

const char* osmscout::MapDownloadJob::FILE_METADATA
static

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