diff options
author | Alexander Tkachev | 2016-05-31 19:41:11 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 675e7a6ed1d19e64e2f80a4dd1f454e646cb52f5 (patch) | |
tree | cead5f18e92b5cfcf530b66dcd733c851acbfada /backends/cloud/onedrive/onedrivestorage.cpp | |
parent | ca85d4482af0b2e570565d5aa6d562ec86b10100 (diff) | |
download | scummvm-rg350-675e7a6ed1d19e64e2f80a4dd1f454e646cb52f5.tar.gz scummvm-rg350-675e7a6ed1d19e64e2f80a4dd1f454e646cb52f5.tar.bz2 scummvm-rg350-675e7a6ed1d19e64e2f80a4dd1f454e646cb52f5.zip |
CLOUD: Move download methods into Storage
DownloadRequest and FolderDownloadRequest are using other Storage's
methods. Thus, download() and downloadFolder() could be implemented in
base Storage class.
Diffstat (limited to 'backends/cloud/onedrive/onedrivestorage.cpp')
-rw-r--r-- | backends/cloud/onedrive/onedrivestorage.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp index c64ed6bf72..e1c6861efd 100644 --- a/backends/cloud/onedrive/onedrivestorage.cpp +++ b/backends/cloud/onedrive/onedrivestorage.cpp @@ -215,23 +215,6 @@ Networking::Request *OneDriveStorage::streamFile(Common::String path, Networking return ConnMan.addRequest(request); } -Networking::Request *OneDriveStorage::download(Common::String remotePath, Common::String localPath, BoolCallback callback, Networking::ErrorCallback errorCallback) { - Common::DumpFile *f = new Common::DumpFile(); - if (!f->open(localPath, true)) { - warning("OneDriveStorage: unable to open file to download into"); - if (errorCallback) (*errorCallback)(Networking::ErrorResponse(nullptr, false, true, "", -1)); - delete f; - return nullptr; - } - - return ConnMan.addRequest(new DownloadRequest(this, callback, errorCallback, remotePath, f)); -} - -/** Returns Common::Array<StorageFile> with list of files, which were not downloaded. */ -Networking::Request *OneDriveStorage::downloadFolder(Common::String remotePath, Common::String localPath, FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive) { - return ConnMan.addRequest(new FolderDownloadRequest(this, callback, errorCallback, remotePath, localPath, recursive)); -} - void OneDriveStorage::fileDownloaded(BoolResponse response) { if (response.value) debug("file downloaded!"); else debug("download failed!"); |