22 #ifndef CLOUD_CLOUDMANAGER_H 23 #define CLOUD_CLOUDMANAGER_H 25 #include "backends/cloud/storage.h" 26 #include "backends/cloud/cloudicon.h" 27 #include "backends/networking/curl/curljsonrequest.h" 29 #include "common/array.h" 30 #include "common/singleton.h" 31 #include "common/str-array.h" 32 #include "common/events.h" 36 class CommandReceiver;
45 kStorageDropboxId = 1,
46 kStorageOneDriveId = 2,
47 kStorageGoogleDriveId = 3,
54 static const char *
const kStoragePrefix;
56 struct StorageConfig {
63 uint _currentStorageIndex;
114 void replaceStorage(
Storage *storage, uint32 index);
117 void removeStorage(
Storage *storage);
132 uint32 getStorageIndex()
const;
146 bool switchStorage(uint32 index);
162 uint64 getStorageUsedSpace(uint32 index);
181 void setStorageUsername(uint32 index,
const Common::String &name);
190 void setStorageUsedSpace(uint32 index, uint64 used);
199 void setStorageLastSync(uint32 index,
const Common::String &date);
237 void disconnectStorage(uint32 index);
255 bool isStorageEnabled()
const;
258 void enableStorage();
266 bool isWorking()
const;
271 bool isSyncing()
const;
274 double getSyncDownloadingProgress()
const;
280 double getSyncProgress()
const;
286 void cancelSync()
const;
289 void showCloudDisabledIcon();
297 void cancelDownload()
const;
303 bool isDownloading()
const;
306 double getDownloadingProgress()
const;
309 uint64 getDownloadBytesNumber()
const;
312 uint64 getDownloadTotalBytesNumber()
const;
315 uint64 getDownloadSpeed()
const;
325 #define CloudMan Cloud::CloudManager::instance()
Definition: basestorage.h:28
Definition: cloudmanager.h:53
Definition: cloudicon.h:29
Definition: callback.h:49
Definition: storage.h:189
Definition: savessyncrequest.h:32
Definition: singleton.h:42
Definition: request.h:119