aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-30 21:21:31 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitaf37ecca3430c871ec8a03bcada90303e6bf9877 (patch)
tree228be82f1e2ff570d12507b1884ab2279f028c1f /backends/cloud/dropbox
parentcc4512e50b5489ec57adc05b3c2277c132bed767 (diff)
downloadscummvm-rg350-af37ecca3430c871ec8a03bcada90303e6bf9877.tar.gz
scummvm-rg350-af37ecca3430c871ec8a03bcada90303e6bf9877.tar.bz2
scummvm-rg350-af37ecca3430c871ec8a03bcada90303e6bf9877.zip
CLOUD: Make SavesSyncRequest work
It now actually read the "timestamps" file, loads and saves files as it should, ignores Dropbox's "not_found" error.
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index 4a17afe6c6..b33e2b6776 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -33,6 +33,9 @@
#include "common/file.h"
#include "common/json.h"
#include <curl/curl.h>
+#include "common/system.h"
+#include "common/savefile.h"
+#include "../savessyncrequest.h"
namespace Cloud {
namespace Dropbox {
@@ -188,7 +191,18 @@ Networking::Request *DropboxStorage::syncSaves(BoolCallback callback) {
false
);
*/
- return upload("/remote/test4.bmp", "final.bmp", new Common::Callback<DropboxStorage, UploadResponse>(this, &DropboxStorage::printUploadStatus));
+ /*
+ debug("%s", ConfMan.get("savepath").c_str());
+ Common::StringArray arr = g_system->getSavefileManager()->listSavefiles("*");
+ for (uint32 i = 0; i < arr.size(); ++i) {
+ debug("%s", arr[i].c_str());
+ }
+ debug("EOL");
+ */
+ //return upload("/remote/backslash", "C:\\Users\\Tkachov\\AppData\\Roaming\\ScummVM\\Saved games\\sword25.000", new Common::Callback<DropboxStorage, UploadResponse>(this, &DropboxStorage::printUploadStatus));
+ //return upload("/remote/slash", "C:/Users/Tkachov/AppData/Roaming/ScummVM/Saved games/sword25.000", new Common::Callback<DropboxStorage, UploadResponse>(this, &DropboxStorage::printUploadStatus));
+ return ConnMan.addRequest(new SavesSyncRequest(this, new Common::Callback<DropboxStorage, BoolResponse>(this, &DropboxStorage::printBool)));
+ //return upload("/remote/test4.bmp", "final.bmp", new Common::Callback<DropboxStorage, UploadResponse>(this, &DropboxStorage::printUploadStatus));
}
Networking::Request *DropboxStorage::info(StorageInfoCallback outerCallback) {