diff options
author | Eugene Sandulenko | 2016-07-22 15:38:24 +0300 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | d57fca4665e65bca1cf487fb109d020d1233e800 (patch) | |
tree | c5a8b0e88f4c55e0f2e2afb2f78a4cd1f89d66f3 /backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp | |
parent | cccfe7c247fed9b00c100e64433439386d6ef077 (diff) | |
download | scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.tar.gz scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.tar.bz2 scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.zip |
CLOUD: JANITORIAL: Fix code formatting
Diffstat (limited to 'backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp')
-rw-r--r-- | backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp index 3228dde100..d2e94a7196 100644 --- a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp +++ b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp @@ -41,13 +41,15 @@ GoogleDriveListDirectoryByIdRequest::GoogleDriveListDirectoryByIdRequest(GoogleD GoogleDriveListDirectoryByIdRequest::~GoogleDriveListDirectoryByIdRequest() { _ignoreCallback = true; - if (_workingRequest) _workingRequest->finish(); + if (_workingRequest) + _workingRequest->finish(); delete _listDirectoryCallback; } void GoogleDriveListDirectoryByIdRequest::start() { _ignoreCallback = true; - if (_workingRequest) _workingRequest->finish(); + if (_workingRequest) + _workingRequest->finish(); _files.clear(); _ignoreCallback = false; @@ -57,7 +59,8 @@ void GoogleDriveListDirectoryByIdRequest::start() { void GoogleDriveListDirectoryByIdRequest::makeRequest(Common::String pageToken) { Common::String url = "https://www.googleapis.com/drive/v3/files?spaces=drive&fields=files%28id,mimeType,modifiedTime,name,size%29,nextPageToken&orderBy=folder,name"; //files(id,mimeType,modifiedTime,name,size),nextPageToken - if (pageToken != "") url += "&pageToken=" + pageToken; + if (pageToken != "") + url += "&pageToken=" + pageToken; url += "&q=%27" + _requestedId + "%27+in+parents"; Networking::JsonCallback callback = new Common::Callback<GoogleDriveListDirectoryByIdRequest, Networking::JsonResponse>(this, &GoogleDriveListDirectoryByIdRequest::responseCallback); @@ -69,8 +72,10 @@ void GoogleDriveListDirectoryByIdRequest::makeRequest(Common::String pageToken) void GoogleDriveListDirectoryByIdRequest::responseCallback(Networking::JsonResponse response) { _workingRequest = nullptr; - if (_ignoreCallback) return; - if (response.request) _date = response.request->date(); + if (_ignoreCallback) + return; + if (response.request) + _date = response.request->date(); Networking::ErrorResponse error(this); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; @@ -131,8 +136,10 @@ void GoogleDriveListDirectoryByIdRequest::responseCallback(Networking::JsonRespo void GoogleDriveListDirectoryByIdRequest::errorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; - if (_ignoreCallback) return; - if (error.request) _date = error.request->date(); + if (_ignoreCallback) + return; + if (error.request) + _date = error.request->date(); finishError(error); } @@ -144,7 +151,8 @@ Common::String GoogleDriveListDirectoryByIdRequest::date() const { return _date; void GoogleDriveListDirectoryByIdRequest::finishListing(Common::Array<StorageFile> &files) { Request::finishSuccess(); - if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); + if (_listDirectoryCallback) + (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); } } // End of namespace GoogleDrive |