aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-04 15:11:07 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitdc0a95617227c2a2489150aec69ec0c464cd30de (patch)
tree68de72fbb7c6caa705999a33fe8449b3ef49690c /backends
parentd776b5397198835e1538071fd4fe53ab491c5da4 (diff)
downloadscummvm-rg350-dc0a95617227c2a2489150aec69ec0c464cd30de.tar.gz
scummvm-rg350-dc0a95617227c2a2489150aec69ec0c464cd30de.tar.bz2
scummvm-rg350-dc0a95617227c2a2489150aec69ec0c464cd30de.zip
CLOUD: Add CloudManager::downloadFolder()
Diffstat (limited to 'backends')
-rw-r--r--backends/cloud/cloudmanager.cpp11
-rw-r--r--backends/cloud/cloudmanager.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp
index b9de6d48ab..0a5006ccef 100644
--- a/backends/cloud/cloudmanager.cpp
+++ b/backends/cloud/cloudmanager.cpp
@@ -226,6 +226,17 @@ Networking::Request *CloudManager::listDirectory(Common::String path, Storage::L
return nullptr;
}
+Networking::Request *CloudManager::downloadFolder(Common::String remotePath, Common::String localPath, Storage::FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive) {
+ Storage *storage = getCurrentStorage();
+ if (storage) storage->downloadFolder(remotePath, localPath, callback, errorCallback, recursive);
+ else {
+ delete callback;
+ delete errorCallback;
+ //TODO: should we call errorCallback?
+ }
+ return nullptr;
+}
+
Networking::Request *CloudManager::info(Storage::StorageInfoCallback callback, Networking::ErrorCallback errorCallback) {
Storage *storage = getCurrentStorage();
if (storage) storage->info(callback, errorCallback);
diff --git a/backends/cloud/cloudmanager.h b/backends/cloud/cloudmanager.h
index 70b32f0758..574c51a439 100644
--- a/backends/cloud/cloudmanager.h
+++ b/backends/cloud/cloudmanager.h
@@ -184,6 +184,9 @@ public:
/** Returns ListDirectoryResponse with list of files. */
Networking::Request *listDirectory(Common::String path, Storage::ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive = false);
+ /** Returns Common::Array<StorageFile> with list of files, which were not downloaded. */
+ Networking::Request *downloadFolder(Common::String remotePath, Common::String localPath, Storage::FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive = false);
+
/** Return the StorageInfo struct. */
Networking::Request *info(Storage::StorageInfoCallback callback, Networking::ErrorCallback errorCallback);