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.
This commit is contained in:
Alexander Tkachev 2016-05-31 01:51:32 +06:00
parent 001b417f33
commit eb63b50b7f
29 changed files with 652 additions and 507 deletions

View file

@ -41,15 +41,14 @@ protected:
char *getPreparedContents();
/** Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse. */
virtual void finishJson(Common::JSONValue *json);
virtual void finishSuccess(Common::JSONValue *json);
public:
CurlJsonRequest(JsonCallback cb, Common::String url);
CurlJsonRequest(JsonCallback cb, ErrorCallback ecb, Common::String url);
virtual ~CurlJsonRequest();
virtual void handle();
virtual void restart();
virtual void finish();
};
} // End of namespace Networking