diff options
author | Alexander Tkachev | 2016-07-04 15:11:07 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | dc0a95617227c2a2489150aec69ec0c464cd30de (patch) | |
tree | 68de72fbb7c6caa705999a33fe8449b3ef49690c /backends | |
parent | d776b5397198835e1538071fd4fe53ab491c5da4 (diff) | |
download | scummvm-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.cpp | 11 | ||||
-rw-r--r-- | backends/cloud/cloudmanager.h | 3 |
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); |