aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-31 16:23:25 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit3638c8348d98273da5c4e2c5bd1afa8a985a2d0c (patch)
tree0f3e1a20e5a25c051e901f318f42cb2c1251789f /backends/cloud/dropbox
parentb39f46788a70a6c72d5ca678c79c0b53ebde9b68 (diff)
downloadscummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.tar.gz
scummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.tar.bz2
scummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.zip
CLOUD: Make SavesSyncRequest work with OneDrive
It actually works fine, but small Storage::savesDirectoryPath() was added, because Dropbox's directories must start with a slash, and OneDrive's directories must not. Saves sync tested and it works fine with OneDrive.
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp2
-rw-r--r--backends/cloud/dropbox/dropboxstorage.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index 7ba072d578..beb510882a 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -178,6 +178,8 @@ Networking::Request *DropboxStorage::info(StorageInfoCallback outerCallback, Net
//and then calls the outerCallback (which wants to receive StorageInfo, not void *)
}
+Common::String DropboxStorage::savesDirectoryPath() { return "/saves/"; }
+
void DropboxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networking::JsonResponse response) {
Common::JSONValue *json = response.value;
if (!json) {
diff --git a/backends/cloud/dropbox/dropboxstorage.h b/backends/cloud/dropbox/dropboxstorage.h
index a5ef76a3d6..90a1d270e8 100644
--- a/backends/cloud/dropbox/dropboxstorage.h
+++ b/backends/cloud/dropbox/dropboxstorage.h
@@ -103,6 +103,9 @@ public:
/** This method is passed into info(). (Temporary) */
void infoMethodCallback(StorageInfoResponse response);
+ /** Returns storage's saves directory path with the trailing slash. */
+ virtual Common::String savesDirectoryPath();
+
/** Returns whether saves sync process is running. */
virtual bool isSyncing() { return false; } //TODO