diff options
Diffstat (limited to 'backends/networking/curl/curljsonrequest.h')
| -rw-r--r-- | backends/networking/curl/curljsonrequest.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backends/networking/curl/curljsonrequest.h b/backends/networking/curl/curljsonrequest.h index 5e78bd1965..0a560f93f4 100644 --- a/backends/networking/curl/curljsonrequest.h +++ b/backends/networking/curl/curljsonrequest.h @@ -29,10 +29,8 @@ namespace Networking { -class NetworkReadStream; - -typedef RequestIdPair<Common::JSONValue*> RequestJsonPair; -typedef Common::BaseCallback<RequestJsonPair> *JsonCallback; +typedef Response<Common::JSONValue *> JsonResponse; +typedef Common::BaseCallback<JsonResponse> *JsonCallback; class CurlJsonRequest: public CurlRequest { JsonCallback _jsonCallback; @@ -41,12 +39,17 @@ class CurlJsonRequest: public CurlRequest { /** Prepares raw bytes from _contentsStream to be parsed with Common::JSON::parse(). */ char *getPreparedContents(); +protected: + /** Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse. */ + virtual void finishJson(Common::JSONValue *json); + public: CurlJsonRequest(JsonCallback cb, Common::String url); virtual ~CurlJsonRequest(); virtual void handle(); virtual void restart(); + virtual void finish(); }; } //end of namespace Networking |
