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/dropbox/dropboxlistdirectoryrequest.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/dropbox/dropboxlistdirectoryrequest.cpp')
| -rw-r--r-- | backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp index d782f81a69..933ea2bd8e 100644 --- a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp +++ b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp @@ -71,6 +71,8 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp _workingRequest = nullptr; if (_ignoreCallback) return; + if (response.request) _date = response.request->date(); + Networking::ErrorResponse error(this); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; if (rq && rq->getNetworkReadStream()) @@ -137,6 +139,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp void DropboxListDirectoryRequest::errorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (error.request) _date = error.request->date(); finishError(error); } @@ -144,6 +147,8 @@ void DropboxListDirectoryRequest::handle() {} void DropboxListDirectoryRequest::restart() { start(); } +Common::String DropboxListDirectoryRequest::date() const { return _date; } + void DropboxListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) { Request::finishSuccess(); if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); |
