diff options
author | Alexander Tkachev | 2016-06-10 15:01:56 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 3e6503743c2f5d90c64bf37e943338c33fc58d2b (patch) | |
tree | 3255606a88811badf45f14b4fa8cbbdc56d30964 /backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp | |
parent | 6a93e8dd09ae2eeab616d14189a58633fd928c07 (diff) | |
download | scummvm-rg350-3e6503743c2f5d90c64bf37e943338c33fc58d2b.tar.gz scummvm-rg350-3e6503743c2f5d90c64bf37e943338c33fc58d2b.tar.bz2 scummvm-rg350-3e6503743c2f5d90c64bf37e943338c33fc58d2b.zip |
CLOUD: Add Request::date()
Used in SavesSyncRequest to update Storage's last sync date.
Diffstat (limited to 'backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp')
-rw-r--r-- | backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp index 86494e8c13..2530bab557 100644 --- a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp +++ b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp @@ -70,6 +70,7 @@ void GoogleDriveListDirectoryByIdRequest::makeRequest(Common::String pageToken) void GoogleDriveListDirectoryByIdRequest::responseCallback(Networking::JsonResponse response) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (response.request) _date = response.request->date(); Networking::ErrorResponse error(this); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; @@ -131,6 +132,7 @@ void GoogleDriveListDirectoryByIdRequest::responseCallback(Networking::JsonRespo void GoogleDriveListDirectoryByIdRequest::errorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (error.request) _date = error.request->date(); finishError(error); } @@ -138,6 +140,8 @@ void GoogleDriveListDirectoryByIdRequest::handle() {} void GoogleDriveListDirectoryByIdRequest::restart() { start(); } +Common::String GoogleDriveListDirectoryByIdRequest::date() const { return _date; } + void GoogleDriveListDirectoryByIdRequest::finishSuccess(Common::Array<StorageFile> &files) { Request::finishSuccess(); if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); |