CloudBuilder  2.8.4
Making social games is easy !
Public Member Functions | List of all members
CloudBuilder::CCloudResult Class Reference

#include <CDelegate.h>

Public Member Functions

eErrorCode GetErrorCode () const
 
const char * GetErrorString () const
 
int GetHttpStatusCode () const
 
int GetCurlErrorCode () const
 
char * GetJSONString () const
 
const CotCHelpers::CHJSONGetJSON () const
 
bool HasBinary () const
 
size_t BinarySize () const
 
const void * BinaryPtr () const
 
bool IsObsolete () const
 
CCloudResultDuplicate () const
 
 CCloudResult ()
 
 CCloudResult (eErrorCode err)
 
 CCloudResult (eErrorCode err, const char *message)
 
 CCloudResult (eErrorCode err, CotCHelpers::CHJSON *ajson)
 
 CCloudResult (CotCHelpers::CHJSON *ajson)
 
void SetErrorCode (eErrorCode err)
 
void SetCurlErrorCode (int err)
 
void SetHttpStatusCode (int err)
 
void SetBinary (void *buffer, size_t size)
 
void SetObsolete (bool obsolete)
 
char * Print () const
 

Detailed Description

Used to manage the data returned by a callback. Typically a result always has an Error Code and usually a JSON struct if the request returns data, but it can be NULL in case of error.

Constructor & Destructor Documentation

CloudBuilder::CCloudResult::CCloudResult ( )

You shouldn't need these

Member Function Documentation

CCloudResult* CloudBuilder::CCloudResult::Duplicate ( ) const
Returns
a copy of this object, to be deleted by you.
eErrorCode CloudBuilder::CCloudResult::GetErrorCode ( ) const

The error code of the called method; see enum eErrorCode for more details

Returns
an Error Code. To get a message corresponding to the error, use the array eErrorString[ec].
const char* CloudBuilder::CCloudResult::GetErrorString ( ) const

The error message of the called method; see enum eErrorCode for more details

Returns
a string.
int CloudBuilder::CCloudResult::GetHttpStatusCode ( ) const

For an HTTP request, returns the HTTP code (may be 0 in case the request failed).

const CotCHelpers::CHJSON* CloudBuilder::CCloudResult::GetJSON ( ) const

Returns the JSON value associated to "result" key, which holds data pertaining to the original request; see CHJSON for more informations; can be NULL.

Returns
a JSON class.
char* CloudBuilder::CCloudResult::GetJSONString ( ) const

Returns a string which reflects the content of the JSON class.

Returns
a JSON formatted string; if JSON class is NULL, the string is NULL. You need to release the returned string if not NULL.
char* CloudBuilder::CCloudResult::Print ( ) const

Offers a pretty-printed view of this result, including the JSON inside when available.

Returns
a string with tabs, line endings which you must free!

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