From 41e65db7d0468b01f626c6ce21a1b8e6791f58fa Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Mon, 23 May 2016 11:23:33 +0600 Subject: CLOUD: Add Storage saving mechanism In this commit CloudManager starts supporting multiple Storage. Now, in its init() it loads all the Storages and determines the current one. It now also has save() method. In that method all Storages are saved with their new saveConfig() method. CloudManager::save() not called from anywhere, though. The only one Storage that could be added is DropboxStorage in case you have no cloud-related config keys or you have no storages connected. --- common/cloudmanager.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/cloudmanager.h b/common/cloudmanager.h index 5919937720..d1c89454b1 100644 --- a/common/cloudmanager.h +++ b/common/cloudmanager.h @@ -40,6 +40,12 @@ public: virtual void init() = 0; + /** + * Saves all information into configuration file. + */ + + virtual void save() = 0; + /** * Returns active Storage, which could be used to interact * with cloud storage. @@ -47,7 +53,7 @@ public: * @return active Cloud::Storage or null, if there is no active Storage. */ - virtual Cloud::Storage* getCurrentStorage() = 0; + virtual Cloud::Storage *getCurrentStorage() = 0; /** * Starts saves syncing process in currently active storage if there is any. -- cgit v1.2.3