aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
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);