aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-09 13:49:52 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitaf9930482e17f4b55e46707fc017090e4c24a38e (patch)
treee3a5592ff740f821b18693cff86f9fcd44b9de55 /backends/cloud/dropbox
parent4ff1ed5fe9ba86ccf5d7ad72dab8286c70ab7af3 (diff)
downloadscummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.gz
scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.bz2
scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.zip
CLOUD: Update CloudManager
It now supports only one storage of each type. Only one Storage could be loaded to the memory as well. Options' Cloud tab now changes the Storage only when user pressed OK button, giving the ability to look through the Storages without actually changing them.
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index d11d97da39..af73138a4f 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -61,11 +61,11 @@ static void saveAccessTokenCallback(Networking::JsonResponse pair) {
warning("Bad response, no token/uid passed");
} else {
//we suppose that's the first storage
- ConfMan.set("storages_number", "1", "cloud");
+ //TODO: update it to use CloudMan.replaceStorage()
ConfMan.set("current_storage", "1", "cloud");
- ConfMan.set("storage1_type", "Dropbox", "cloud");
- ConfMan.set("storage1_access_token", result.getVal("access_token")->asString(), "cloud");
- ConfMan.set("storage1_user_id", result.getVal("uid")->asString(), "cloud");
+ ConfMan.set("storage_Dropbox_type", "Dropbox", "cloud");
+ ConfMan.set("storage_Dropbox_access_token", result.getVal("access_token")->asString(), "cloud");
+ ConfMan.set("storage_Dropbox_user_id", result.getVal("uid")->asString(), "cloud");
ConfMan.removeKey("dropbox_code", "cloud");
ConfMan.flushToDisk();
debug("Now please restart ScummVM to apply the changes.");
@@ -85,8 +85,7 @@ DropboxStorage::~DropboxStorage() {
curl_global_cleanup();
}
-void DropboxStorage::saveConfig(Common::String keyPrefix) {
- ConfMan.set(keyPrefix + "type", "Dropbox", "cloud");
+void DropboxStorage::saveConfig(Common::String keyPrefix) {
ConfMan.set(keyPrefix + "access_token", _token, "cloud");
ConfMan.set(keyPrefix + "user_id", _uid, "cloud");
}