ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <curljsonrequest.h>

Inheritance diagram for Networking::CurlJsonRequest:
Collaboration diagram for Networking::CurlJsonRequest:

List of all members.

Public Member Functions

 CurlJsonRequest (JsonCallback cb, ErrorCallback ecb, Common::String url)
virtual ~CurlJsonRequest ()
virtual void handle ()
 Method, which does actual work.
virtual void restart ()
 Method, which is used to restart the Request.

Static Public Member Functions

static bool jsonIsObject (Common::JSONValue *item, const char *warningPrefix)
static bool jsonContainsObject (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)
static bool jsonContainsString (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)
static bool jsonContainsIntegerNumber (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)
static bool jsonContainsArray (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)
static bool jsonContainsStringOrIntegerNumber (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)
static bool jsonContainsAttribute (Common::JSONObject &item, const char *key, const char *warningPrefix, bool isOptional=false)

Protected Member Functions

char * getPreparedContents ()
 Prepares raw bytes from _contentsStream to be parsed with Common::JSON::parse().
virtual void finishJson (Common::JSONValue *json)
 Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse.

Protected Attributes

JsonCallback _jsonCallback
Common::MemoryWriteStreamDynamic _contentsStream
byte_buffer

Detailed Description

Definition at line 37 of file curljsonrequest.h.


Constructor & Destructor Documentation

Networking::CurlJsonRequest::CurlJsonRequest ( JsonCallback  cb,
ErrorCallback  ecb,
Common::String  url 
)

Definition at line 34 of file curljsonrequest.cpp.

Networking::CurlJsonRequest::~CurlJsonRequest (  )  [virtual]

Definition at line 38 of file curljsonrequest.cpp.


Member Function Documentation

void Networking::CurlJsonRequest::finishJson ( Common::JSONValue json  )  [protected, virtual]

Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse.

Reimplemented in Cloud::Box::BoxTokenRefresher, Cloud::GoogleDrive::GoogleDriveTokenRefresher, and Cloud::OneDrive::OneDriveTokenRefresher.

Definition at line 96 of file curljsonrequest.cpp.

char * Networking::CurlJsonRequest::getPreparedContents (  )  [protected]

Prepares raw bytes from _contentsStream to be parsed with Common::JSON::parse().

Definition at line 43 of file curljsonrequest.cpp.

void Networking::CurlJsonRequest::handle (  )  [virtual]

Method, which does actual work.

Depends on what this Request is doing.

Reimplemented from Networking::CurlRequest.

Definition at line 64 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsArray ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 168 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsAttribute ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 202 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsIntegerNumber ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 151 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsObject ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 117 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsString ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 134 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonContainsStringOrIntegerNumber ( Common::JSONObject item,
const char *  key,
const char *  warningPrefix,
bool  isOptional = false 
) [static]

Definition at line 185 of file curljsonrequest.cpp.

bool Networking::CurlJsonRequest::jsonIsObject ( Common::JSONValue item,
const char *  warningPrefix 
) [static]

Definition at line 104 of file curljsonrequest.cpp.

void Networking::CurlJsonRequest::restart (  )  [virtual]

Method, which is used to restart the Request.

Reimplemented from Networking::CurlRequest.

Definition at line 88 of file curljsonrequest.cpp.


Member Data Documentation

Definition at line 41 of file curljsonrequest.h.


The documentation for this class was generated from the following files:


Generated on Sat Nov 16 2019 05:03:32 for ResidualVM by doxygen 1.7.1
curved edge   curved edge