diff options
Diffstat (limited to 'backends/cloud/storage.cpp')
-rw-r--r-- | backends/cloud/storage.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp index f0c1319846..08ab9e9c90 100644 --- a/backends/cloud/storage.cpp +++ b/backends/cloud/storage.cpp @@ -76,7 +76,17 @@ Networking::Request *Storage::upload(Common::String remotePath, Common::String l return upload(remotePath, f, callback, errorCallback); } +Networking::Request *Storage::streamFile(Common::String path, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback) { + //most Storages use paths instead of ids, so this should work + return streamFile(path, callback, errorCallback); +} + Networking::Request *Storage::download(Common::String remotePath, Common::String localPath, BoolCallback callback, Networking::ErrorCallback errorCallback) { + //most Storages use paths instead of ids, so this should work + return downloadById(remotePath, localPath, callback, errorCallback); +} + +Networking::Request *Storage::downloadById(Common::String remoteId, Common::String localPath, BoolCallback callback, Networking::ErrorCallback errorCallback) { if (!errorCallback) errorCallback = getErrorPrintingCallback(); Common::DumpFile *f = new Common::DumpFile(); @@ -89,12 +99,7 @@ Networking::Request *Storage::download(Common::String remotePath, Common::String return nullptr; } - return addRequest(new DownloadRequest(this, callback, errorCallback, remotePath, f)); -} - -Networking::Request *Storage::downloadById(Common::String remoteId, Common::String localPath, BoolCallback callback, Networking::ErrorCallback errorCallback) { - //most Storages use paths instead of ids, so this should work - return download(remoteId, localPath, callback, errorCallback); + return addRequest(new DownloadRequest(this, callback, errorCallback, remoteId, f)); } Networking::Request *Storage::downloadFolder(Common::String remotePath, Common::String localPath, FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive) { |