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/dropboxcreatedirectoryrequest.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/dropboxcreatedirectoryrequest.cpp')
-rw-r--r-- | backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp index c077d8df11..61cc9ddfcd 100644 --- a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp +++ b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp @@ -68,6 +68,7 @@ void DropboxCreateDirectoryRequest::responseCallback(Networking::JsonResponse re delete json; return; } + if (response.request) _date = response.request->date(); Networking::ErrorResponse error(this); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; @@ -93,6 +94,7 @@ void DropboxCreateDirectoryRequest::responseCallback(Networking::JsonResponse re void DropboxCreateDirectoryRequest::errorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (error.request) _date = error.request->date(); finishError(error); } @@ -100,6 +102,8 @@ void DropboxCreateDirectoryRequest::handle() {} void DropboxCreateDirectoryRequest::restart() { start(); } +Common::String DropboxCreateDirectoryRequest::date() const { return _date; } + void DropboxCreateDirectoryRequest::finishSuccess(bool success) { Request::finishSuccess(); if (_boolCallback) (*_boolCallback)(Storage::BoolResponse(this, success)); |