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

Networking::SessionRequest Class Reference

#include <sessionrequest.h>

Inheritance diagram for Networking::SessionRequest:
Collaboration diagram for Networking::SessionRequest:

List of all members.

Public Member Functions

 SessionRequest (Common::String url, DataCallback cb=nullptr, ErrorCallback ecb=nullptr)
virtual ~SessionRequest ()
void start ()
void startAndWait ()
void reuse (Common::String url, DataCallback cb=nullptr, ErrorCallback ecb=nullptr)
virtual void handle ()
 Method, which does actual work.
virtual void restart ()
 Method, which is used to restart the Request.
void close ()
 This request DOES NOT delete automatically after calling callbacks.
bool complete ()
bool success ()
char * text ()
Common::JSONValuejson ()

Protected Member Functions

bool reuseStream ()
char * getPreparedContents ()
 Prepares raw bytes from _contentsStream.
virtual void finishError (ErrorResponse error)
 Sets FINISHED state and calls the _errorCallback with given error.
virtual void finishSuccess ()
 Sets FINISHED state.

Protected Attributes

Common::MemoryWriteStreamDynamic _contentsStream
byte_buffer
char * _text
bool _started
bool _complete
bool _success

Detailed Description

Definition at line 34 of file sessionrequest.h.


Constructor & Destructor Documentation

Networking::SessionRequest::SessionRequest ( Common::String  url,
DataCallback  cb = nullptr,
ErrorCallback  ecb = nullptr 
)

Definition at line 34 of file sessionrequest.cpp.

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

Definition at line 45 of file sessionrequest.cpp.


Member Function Documentation

void Networking::SessionRequest::close (  ) 

This request DOES NOT delete automatically after calling callbacks.

It gets PAUSED, and in order to make it FINISHED (i.e. delete), this method MUST be called.

Definition at line 155 of file sessionrequest.cpp.

bool Networking::SessionRequest::complete (  ) 

Definition at line 159 of file sessionrequest.cpp.

void Networking::SessionRequest::finishError ( ErrorResponse  error  )  [protected, virtual]

Sets FINISHED state and calls the _errorCallback with given error.

Reimplemented from Networking::Request.

Definition at line 78 of file sessionrequest.cpp.

void Networking::SessionRequest::finishSuccess (  )  [protected, virtual]

Sets FINISHED state.

Implementations might extend it if needed.

Reimplemented from Networking::Request.

Definition at line 84 of file sessionrequest.cpp.

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

Prepares raw bytes from _contentsStream.

Definition at line 63 of file sessionrequest.cpp.

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

Method, which does actual work.

Depends on what this Request is doing.

Reimplemented from Networking::CurlRequest.

Definition at line 119 of file sessionrequest.cpp.

Common::JSONValue * Networking::SessionRequest::json (  ) 

Definition at line 173 of file sessionrequest.cpp.

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

Method, which is used to restart the Request.

Reimplemented from Networking::CurlRequest.

Definition at line 134 of file sessionrequest.cpp.

void Networking::SessionRequest::reuse ( Common::String  url,
DataCallback  cb = nullptr,
ErrorCallback  ecb = nullptr 
)

Definition at line 108 of file sessionrequest.cpp.

bool Networking::SessionRequest::reuseStream (  )  [protected]

Definition at line 49 of file sessionrequest.cpp.

void Networking::SessionRequest::start (  ) 

Definition at line 93 of file sessionrequest.cpp.

void Networking::SessionRequest::startAndWait (  ) 

Definition at line 103 of file sessionrequest.cpp.

bool Networking::SessionRequest::success (  ) 

Definition at line 163 of file sessionrequest.cpp.

char * Networking::SessionRequest::text (  ) 

Definition at line 167 of file sessionrequest.cpp.


Member Data Documentation

Definition at line 37 of file sessionrequest.h.

Definition at line 39 of file sessionrequest.h.

Definition at line 39 of file sessionrequest.h.

Definition at line 39 of file sessionrequest.h.

Definition at line 38 of file sessionrequest.h.


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


Generated on Sat Sep 26 2020 05:03:49 for ResidualVM by doxygen 1.7.1
curved edge   curved edge