diff options
author | Alexander Tkachev | 2016-06-06 10:25:49 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 6c5a8f34eaf5fe6af0d885cb162b5ebf193030f8 (patch) | |
tree | c66ecb537752149f78ad5860f9afb83fc615f69f /backends/cloud | |
parent | 9eb4aad7fdea54fd99ad4a9aa4ab78bf64f81794 (diff) | |
download | scummvm-rg350-6c5a8f34eaf5fe6af0d885cb162b5ebf193030f8.tar.gz scummvm-rg350-6c5a8f34eaf5fe6af0d885cb162b5ebf193030f8.tar.bz2 scummvm-rg350-6c5a8f34eaf5fe6af0d885cb162b5ebf193030f8.zip |
CLOUD: Add SaveLoadCloudSyncProgress enum
It's common for Save/Load dialogs and SavesSyncRequest.
Diffstat (limited to 'backends/cloud')
-rw-r--r-- | backends/cloud/savessyncrequest.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp index d983a0fcae..f07d1d000f 100644 --- a/backends/cloud/savessyncrequest.cpp +++ b/backends/cloud/savessyncrequest.cpp @@ -27,16 +27,12 @@ #include "common/json.h" #include "common/savefile.h" #include "common/system.h" +#include "gui/saveload-dialog.h" namespace Cloud { const char *SavesSyncRequest::TIMESTAMPS_FILENAME = "timestamps"; -enum { - kSavesSyncProgressCmd = 'SSPR', - kSavesSyncEndedCmd = 'SSEN' -}; - SavesSyncRequest::SavesSyncRequest(Storage *storage, Storage::BoolCallback callback, Networking::ErrorCallback ecb): Request(nullptr, ecb), CommandSender(nullptr), _storage(storage), _boolCallback(callback), _workingRequest(nullptr), _ignoreCallback(false) { @@ -209,7 +205,7 @@ void SavesSyncRequest::directoryCreatedErrorCallback(Networking::ErrorResponse e void SavesSyncRequest::downloadNextFile() { if (_filesToDownload.empty()) { _currentDownloadingFile = StorageFile("", 0, 0, false); //so getFilesToDownload() would return an empty array - sendCommand(kSavesSyncEndedCmd, 0); + sendCommand(GUI::kSavesSyncEndedCmd, 0); uploadNextFile(); return; } @@ -217,7 +213,7 @@ void SavesSyncRequest::downloadNextFile() { _currentDownloadingFile = _filesToDownload.back(); _filesToDownload.pop_back(); - sendCommand(kSavesSyncProgressCmd, (int)(getDownloadingProgress() * 100)); + sendCommand(GUI::kSavesSyncProgressCmd, (int)(getDownloadingProgress() * 100)); /////// debug("downloading %s (%d %%)", _currentDownloadingFile.name().c_str(), (int)(getProgress() * 100)); |