diff options
| author | Alexander Tkachev | 2016-05-31 01:51:32 +0600 |
|---|---|---|
| committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
| commit | eb63b50b7f0841e40365f3fbafa9810e8b190872 (patch) | |
| tree | 4f348f12298c15e8a5885b5a74ce3788493b9a7e /backends/cloud/onedrive/onedrivelistdirectoryrequest.h | |
| parent | 001b417f33beeb3b2da11f58105b971dc7e6f600 (diff) | |
| download | scummvm-rg350-eb63b50b7f0841e40365f3fbafa9810e8b190872.tar.gz scummvm-rg350-eb63b50b7f0841e40365f3fbafa9810e8b190872.tar.bz2 scummvm-rg350-eb63b50b7f0841e40365f3fbafa9810e8b190872.zip | |
CLOUD: Refactor Request
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
Diffstat (limited to 'backends/cloud/onedrive/onedrivelistdirectoryrequest.h')
| -rw-r--r-- | backends/cloud/onedrive/onedrivelistdirectoryrequest.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/cloud/onedrive/onedrivelistdirectoryrequest.h b/backends/cloud/onedrive/onedrivelistdirectoryrequest.h index a05dd871dd..b8adfe7ef0 100644 --- a/backends/cloud/onedrive/onedrivelistdirectoryrequest.h +++ b/backends/cloud/onedrive/onedrivelistdirectoryrequest.h @@ -45,17 +45,17 @@ class OneDriveListDirectoryRequest: public Networking::Request { bool _ignoreCallback; void start(); - void listNextDirectory(ListDirectoryStatus status); - void listedDirectoryCallback(Networking::JsonResponse pair); + void listNextDirectory(); + void listedDirectoryCallback(Networking::JsonResponse response); + void listedDirectoryErrorCallback(Networking::ErrorResponse error); void makeRequest(Common::String url); - void finishStatus(ListDirectoryStatus status); + void finishSuccess(Common::Array<StorageFile> &files); public: - OneDriveListDirectoryRequest(OneDriveStorage *storage, Common::String path, Storage::ListDirectoryCallback cb, bool recursive = false); + OneDriveListDirectoryRequest(OneDriveStorage *storage, Common::String path, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb, bool recursive = false); virtual ~OneDriveListDirectoryRequest(); - virtual void handle() {} - virtual void restart() { start(); } - virtual void finish(); + virtual void handle(); + virtual void restart(); }; } // End of namespace OneDrive |
