aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/onedrive
diff options
context:
space:
mode:
authorAlexander Tkachev2016-05-26 17:12:40 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commiteda575a660543884b1a4addd21b676a67d2c2a31 (patch)
tree0964f46167ff44daefba64cf429ea69da5512aeb /backends/cloud/onedrive
parent17fc40a94436f970af75d6717c7a63c70eafcb12 (diff)
downloadscummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.gz
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.tar.bz2
scummvm-rg350-eda575a660543884b1a4addd21b676a67d2c2a31.zip
CLOUD: Add Requests id
(Upgrading ConnectionManager step by step.)
Diffstat (limited to 'backends/cloud/onedrive')
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp4
-rw-r--r--backends/cloud/onedrive/onedrivestorage.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index 2f10841cc9..b0690be5b0 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -137,12 +137,12 @@ void OneDriveStorage::printJson(void *jsonPointer) {
delete json;
}
-void OneDriveStorage::syncSaves(BoolCallback callback) {
+int32 OneDriveStorage::syncSaves(BoolCallback callback) {
//this is not the real syncSaves() implementation
Common::BaseCallback<> *innerCallback = new Common::Callback<OneDriveStorage>(this, &OneDriveStorage::printJson);
Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, "https://api.onedrive.com/v1.0/drives/");
request->addHeader("Authorization: bearer " + _token);
- ConnMan.addRequest(request);
+ return ConnMan.addRequest(request);
}
OneDriveStorage *OneDriveStorage::loadFromConfig(Common::String keyPrefix) {
diff --git a/backends/cloud/onedrive/onedrivestorage.h b/backends/cloud/onedrive/onedrivestorage.h
index 28f37aee2c..4141771f65 100644
--- a/backends/cloud/onedrive/onedrivestorage.h
+++ b/backends/cloud/onedrive/onedrivestorage.h
@@ -74,31 +74,31 @@ public:
/** Public Cloud API comes down there. */
/** Returns Common::Array<StorageFile>. */
- virtual void listDirectory(Common::String path, FileArrayCallback callback, bool recursive = false) {} //TODO
+ virtual int32 listDirectory(Common::String path, FileArrayCallback callback, bool recursive = false) { return -1; } //TODO
/** Calls the callback when finished. */
- virtual void upload(Common::String path, Common::ReadStream *contents, BoolCallback callback) {} //TODO
+ virtual int32 upload(Common::String path, Common::ReadStream *contents, BoolCallback callback) { return -1; } //TODO
/** Returns pointer to Networking::NetworkReadStream. */
virtual Networking::NetworkReadStream *streamFile(Common::String path) { return 0; } //TODO
/** Calls the callback when finished. */
- virtual void download(Common::String remotePath, Common::String localPath, BoolCallback callback) {} //TODO
+ virtual int32 download(Common::String remotePath, Common::String localPath, BoolCallback callback) { return -1; } //TODO
/** Calls the callback when finished. */
- virtual void remove(Common::String path, BoolCallback callback) {} //TODO
+ virtual int32 remove(Common::String path, BoolCallback callback) { return -1; } //TODO
/** Calls the callback when finished. */
- virtual void syncSaves(BoolCallback callback);
+ virtual int32 syncSaves(BoolCallback callback);
/** Calls the callback when finished. */
- virtual void createDirectory(Common::String path, BoolCallback callback) {} //TODO
+ virtual int32 createDirectory(Common::String path, BoolCallback callback) { return -1; } //TODO
/** Calls the callback when finished. */
- virtual void touch(Common::String path, BoolCallback callback) {} //TODO
+ virtual int32 touch(Common::String path, BoolCallback callback) { return -1; } //TODO
/** Returns the StorageInfo struct. */
- virtual void info(StorageInfoCallback callback) {} //TODO
+ virtual int32 info(StorageInfoCallback callback) { return -1; } //TODO
/** Returns whether saves sync process is running. */
virtual bool isSyncing() { return false; } //TODO