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/http/httpjsonrequest.h"
29#include "common/array.h"
30#include "common/singleton.h"
31#include "common/str-array.h"
32#include "common/events.h"
45 kStorageDropboxId = 1,
46 kStorageOneDriveId = 2,
47 kStorageGoogleDriveId = 3,
54 static const char *
const kStoragePrefix;
56 struct StorageConfig {
63 uint _currentStorageIndex;
325#define CloudMan Cloud::CloudManager::instance()
Definition: cloudicon.h:29
Definition: cloudmanager.h:53
uint64 getDownloadTotalBytesNumber() const
Common::Path getDownloadLocalDirectory() const
void cancelDownload() const
Common::String getStorageUsername(uint32 index)
bool canSyncFilename(const Common::String &filename) const
void setStorageLastSync(uint32 index, const Common::String &date)
void setDownloadTarget(GUI::CommandReceiver *target) const
bool startDownload(const Common::String &remotePath, const Common::Path &localPath) const
double getSyncDownloadingProgress() const
Common::String savesDirectoryPath()
uint64 getDownloadBytesNumber() const
void connectStorage(uint32 index, Networking::JsonResponse codeFlowJson, Networking::ErrorCallback cb=nullptr)
void getSyncDownloadingInfo(Storage::SyncDownloadingInfo &info) const
bool isDownloading() const
uint64 getStorageUsedSpace(uint32 index)
void setStorageUsername(uint32 index, const Common::String &name)
uint32 getStorageIndex() const
Cloud::Storage * getCurrentStorage() const
Networking::Request * listDirectory(const Common::String &path, Storage::ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive=false)
uint64 getDownloadSpeed() const
void replaceStorage(Storage *storage, uint32 index)
Common::String getStorageLastSync(uint32 index)
Networking::Request * downloadFolder(const Common::String &remotePath, const Common::Path &localPath, Storage::FileArrayCallback callback, Networking::ErrorCallback errorCallback, bool recursive=false)
void disconnectStorage(uint32 index)
bool switchStorage(uint32 index)
double getDownloadingProgress() const
SavesSyncRequest * syncSaves(Cloud::Storage::BoolCallback callback=nullptr, Networking::ErrorCallback errorCallback=nullptr)
bool connectStorage(Networking::JsonResponse codeFlowJson, Networking::ErrorCallback cb=nullptr)
void removeStorage(Storage *storage)
void setStorageUsedSpace(uint32 index, uint64 used)
Common::String getDownloadRemoteDirectory() const
Networking::Request * info(Storage::StorageInfoCallback callback, Networking::ErrorCallback errorCallback)
Common::Array< Common::String > getSyncingFiles() const
bool isStorageEnabled() const
void connectStorage(uint32 index, const Common::String &code, Networking::ErrorCallback cb=nullptr)
void showCloudDisabledIcon()
double getSyncProgress() const
Common::StringArray listStorages() const
Definition: savessyncrequest.h:32
Definition: singleton.h:42
Definition: request.h:119
Definition: storage.h:189