CloudBuilder C++ SDK  v3.0.0
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
 
CotCHelpers::cstring 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)
 
CotCHelpers::cstring 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

◆ CCloudResult()

CloudBuilder::CCloudResult::CCloudResult ( )

You shouldn't need these

Member Function Documentation

◆ Duplicate()

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

◆ GetErrorCode()

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].

◆ GetErrorString()

const char* CloudBuilder::CCloudResult::GetErrorString ( ) const

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

Returns
a string.

◆ GetHttpStatusCode()

int CloudBuilder::CCloudResult::GetHttpStatusCode ( ) const

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

◆ GetJSON()

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.

◆ GetJSONString()

CotCHelpers::cstring 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.

◆ Print()

CotCHelpers::cstring 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.

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