diff options
author | Alexander Tkachev | 2016-07-04 16:14:30 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | b8ee9d4e7d32d0cc0dd832cbd0ffec5c5d08db34 (patch) | |
tree | 8394f3ff0b9e272acd8840df82c56f316698e129 /backends/cloud/cloudmanager.cpp | |
parent | 71a326493b351b845ea800ae88495238b1a61066 (diff) | |
download | scummvm-rg350-b8ee9d4e7d32d0cc0dd832cbd0ffec5c5d08db34.tar.gz scummvm-rg350-b8ee9d4e7d32d0cc0dd832cbd0ffec5c5d08db34.tar.bz2 scummvm-rg350-b8ee9d4e7d32d0cc0dd832cbd0ffec5c5d08db34.zip |
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.
Diffstat (limited to 'backends/cloud/cloudmanager.cpp')
-rw-r--r-- | backends/cloud/cloudmanager.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp index 68c7e9aa8a..a1756ed5a6 100644 --- a/backends/cloud/cloudmanager.cpp +++ b/backends/cloud/cloudmanager.cpp @@ -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 |