libosmscout
0.1
|
Utility class for downloading voice described by AvailableVoice over http. More...
#include <VoiceManager.h>
Public Member Functions | |
uint64_t | expectedSize () const override |
AvailableVoice | getVoice () const |
void | start () |
VoiceDownloadJob (QNetworkAccessManager *webCtrl, const AvailableVoice &voice, const QDir &target, bool replaceExisting) | |
virtual | ~VoiceDownloadJob () |
![]() | |
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 voice described by AvailableVoice over http.
osmscout::VoiceDownloadJob::VoiceDownloadJob | ( | QNetworkAccessManager * | webCtrl, |
const AvailableVoice & | voice, | ||
const QDir & | target, | ||
bool | replaceExisting | ||
) |
|
virtual |
|
inlineoverridevirtual |
Implements osmscout::DownloadJob.
|
inline |
void osmscout::VoiceDownloadJob::start | ( | ) |
References osmscout::DownloadJob::done, osmscout::DownloadJob::error, osmscout::DownloadJob::failed(), osmscout::Voice::files(), osmscout::AvailableVoice::getAuthor(), osmscout::AvailableVoice::getDescription(), osmscout::AvailableVoice::getDirectory(), osmscout::AvailableVoice::getGender(), osmscout::AvailableVoice::getLang(), osmscout::AvailableVoice::getLicense(), osmscout::AvailableVoice::getName(), osmscout::AvailableVoice::getProvider(), osmscout::DownloadJob::isReplaceExisting(), osmscout::DownloadJob::onJobFailed(), osmscout::DownloadJob::start(), osmscout::DownloadJob::started, and osmscout::DownloadJob::target.