diff options
author | Alexander Tkachev | 2016-06-05 00:06:36 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | e98b0b12adc9ac6440ec4940d595095115f00d23 (patch) | |
tree | 6489025be7746eca2d0d1d9acfb5ad24afed00a0 /backends/cloud/storage.h | |
parent | 1bcbab7ad23b7dd47392e0d7a1fd2e56b385b367 (diff) | |
download | scummvm-rg350-e98b0b12adc9ac6440ec4940d595095115f00d23.tar.gz scummvm-rg350-e98b0b12adc9ac6440ec4940d595095115f00d23.tar.bz2 scummvm-rg350-e98b0b12adc9ac6440ec4940d595095115f00d23.zip |
CLOUD: Extend Storage & SavesSyncRequest
Now one can learn whether SavesSyncRequest is running, its progress and
which files are being synced.
Diffstat (limited to 'backends/cloud/storage.h')
-rw-r--r-- | backends/cloud/storage.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/cloud/storage.h b/backends/cloud/storage.h index 1276b81827..0f518de5cd 100644 --- a/backends/cloud/storage.h +++ b/backends/cloud/storage.h @@ -35,6 +35,8 @@ namespace Cloud { +class SavesSyncRequest; + class Storage { public: typedef Networking::Response<Common::Array<StorageFile>&> FileArrayResponse; @@ -53,6 +55,7 @@ protected: /** Keeps track of running requests. */ uint32 _runningRequestsCount; Common::Mutex _runningRequestsMutex; + SavesSyncRequest *_savesSyncRequest; /** Returns default error callback (printErrorResponse). */ virtual Networking::ErrorCallback getErrorPrintingCallback(); @@ -134,6 +137,15 @@ public: /** Returns whether there are any requests running. */ virtual bool isWorking(); + + /** Returns whether there is a SavesSyncRequest running. */ + virtual bool isSyncing(); + + /** Returns a number in [0, 1] range which represents current sync progress (1 = complete). */ + virtual double getSyncProgress(); + + /** Returns an array of saves names which are not yet synced (thus cannot be used). */ + virtual Common::Array<Common::String> getSyncingFiles(); }; } // End of namespace Cloud |