CLOUD: Add FolderDownload-related methods in Storage
CloudManager's shortcuts are added too. The idea is to keep FolderDownload request within Storage, and provide necessary means to access it. The download is started and cancelled through the DownloadDialog.
This commit is contained in:
parent
71a326493b
commit
b8ee9d4e7d
8 changed files with 164 additions and 55 deletions
|
@ -274,6 +274,8 @@ bool CloudManager::isWorking() {
|
|||
return false;
|
||||
}
|
||||
|
||||
///// SavesSyncRequest-related /////
|
||||
|
||||
bool CloudManager::isSyncing() {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) return storage->isSyncing();
|
||||
|
@ -308,4 +310,34 @@ void CloudManager::setSyncTarget(GUI::CommandReceiver *target) {
|
|||
if (storage) storage->setSyncTarget(target);
|
||||
}
|
||||
|
||||
///// DownloadFolderRequest-related /////
|
||||
|
||||
bool CloudManager::startDownload(Common::String remotePath, Common::String localPath) {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) return storage->startDownload(remotePath, localPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
void CloudManager::cancelDownload() {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) storage->cancelDownload();
|
||||
}
|
||||
|
||||
void CloudManager::setDownloadTarget(GUI::CommandReceiver *target) {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) storage->setDownloadTarget(target);
|
||||
}
|
||||
|
||||
bool CloudManager::isDownloading() {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) return storage->isDownloading();
|
||||
return false;
|
||||
}
|
||||
|
||||
double CloudManager::getDownloadingProgress() {
|
||||
Storage *storage = getCurrentStorage();
|
||||
if (storage) return storage->getDownloadingProgress();
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // End of namespace Cloud
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue