aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud
diff options
context:
space:
mode:
authorPeter Bozsó2016-07-14 10:00:34 +0200
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit7951a2ea167dee8c380ade40fefa95bb4d9baec1 (patch)
treeba6c54fe2cefd9381ddd8940d5d110e8154cc324 /backends/cloud
parentd8a43cf290af683456dd6736c0f50b114349a3d9 (diff)
downloadscummvm-rg350-7951a2ea167dee8c380ade40fefa95bb4d9baec1.tar.gz
scummvm-rg350-7951a2ea167dee8c380ade40fefa95bb4d9baec1.tar.bz2
scummvm-rg350-7951a2ea167dee8c380ade40fefa95bb4d9baec1.zip
CLOUD: Rename _files to _pendingFiles in FolderDownloadRequest
Diffstat (limited to 'backends/cloud')
-rw-r--r--backends/cloud/folderdownloadrequest.cpp14
-rw-r--r--backends/cloud/folderdownloadrequest.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/backends/cloud/folderdownloadrequest.cpp b/backends/cloud/folderdownloadrequest.cpp
index bbb3c646ac..1d42f27d3f 100644
--- a/backends/cloud/folderdownloadrequest.cpp
+++ b/backends/cloud/folderdownloadrequest.cpp
@@ -47,7 +47,7 @@ void FolderDownloadRequest::start() {
_ignoreCallback = true;
if (_workingRequest) _workingRequest->finish();
_currentFile = StorageFile();
- _files.clear();
+ _pendingFiles.clear();
_failedFiles.clear();
_ignoreCallback = false;
_totalFiles = 0;
@@ -64,8 +64,8 @@ void FolderDownloadRequest::start() {
void FolderDownloadRequest::directoryListedCallback(Storage::ListDirectoryResponse response) {
_workingRequest = nullptr;
if (_ignoreCallback) return;
- _files = response.value;
- _totalFiles = _files.size();
+ _pendingFiles = response.value;
+ _totalFiles = _pendingFiles.size();
downloadNextFile();
}
@@ -90,13 +90,13 @@ void FolderDownloadRequest::fileDownloadedErrorCallback(Networking::ErrorRespons
void FolderDownloadRequest::downloadNextFile() {
do {
- if (_files.empty()) {
+ if (_pendingFiles.empty()) {
finishDownload(_failedFiles);
return;
}
- _currentFile = _files.back();
- _files.pop_back();
+ _currentFile = _pendingFiles.back();
+ _pendingFiles.pop_back();
} while (_currentFile.isDirectory()); //TODO: may be create these directories (in case those are empty)
sendCommand(GUI::kDownloadProgressCmd, (int)(getProgress() * 100));
@@ -146,7 +146,7 @@ double FolderDownloadRequest::getProgress() const {
if (idDownloadRequest != nullptr) currentFileProgress = idDownloadRequest->getProgress();
}
- return (double)(_totalFiles - _files.size() + currentFileProgress) / (double)(_totalFiles);
+ return (double)(_totalFiles - _pendingFiles.size() + currentFileProgress) / (double)(_totalFiles);
}
} // End of namespace Cloud
diff --git a/backends/cloud/folderdownloadrequest.h b/backends/cloud/folderdownloadrequest.h
index a5f13b740b..ee17de08dc 100644
--- a/backends/cloud/folderdownloadrequest.h
+++ b/backends/cloud/folderdownloadrequest.h
@@ -35,7 +35,7 @@ class FolderDownloadRequest: public Networking::Request, public GUI::CommandSend
Storage::FileArrayCallback _fileArrayCallback;
Common::String _remoteDirectoryPath, _localDirectoryPath;
bool _recursive;
- Common::Array<StorageFile> _files, _failedFiles;
+ Common::Array<StorageFile> _pendingFiles, _failedFiles;
StorageFile _currentFile;
Request *_workingRequest;
bool _ignoreCallback;