aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/googledrive
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-21 17:07:23 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitf3a392359be2f6d05bac107a5f7bd168c178e428 (patch)
treeeab864e98d1b75414f55053375fab076e1b23ecc /backends/cloud/googledrive
parentfa3ea83165d6c378348f61f8daec85f805626dbe (diff)
downloadscummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.tar.gz
scummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.tar.bz2
scummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.zip
CLOUD: Fix finishSuccess() warning
Diffstat (limited to 'backends/cloud/googledrive')
-rw-r--r--backends/cloud/googledrive/googledrivecreatedirectoryrequest.cpp6
-rw-r--r--backends/cloud/googledrive/googledrivecreatedirectoryrequest.h2
-rw-r--r--backends/cloud/googledrive/googledrivedownloadrequest.cpp4
-rw-r--r--backends/cloud/googledrive/googledrivedownloadrequest.h2
-rw-r--r--backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp4
-rw-r--r--backends/cloud/googledrive/googledrivelistdirectorybyidrequest.h2
-rw-r--r--backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp4
-rw-r--r--backends/cloud/googledrive/googledrivelistdirectoryrequest.h2
-rw-r--r--backends/cloud/googledrive/googledrivetokenrefresher.cpp6
-rw-r--r--backends/cloud/googledrive/googledrivetokenrefresher.h2
-rw-r--r--backends/cloud/googledrive/googledriveuploadrequest.cpp6
-rw-r--r--backends/cloud/googledrive/googledriveuploadrequest.h2
12 files changed, 21 insertions, 21 deletions
diff --git a/backends/cloud/googledrive/googledrivecreatedirectoryrequest.cpp b/backends/cloud/googledrive/googledrivecreatedirectoryrequest.cpp
index 2b7a805bb9..9e339fd999 100644
--- a/backends/cloud/googledrive/googledrivecreatedirectoryrequest.cpp
+++ b/backends/cloud/googledrive/googledrivecreatedirectoryrequest.cpp
@@ -90,7 +90,7 @@ void GoogleDriveCreateDirectoryRequest::idResolvedCallback(Storage::UploadRespon
if (response.request) _date = response.request->date();
//resolved => folder already exists
- finishSuccess(false);
+ finishCreation(false);
}
void GoogleDriveCreateDirectoryRequest::idResolveFailedCallback(Networking::ErrorResponse error) {
@@ -121,7 +121,7 @@ void GoogleDriveCreateDirectoryRequest::createdDirectoryCallback(Storage::BoolRe
_workingRequest = nullptr;
if (_ignoreCallback) return;
if (response.request) _date = response.request->date();
- finishSuccess(response.value);
+ finishCreation(response.value);
}
void GoogleDriveCreateDirectoryRequest::createdDirectoryErrorCallback(Networking::ErrorResponse error) {
@@ -137,7 +137,7 @@ void GoogleDriveCreateDirectoryRequest::restart() { start(); }
Common::String GoogleDriveCreateDirectoryRequest::date() const { return _date; }
-void GoogleDriveCreateDirectoryRequest::finishSuccess(bool success) {
+void GoogleDriveCreateDirectoryRequest::finishCreation(bool success) {
Request::finishSuccess();
if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success));
}
diff --git a/backends/cloud/googledrive/googledrivecreatedirectoryrequest.h b/backends/cloud/googledrive/googledrivecreatedirectoryrequest.h
index f71afeb888..7a6ffaca1b 100644
--- a/backends/cloud/googledrive/googledrivecreatedirectoryrequest.h
+++ b/backends/cloud/googledrive/googledrivecreatedirectoryrequest.h
@@ -49,7 +49,7 @@ class GoogleDriveCreateDirectoryRequest: public Networking::Request {
void idResolveFailedCallback(Networking::ErrorResponse error);
void createdDirectoryCallback(Storage::BoolResponse response);
void createdDirectoryErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishCreation(bool success);
public:
GoogleDriveCreateDirectoryRequest(GoogleDriveStorage *storage, Common::String parentPath, Common::String directoryName, Storage::BoolCallback cb, Networking::ErrorCallback ecb);
virtual ~GoogleDriveCreateDirectoryRequest();
diff --git a/backends/cloud/googledrive/googledrivedownloadrequest.cpp b/backends/cloud/googledrive/googledrivedownloadrequest.cpp
index c885352fae..df28c8b27f 100644
--- a/backends/cloud/googledrive/googledrivedownloadrequest.cpp
+++ b/backends/cloud/googledrive/googledrivedownloadrequest.cpp
@@ -69,7 +69,7 @@ void GoogleDriveDownloadRequest::idResolveFailedCallback(Networking::ErrorRespon
void GoogleDriveDownloadRequest::downloadCallback(Storage::BoolResponse response) {
_workingRequest = nullptr;
if (_ignoreCallback) return;
- finishSuccess(response.value);
+ finishDownload(response.value);
}
void GoogleDriveDownloadRequest::downloadErrorCallback(Networking::ErrorResponse error) {
@@ -82,7 +82,7 @@ void GoogleDriveDownloadRequest::handle() {}
void GoogleDriveDownloadRequest::restart() { start(); }
-void GoogleDriveDownloadRequest::finishSuccess(bool success) {
+void GoogleDriveDownloadRequest::finishDownload(bool success) {
Request::finishSuccess();
if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success));
}
diff --git a/backends/cloud/googledrive/googledrivedownloadrequest.h b/backends/cloud/googledrive/googledrivedownloadrequest.h
index 89bd313467..202a393d7a 100644
--- a/backends/cloud/googledrive/googledrivedownloadrequest.h
+++ b/backends/cloud/googledrive/googledrivedownloadrequest.h
@@ -44,7 +44,7 @@ class GoogleDriveDownloadRequest: public Networking::Request {
void idResolveFailedCallback(Networking::ErrorResponse error);
void downloadCallback(Storage::BoolResponse response);
void downloadErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishDownload(bool success);
public:
GoogleDriveDownloadRequest(GoogleDriveStorage *storage, Common::String remotePath, Common::String localPath, Storage::BoolCallback cb, Networking::ErrorCallback ecb);
virtual ~GoogleDriveDownloadRequest();
diff --git a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
index 2530bab557..582f67c2cf 100644
--- a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
+++ b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
@@ -118,7 +118,7 @@ void GoogleDriveListDirectoryByIdRequest::responseCallback(Networking::JsonRespo
Common::String token = responseObject.getVal("nextPageToken")->asString();
makeRequest(token);
} else {
- finishSuccess(_files);
+ finishListing(_files);
}
} else {
warning("null, not json");
@@ -142,7 +142,7 @@ void GoogleDriveListDirectoryByIdRequest::restart() { start(); }
Common::String GoogleDriveListDirectoryByIdRequest::date() const { return _date; }
-void GoogleDriveListDirectoryByIdRequest::finishSuccess(Common::Array<StorageFile> &files) {
+void GoogleDriveListDirectoryByIdRequest::finishListing(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));
}
diff --git a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.h b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.h
index ceb533e635..ecde880323 100644
--- a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.h
+++ b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.h
@@ -47,7 +47,7 @@ class GoogleDriveListDirectoryByIdRequest: public Networking::Request {
void makeRequest(Common::String pageToken);
void responseCallback(Networking::JsonResponse response);
void errorCallback(Networking::ErrorResponse error);
- void finishSuccess(Common::Array<StorageFile> &files);
+ void finishListing(Common::Array<StorageFile> &files);
public:
GoogleDriveListDirectoryByIdRequest(GoogleDriveStorage *storage, Common::String id, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb);
virtual ~GoogleDriveListDirectoryByIdRequest();
diff --git a/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp
index 3387b43418..f645041eb3 100644
--- a/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp
+++ b/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp
@@ -75,7 +75,7 @@ void GoogleDriveListDirectoryRequest::idResolveErrorCallback(Networking::ErrorRe
void GoogleDriveListDirectoryRequest::listNextDirectory() {
if (_directoriesQueue.empty()) {
- finishSuccess(_files);
+ finishListing(_files);
return;
}
@@ -120,7 +120,7 @@ void GoogleDriveListDirectoryRequest::restart() { start(); }
Common::String GoogleDriveListDirectoryRequest::date() const { return _date; }
-void GoogleDriveListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) {
+void GoogleDriveListDirectoryRequest::finishListing(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));
}
diff --git a/backends/cloud/googledrive/googledrivelistdirectoryrequest.h b/backends/cloud/googledrive/googledrivelistdirectoryrequest.h
index b3d8ff6c93..d76338b7fc 100644
--- a/backends/cloud/googledrive/googledrivelistdirectoryrequest.h
+++ b/backends/cloud/googledrive/googledrivelistdirectoryrequest.h
@@ -51,7 +51,7 @@ class GoogleDriveListDirectoryRequest: public Networking::Request {
void listNextDirectory();
void listedDirectoryCallback(Storage::FileArrayResponse response);
void listedDirectoryErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(Common::Array<StorageFile> &files);
+ void finishListing(Common::Array<StorageFile> &files);
public:
GoogleDriveListDirectoryRequest(GoogleDriveStorage *storage, Common::String path, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb, bool recursive = false);
virtual ~GoogleDriveListDirectoryRequest();
diff --git a/backends/cloud/googledrive/googledrivetokenrefresher.cpp b/backends/cloud/googledrive/googledrivetokenrefresher.cpp
index 3fae830105..3dfb8436e9 100644
--- a/backends/cloud/googledrive/googledrivetokenrefresher.cpp
+++ b/backends/cloud/googledrive/googledrivetokenrefresher.cpp
@@ -56,10 +56,10 @@ void GoogleDriveTokenRefresher::tokenRefreshed(Storage::BoolResponse response) {
retry(0);
}
-void GoogleDriveTokenRefresher::finishSuccess(Common::JSONValue *json) {
+void GoogleDriveTokenRefresher::finishJson(Common::JSONValue *json) {
if (!json) {
//that's probably not an error (200 OK)
- CurlJsonRequest::finishSuccess(nullptr);
+ CurlJsonRequest::finishJson(nullptr);
return;
}
@@ -101,7 +101,7 @@ void GoogleDriveTokenRefresher::finishSuccess(Common::JSONValue *json) {
}
//notify user of success
- CurlJsonRequest::finishSuccess(json);
+ CurlJsonRequest::finishJson(json);
}
void GoogleDriveTokenRefresher::setHeaders(Common::Array<Common::String> &headers) {
diff --git a/backends/cloud/googledrive/googledrivetokenrefresher.h b/backends/cloud/googledrive/googledrivetokenrefresher.h
index 3dcb56bde6..3bc5fbd784 100644
--- a/backends/cloud/googledrive/googledrivetokenrefresher.h
+++ b/backends/cloud/googledrive/googledrivetokenrefresher.h
@@ -37,7 +37,7 @@ class GoogleDriveTokenRefresher: public Networking::CurlJsonRequest {
void tokenRefreshed(Storage::BoolResponse response);
- virtual void finishSuccess(Common::JSONValue *json);
+ virtual void finishJson(Common::JSONValue *json);
public:
GoogleDriveTokenRefresher(GoogleDriveStorage *parent, Networking::JsonCallback callback, Networking::ErrorCallback ecb, const char *url);
virtual ~GoogleDriveTokenRefresher();
diff --git a/backends/cloud/googledrive/googledriveuploadrequest.cpp b/backends/cloud/googledrive/googledriveuploadrequest.cpp
index b24e02edbf..d9ba2815e0 100644
--- a/backends/cloud/googledrive/googledriveuploadrequest.cpp
+++ b/backends/cloud/googledrive/googledriveuploadrequest.cpp
@@ -279,14 +279,14 @@ void GoogleDriveUploadRequest::partUploadedCallback(Networking::JsonResponse res
timestamp = ISO8601::convertToTimestamp(object.getVal("modifiedTime")->asString());
//as we list directory by id, we can't determine full path for the file, so we leave it empty
- finishSuccess(StorageFile(id, _savePath, name, size, timestamp, isDirectory));
+ finishUpload(StorageFile(id, _savePath, name, size, timestamp, isDirectory));
return;
}
}
if (_contentsStream->eos() || _contentsStream->pos() >= _contentsStream->size() - 1) {
warning("no file info to return");
- finishSuccess(StorageFile(_savePath, 0, 0, false));
+ finishUpload(StorageFile(_savePath, 0, 0, false));
} else {
uploadNextPart();
}
@@ -320,7 +320,7 @@ void GoogleDriveUploadRequest::handle() {}
void GoogleDriveUploadRequest::restart() { start(); }
-void GoogleDriveUploadRequest::finishSuccess(StorageFile file) {
+void GoogleDriveUploadRequest::finishUpload(StorageFile file) {
Request::finishSuccess();
if (_uploadCallback) (*_uploadCallback)(Storage::UploadResponse(this, file));
}
diff --git a/backends/cloud/googledrive/googledriveuploadrequest.h b/backends/cloud/googledrive/googledriveuploadrequest.h
index e417403542..8cc40795e9 100644
--- a/backends/cloud/googledrive/googledriveuploadrequest.h
+++ b/backends/cloud/googledrive/googledriveuploadrequest.h
@@ -54,7 +54,7 @@ class GoogleDriveUploadRequest: public Networking::Request {
void partUploadedCallback(Networking::JsonResponse response);
void partUploadedErrorCallback(Networking::ErrorResponse error);
bool handleHttp308(const Networking::NetworkReadStream *stream);
- void finishSuccess(StorageFile status);
+ void finishUpload(StorageFile status);
public:
GoogleDriveUploadRequest(GoogleDriveStorage *storage, Common::String path, Common::SeekableReadStream *contents, Storage::UploadCallback callback, Networking::ErrorCallback ecb);