aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cloud/dropbox')
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp8
-rw-r--r--backends/cloud/dropbox/dropboxstorage.h3
2 files changed, 4 insertions, 7 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index f51819ccae..861a58db4b 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -110,11 +110,11 @@ void DropboxStorage::printStorageFile(UploadResponse response) {
}
Networking::Request *DropboxStorage::listDirectory(Common::String path, ListDirectoryCallback outerCallback, Networking::ErrorCallback errorCallback, bool recursive) {
- return ConnMan.addRequest(new DropboxListDirectoryRequest(_token, path, outerCallback, errorCallback, recursive));
+ return addRequest(new DropboxListDirectoryRequest(_token, path, outerCallback, errorCallback, recursive));
}
Networking::Request *DropboxStorage::upload(Common::String path, Common::SeekableReadStream *contents, UploadCallback callback, Networking::ErrorCallback errorCallback) {
- return ConnMan.addRequest(new DropboxUploadRequest(_token, path, contents, callback, errorCallback));
+ return addRequest(new DropboxUploadRequest(_token, path, contents, callback, errorCallback));
}
Networking::Request *DropboxStorage::streamFile(Common::String path, Networking::NetworkReadStreamCallback callback, Networking::ErrorCallback errorCallback) {
@@ -134,14 +134,14 @@ Networking::Request *DropboxStorage::streamFile(Common::String path, Networking:
Networking::Request *DropboxStorage::createDirectory(Common::String path, BoolCallback callback, Networking::ErrorCallback errorCallback) {
if (!errorCallback) errorCallback = getErrorPrintingCallback();
- return ConnMan.addRequest(new DropboxCreateDirectoryRequest(_token, path, callback, errorCallback));
+ return addRequest(new DropboxCreateDirectoryRequest(_token, path, callback, errorCallback));
}
Networking::Request *DropboxStorage::info(StorageInfoCallback outerCallback, Networking::ErrorCallback errorCallback) {
Networking::JsonCallback innerCallback = new Common::CallbackBridge<DropboxStorage, StorageInfoResponse, Networking::JsonResponse>(this, &DropboxStorage::infoInnerCallback, outerCallback);
Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, "https://api.dropboxapi.com/1/account/info");
request->addHeader("Authorization: Bearer " + _token);
- return ConnMan.addRequest(request);
+ return addRequest(request);
//that callback bridge wraps the outerCallback (passed in arguments from user) into innerCallback
//so, when CurlJsonRequest is finished, it calls the innerCallback
//innerCallback (which is DropboxStorage::infoInnerCallback in this case) processes the void *ptr
diff --git a/backends/cloud/dropbox/dropboxstorage.h b/backends/cloud/dropbox/dropboxstorage.h
index 2c60097701..c186d1e5d6 100644
--- a/backends/cloud/dropbox/dropboxstorage.h
+++ b/backends/cloud/dropbox/dropboxstorage.h
@@ -91,9 +91,6 @@ public:
/** Returns storage's saves directory path with the trailing slash. */
virtual Common::String savesDirectoryPath();
- /** Returns whether there are any requests running. */
- virtual bool isWorking() { return false; } //TODO
-
/**
* Load token and user id from configs and return DropboxStorage for those.
* @return pointer to the newly created DropboxStorage or 0 if some problem occured.