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:
parent
001b417f33
commit
eb63b50b7f
29 changed files with 652 additions and 507 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue