aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/cloud/downloadrequest.cpp4
-rw-r--r--backends/cloud/downloadrequest.h2
-rw-r--r--backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp4
-rw-r--r--backends/cloud/dropbox/dropboxcreatedirectoryrequest.h2
-rw-r--r--backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp4
-rw-r--r--backends/cloud/dropbox/dropboxlistdirectoryrequest.h2
-rw-r--r--backends/cloud/dropbox/dropboxuploadrequest.cpp6
-rw-r--r--backends/cloud/dropbox/dropboxuploadrequest.h2
-rw-r--r--backends/cloud/folderdownloadrequest.cpp4
-rw-r--r--backends/cloud/folderdownloadrequest.h2
-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
-rw-r--r--backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp4
-rw-r--r--backends/cloud/onedrive/onedrivecreatedirectoryrequest.h2
-rw-r--r--backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp4
-rw-r--r--backends/cloud/onedrive/onedrivelistdirectoryrequest.h2
-rw-r--r--backends/cloud/onedrive/onedrivetokenrefresher.cpp6
-rw-r--r--backends/cloud/onedrive/onedrivetokenrefresher.h2
-rw-r--r--backends/cloud/onedrive/onedriveuploadrequest.cpp6
-rw-r--r--backends/cloud/onedrive/onedriveuploadrequest.h2
-rw-r--r--backends/cloud/savessyncrequest.cpp4
-rw-r--r--backends/cloud/savessyncrequest.h2
-rw-r--r--backends/networking/curl/curljsonrequest.cpp6
-rw-r--r--backends/networking/curl/curljsonrequest.h2
34 files changed, 58 insertions, 58 deletions
diff --git a/backends/cloud/downloadrequest.cpp b/backends/cloud/downloadrequest.cpp
index 497509b4a9..c95b8b81af 100644
--- a/backends/cloud/downloadrequest.cpp
+++ b/backends/cloud/downloadrequest.cpp
@@ -101,7 +101,7 @@ void DownloadRequest::handle() {
//TODO: do something about it actually
}
- finishSuccess(_remoteFileStream->httpResponseCode() == 200);
+ finishDownload(_remoteFileStream->httpResponseCode() == 200);
_localFile->close(); //yes, I know it's closed automatically in ~DumpFile()
}
@@ -113,7 +113,7 @@ void DownloadRequest::restart() {
//start();
}
-void DownloadRequest::finishSuccess(bool success) {
+void DownloadRequest::finishDownload(bool success) {
Request::finishSuccess();
if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success));
}
diff --git a/backends/cloud/downloadrequest.h b/backends/cloud/downloadrequest.h
index ff7820e3ee..d8e18f9171 100644
--- a/backends/cloud/downloadrequest.h
+++ b/backends/cloud/downloadrequest.h
@@ -42,7 +42,7 @@ class DownloadRequest: public Networking::Request {
void start();
void streamCallback(Networking::NetworkReadStreamResponse response);
void streamErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishDownload(bool success);
virtual void finishError(Networking::ErrorResponse error);
public:
diff --git a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
index 61cc9ddfcd..a52d41e896 100644
--- a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
+++ b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp
@@ -82,7 +82,7 @@ void DropboxCreateDirectoryRequest::responseCallback(Networking::JsonResponse re
}
Common::JSONObject info = json->asObject();
- if (info.contains("id")) finishSuccess(true);
+ if (info.contains("id")) finishCreation(true);
else {
error.response = json->stringify(true);
finishError(error);
@@ -104,7 +104,7 @@ void DropboxCreateDirectoryRequest::restart() { start(); }
Common::String DropboxCreateDirectoryRequest::date() const { return _date; }
-void DropboxCreateDirectoryRequest::finishSuccess(bool success) {
+void DropboxCreateDirectoryRequest::finishCreation(bool success) {
Request::finishSuccess();
if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success));
}
diff --git a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.h b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.h
index e8599c7df9..4bdc6dbee6 100644
--- a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.h
+++ b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.h
@@ -41,7 +41,7 @@ class DropboxCreateDirectoryRequest: public Networking::Request {
void start();
void responseCallback(Networking::JsonResponse response);
void errorCallback(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishCreation(bool success);
public:
DropboxCreateDirectoryRequest(Common::String token, Common::String path, Storage::BoolCallback cb, Networking::ErrorCallback ecb);
virtual ~DropboxCreateDirectoryRequest();
diff --git a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
index 933ea2bd8e..dcbca3131e 100644
--- a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
+++ b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
@@ -125,7 +125,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
_workingRequest = ConnMan.addRequest(request);
} else {
- finishSuccess(_files);
+ finishListing(_files);
}
} else {
warning("null, not json");
@@ -149,7 +149,7 @@ void DropboxListDirectoryRequest::restart() { start(); }
Common::String DropboxListDirectoryRequest::date() const { return _date; }
-void DropboxListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) {
+void DropboxListDirectoryRequest::finishListing(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));
}
diff --git a/backends/cloud/dropbox/dropboxlistdirectoryrequest.h b/backends/cloud/dropbox/dropboxlistdirectoryrequest.h
index 0d96edd1e6..62dde71f76 100644
--- a/backends/cloud/dropbox/dropboxlistdirectoryrequest.h
+++ b/backends/cloud/dropbox/dropboxlistdirectoryrequest.h
@@ -45,7 +45,7 @@ class DropboxListDirectoryRequest: public Networking::Request {
void start();
void responseCallback(Networking::JsonResponse response);
void errorCallback(Networking::ErrorResponse error);
- void finishSuccess(Common::Array<StorageFile> &files);
+ void finishListing(Common::Array<StorageFile> &files);
public:
DropboxListDirectoryRequest(Common::String token, Common::String path, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb, bool recursive = false);
virtual ~DropboxListDirectoryRequest();
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.cpp b/backends/cloud/dropbox/dropboxuploadrequest.cpp
index f1fb818d36..e530502413 100644
--- a/backends/cloud/dropbox/dropboxuploadrequest.cpp
+++ b/backends/cloud/dropbox/dropboxuploadrequest.cpp
@@ -148,7 +148,7 @@ void DropboxUploadRequest::partUploadedCallback(Networking::JsonResponse respons
Common::String path = object.getVal("path_lower")->asString();
uint32 size = object.getVal("size")->asIntegerNumber();
uint32 timestamp = ISO8601::convertToTimestamp(object.getVal("server_modified")->asString());
- finishSuccess(StorageFile(path, size, timestamp, false));
+ finishUpload(StorageFile(path, size, timestamp, false));
return;
}
@@ -163,7 +163,7 @@ void DropboxUploadRequest::partUploadedCallback(Networking::JsonResponse respons
if (!needsFinishRequest && (_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();
}
@@ -186,7 +186,7 @@ void DropboxUploadRequest::handle() {}
void DropboxUploadRequest::restart() { start(); }
-void DropboxUploadRequest::finishSuccess(StorageFile file) {
+void DropboxUploadRequest::finishUpload(StorageFile file) {
Request::finishSuccess();
if (_uploadCallback) (*_uploadCallback)(Storage::UploadResponse(this, file));
}
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.h b/backends/cloud/dropbox/dropboxuploadrequest.h
index a85d7ef883..8d9a3e2650 100644
--- a/backends/cloud/dropbox/dropboxuploadrequest.h
+++ b/backends/cloud/dropbox/dropboxuploadrequest.h
@@ -44,7 +44,7 @@ class DropboxUploadRequest: public Networking::Request {
void uploadNextPart();
void partUploadedCallback(Networking::JsonResponse response);
void partUploadedErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(StorageFile status);
+ void finishUpload(StorageFile status);
public:
DropboxUploadRequest(Common::String token, Common::String path, Common::SeekableReadStream *contents, Storage::UploadCallback callback, Networking::ErrorCallback ecb);
diff --git a/backends/cloud/folderdownloadrequest.cpp b/backends/cloud/folderdownloadrequest.cpp
index 905b0c79f4..83296c3d15 100644
--- a/backends/cloud/folderdownloadrequest.cpp
+++ b/backends/cloud/folderdownloadrequest.cpp
@@ -83,7 +83,7 @@ void FolderDownloadRequest::fileDownloadedErrorCallback(Networking::ErrorRespons
void FolderDownloadRequest::downloadNextFile() {
do {
if (_files.empty()) {
- finishSuccess(_failedFiles);
+ finishDownload(_failedFiles);
return;
}
@@ -120,7 +120,7 @@ void FolderDownloadRequest::handle() {}
void FolderDownloadRequest::restart() { start(); }
-void FolderDownloadRequest::finishSuccess(Common::Array<StorageFile> &files) {
+void FolderDownloadRequest::finishDownload(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_fileArrayCallback) (*_fileArrayCallback)(Storage::FileArrayResponse(this, files));
}
diff --git a/backends/cloud/folderdownloadrequest.h b/backends/cloud/folderdownloadrequest.h
index 8fa3b1188b..bf55567b2d 100644
--- a/backends/cloud/folderdownloadrequest.h
+++ b/backends/cloud/folderdownloadrequest.h
@@ -45,7 +45,7 @@ class FolderDownloadRequest: public Networking::Request {
void fileDownloadedCallback(Storage::BoolResponse response);
void fileDownloadedErrorCallback(Networking::ErrorResponse error);
void downloadNextFile();
- void finishSuccess(Common::Array<StorageFile> &files);
+ void finishDownload(Common::Array<StorageFile> &files);
public:
FolderDownloadRequest(Storage *storage, Storage::FileArrayCallback callback, Networking::ErrorCallback ecb, Common::String remoteDirectoryPath, Common::String localDirectoryPath, bool recursive);
virtual ~FolderDownloadRequest();
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);
diff --git a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
index 2c644c42c5..617346529b 100644
--- a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
+++ b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp
@@ -101,7 +101,7 @@ void OneDriveCreateDirectoryRequest::responseCallback(Networking::JsonResponse r
}
Common::JSONObject info = json->asObject();
- if (info.contains("id")) finishSuccess(true);
+ if (info.contains("id")) finishCreation(true);
else {
error.response = json->stringify(true);
finishError(error);
@@ -123,7 +123,7 @@ void OneDriveCreateDirectoryRequest::restart() { start(); }
Common::String OneDriveCreateDirectoryRequest::date() const { return _date; }
-void OneDriveCreateDirectoryRequest::finishSuccess(bool success) {
+void OneDriveCreateDirectoryRequest::finishCreation(bool success) {
Request::finishSuccess();
if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success));
}
diff --git a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.h b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.h
index 880e94e8db..83c72c4e0a 100644
--- a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.h
+++ b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.h
@@ -43,7 +43,7 @@ class OneDriveCreateDirectoryRequest: public Networking::Request {
void start();
void responseCallback(Networking::JsonResponse response);
void errorCallback(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishCreation(bool success);
public:
OneDriveCreateDirectoryRequest(OneDriveStorage *storage, Common::String path, Storage::BoolCallback cb, Networking::ErrorCallback ecb);
virtual ~OneDriveCreateDirectoryRequest();
diff --git a/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp b/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp
index be6fcb70e7..baccdf418e 100644
--- a/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp
+++ b/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp
@@ -60,7 +60,7 @@ void OneDriveListDirectoryRequest::start() {
void OneDriveListDirectoryRequest::listNextDirectory() {
if (_directoriesQueue.empty()) {
- finishSuccess(_files);
+ finishListing(_files);
return;
}
@@ -150,7 +150,7 @@ void OneDriveListDirectoryRequest::restart() { start(); }
Common::String OneDriveListDirectoryRequest::date() const { return _date; }
-void OneDriveListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) {
+void OneDriveListDirectoryRequest::finishListing(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));
}
diff --git a/backends/cloud/onedrive/onedrivelistdirectoryrequest.h b/backends/cloud/onedrive/onedrivelistdirectoryrequest.h
index 5e80f4f561..eb510ab257 100644
--- a/backends/cloud/onedrive/onedrivelistdirectoryrequest.h
+++ b/backends/cloud/onedrive/onedrivelistdirectoryrequest.h
@@ -50,7 +50,7 @@ class OneDriveListDirectoryRequest: public Networking::Request {
void listedDirectoryCallback(Networking::JsonResponse response);
void listedDirectoryErrorCallback(Networking::ErrorResponse error);
void makeRequest(Common::String url);
- void finishSuccess(Common::Array<StorageFile> &files);
+ void finishListing(Common::Array<StorageFile> &files);
public:
OneDriveListDirectoryRequest(OneDriveStorage *storage, Common::String path, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb, bool recursive = false);
virtual ~OneDriveListDirectoryRequest();
diff --git a/backends/cloud/onedrive/onedrivetokenrefresher.cpp b/backends/cloud/onedrive/onedrivetokenrefresher.cpp
index bf849f7964..04e155c084 100644
--- a/backends/cloud/onedrive/onedrivetokenrefresher.cpp
+++ b/backends/cloud/onedrive/onedrivetokenrefresher.cpp
@@ -56,10 +56,10 @@ void OneDriveTokenRefresher::tokenRefreshed(Storage::BoolResponse response) {
retry(0);
}
-void OneDriveTokenRefresher::finishSuccess(Common::JSONValue *json) {
+void OneDriveTokenRefresher::finishJson(Common::JSONValue *json) {
if (!json) {
//that's probably not an error (200 OK)
- CurlJsonRequest::finishSuccess(nullptr);
+ CurlJsonRequest::finishJson(nullptr);
return;
}
@@ -105,7 +105,7 @@ void OneDriveTokenRefresher::finishSuccess(Common::JSONValue *json) {
}
//notify user of success
- CurlJsonRequest::finishSuccess(json);
+ CurlJsonRequest::finishJson(json);
}
void OneDriveTokenRefresher::setHeaders(Common::Array<Common::String> &headers) {
diff --git a/backends/cloud/onedrive/onedrivetokenrefresher.h b/backends/cloud/onedrive/onedrivetokenrefresher.h
index 04b0bf26b8..4be1fa726b 100644
--- a/backends/cloud/onedrive/onedrivetokenrefresher.h
+++ b/backends/cloud/onedrive/onedrivetokenrefresher.h
@@ -37,7 +37,7 @@ class OneDriveTokenRefresher: public Networking::CurlJsonRequest {
void tokenRefreshed(Storage::BoolResponse response);
- virtual void finishSuccess(Common::JSONValue *json);
+ virtual void finishJson(Common::JSONValue *json);
public:
OneDriveTokenRefresher(OneDriveStorage *parent, Networking::JsonCallback callback, Networking::ErrorCallback ecb, const char *url);
virtual ~OneDriveTokenRefresher();
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp
index 08f45935d2..fb32443a27 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.cpp
+++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp
@@ -126,7 +126,7 @@ void OneDriveUploadRequest::partUploadedCallback(Networking::JsonResponse respon
Common::String path = _savePath; //object.getVal("name")->asString();; //object.getVal("id")->asString();
uint32 size = object.getVal("size")->asIntegerNumber();
uint32 timestamp = ISO8601::convertToTimestamp(object.getVal("lastModifiedDateTime")->asString());
- finishSuccess(StorageFile(path, size, timestamp, false));
+ finishUpload(StorageFile(path, size, timestamp, false));
return;
}
@@ -140,7 +140,7 @@ void OneDriveUploadRequest::partUploadedCallback(Networking::JsonResponse respon
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();
}
@@ -162,7 +162,7 @@ void OneDriveUploadRequest::handle() {}
void OneDriveUploadRequest::restart() { start(); }
-void OneDriveUploadRequest::finishSuccess(StorageFile file) {
+void OneDriveUploadRequest::finishUpload(StorageFile file) {
Request::finishSuccess();
if (_uploadCallback) (*_uploadCallback)(Storage::UploadResponse(this, file));
}
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.h b/backends/cloud/onedrive/onedriveuploadrequest.h
index 09419d8a15..f613c415e1 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.h
+++ b/backends/cloud/onedrive/onedriveuploadrequest.h
@@ -45,7 +45,7 @@ class OneDriveUploadRequest: public Networking::Request {
void uploadNextPart();
void partUploadedCallback(Networking::JsonResponse response);
void partUploadedErrorCallback(Networking::ErrorResponse error);
- void finishSuccess(StorageFile status);
+ void finishUpload(StorageFile status);
public:
OneDriveUploadRequest(OneDriveStorage *storage, Common::String path, Common::SeekableReadStream *contents, Storage::UploadCallback callback, Networking::ErrorCallback ecb);
diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp
index c43625315d..e12f5af7cc 100644
--- a/backends/cloud/savessyncrequest.cpp
+++ b/backends/cloud/savessyncrequest.cpp
@@ -269,7 +269,7 @@ void SavesSyncRequest::fileDownloadedErrorCallback(Networking::ErrorResponse err
void SavesSyncRequest::uploadNextFile() {
if (_filesToUpload.empty()) {
- finishSuccess(true);
+ finishSync(true);
return;
}
@@ -361,7 +361,7 @@ void SavesSyncRequest::finishError(Networking::ErrorResponse error) {
Request::finishError(error);
}
-void SavesSyncRequest::finishSuccess(bool success) {
+void SavesSyncRequest::finishSync(bool success) {
Request::finishSuccess();
//update last successful sync date
diff --git a/backends/cloud/savessyncrequest.h b/backends/cloud/savessyncrequest.h
index 19e67d9dd8..d1a9d4a44c 100644
--- a/backends/cloud/savessyncrequest.h
+++ b/backends/cloud/savessyncrequest.h
@@ -56,7 +56,7 @@ class SavesSyncRequest: public Networking::Request, public GUI::CommandSender {
void downloadNextFile();
void uploadNextFile();
virtual void finishError(Networking::ErrorResponse error);
- void finishSuccess(bool success);
+ void finishSync(bool success);
public:
SavesSyncRequest(Storage *storage, Storage::BoolCallback callback, Networking::ErrorCallback ecb);
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp
index 46d88657d2..3bfc823d25 100644
--- a/backends/networking/curl/curljsonrequest.cpp
+++ b/backends/networking/curl/curljsonrequest.cpp
@@ -71,10 +71,10 @@ void CurlJsonRequest::handle() {
char *contents = getPreparedContents();
Common::JSONValue *json = Common::JSON::parse(contents);
if (json) {
- finishSuccess(json); //it's JSON even if's not 200 OK? That's fine!..
+ finishJson(json); //it's JSON even if's not 200 OK? That's fine!..
} else {
if (_stream->httpResponseCode() == 200) //no JSON, but 200 OK? That's fine!..
- finishSuccess(nullptr);
+ finishJson(nullptr);
else
finishError(ErrorResponse(this, false, true, contents, _stream->httpResponseCode()));
}
@@ -89,7 +89,7 @@ void CurlJsonRequest::restart() {
//with no stream available next handle() will create another one
}
-void CurlJsonRequest::finishSuccess(Common::JSONValue *json) {
+void CurlJsonRequest::finishJson(Common::JSONValue *json) {
Request::finishSuccess();
if (_jsonCallback) (*_jsonCallback)(JsonResponse(this, json)); //potential memory leak, free it in your callbacks!
else delete json;
diff --git a/backends/networking/curl/curljsonrequest.h b/backends/networking/curl/curljsonrequest.h
index 83005a79d5..bd6f135786 100644
--- a/backends/networking/curl/curljsonrequest.h
+++ b/backends/networking/curl/curljsonrequest.h
@@ -41,7 +41,7 @@ protected:
char *getPreparedContents();
/** Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse. */
- virtual void finishSuccess(Common::JSONValue *json);
+ virtual void finishJson(Common::JSONValue *json);
public:
CurlJsonRequest(JsonCallback cb, ErrorCallback ecb, Common::String url);