ScummVM API documentation
Networking::CurlJsonRequest Class Reference
Inheritance diagram for Networking::CurlJsonRequest:
Networking::CurlRequest Networking::Request Cloud::Box::BoxTokenRefresher Cloud::Dropbox::DropboxTokenRefresher Cloud::GoogleDrive::GoogleDriveTokenRefresher Cloud::OneDrive::OneDriveTokenRefresher

Public Member Functions

 CurlJsonRequest (JsonCallback cb, ErrorCallback ecb, const Common::String &url)
 
void handle () override
 
void restart () override
 
- Public Member Functions inherited from Networking::CurlRequest
 CurlRequest (DataCallback cb, ErrorCallback ecb, const Common::String &url)
 
void handle () override
 
void restart () override
 
Common::String date () const override
 
virtual void setHeaders (const Common::Array< Common::String > &headers)
 
virtual void addHeader (const Common::String &header)
 
virtual void addPostField (const Common::String &field)
 
virtual void addFormField (const Common::String &name, const Common::String &value)
 
virtual void addFormFile (const Common::String &name, const Common::Path &filename)
 
virtual void setBuffer (byte *buffer, uint32 size)
 
virtual void usePut ()
 
virtual void usePatch ()
 
virtual void connectionKeepAlive (long idle=120, long interval=60)
 
virtual void connectionClose ()
 
virtual NetworkReadStreamResponse execute ()
 
const NetworkReadStreamgetNetworkReadStream () const
 
void wait (int spinlockDelay=5)
 
- Public Member Functions inherited from Networking::Request
 Request (DataCallback cb, ErrorCallback ecb)
 
virtual void handleRetry ()
 
virtual void pause ()
 
virtual void finish ()
 
virtual void retry (uint32 seconds)
 
RequestState state () const
 

Static Public Member Functions

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

Protected Member Functions

virtual void finishJson (const Common::JSONValue *json)
 
- Protected Member Functions inherited from Networking::CurlRequest
NetworkReadStreammakeStream ()
 
- Protected Member Functions inherited from Networking::Request
virtual void finishError (const ErrorResponse &error, RequestState state=FINISHED)
 
virtual void finishSuccess ()
 

Protected Attributes

JsonCallback _jsonCallback
 
Common::MemoryWriteStreamDynamic _contentsStream
 
byte * _buffer
 
- Protected Attributes inherited from Networking::CurlRequest
Common::String _url
 
NetworkReadStream_stream
 
curl_slist * _headersList
 
Common::String _postFields
 
Common::HashMap< Common::String, Common::String_formFields
 
Common::HashMap< Common::String, Common::Path_formFiles
 
byte * _bytesBuffer
 
uint32 _bytesBufferSize
 
bool _uploading
 
bool _usingPatch
 
bool _keepAlive
 
long _keepAliveIdle
 
long _keepAliveInterval
 
- Protected Attributes inherited from Networking::Request
DataCallback _callback
 
ErrorCallback _errorCallback
 
RequestState _state
 
uint32 _retryInSeconds
 

Member Function Documentation

◆ finishJson()

virtual void Networking::CurlJsonRequest::finishJson ( const Common::JSONValue json)
protectedvirtual

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

◆ handle()

void Networking::CurlJsonRequest::handle ( )
overridevirtual

Method, which does actual work. Depends on what this Request is doing.

Implements Networking::Request.

◆ restart()

void Networking::CurlJsonRequest::restart ( )
overridevirtual

Method, which is used to restart the Request.

Implements Networking::Request.


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