IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OIC::Service::RCSGetResponse Class Reference

This class provides factory methods to create the response for a received get request. More...

Public Member Functions

bool isSeparate () const
 Returns whether it is a separate response. More...
 

Static Public Member Functions

static RCSGetResponse defaultAction ()
 Creates a default RCSGetResponse. More...
 
static RCSGetResponse create (int errorCode)
 Creates a RCSGetResponse with error code passed. More...
 
static RCSGetResponse create (const RCSResourceAttributes &attrs)
 Creates a RCSGetResponse with custom attributes. More...
 
static RCSGetResponse create (RCSResourceAttributes &&attrs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static RCSGetResponse create (const RCSResourceAttributes &attrs, int errorCode)
 Creates a RCSGetResponse with error code passed. More...
 
static RCSGetResponse create (RCSResourceAttributes &&attrs, int errorCode)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static RCSGetResponse separate ()
 Creates a RCSGetResponse for the separate response. More...
 

Detailed Description

This class provides factory methods to create the response for a received get request.

The response consists of an error code and result attributes.

See Also
RCSResourceObject

Member Function Documentation

static RCSGetResponse OIC::Service::RCSGetResponse::create ( int  errorCode)
static

Creates a RCSGetResponse with error code passed.

The attributes of the RCSResourceObject will be set as the result attributes.

Parameters
errorCodeThe error code to set in response.
See Also
create(const RCSResourceAttributes&)
create(RCSResourceAttributes&&)
create(const RCSResourceAttributes&, int)
create(RCSResourceAttributes&&, int)
static RCSGetResponse OIC::Service::RCSGetResponse::create ( const RCSResourceAttributes attrs)
static

Creates a RCSGetResponse with custom attributes.

This sends the passed attributes as the result attributes instead of the one the RCSResourceObject holds.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
attrsThe attributes to set.
See Also
RCSResourceAttributes
create(int)
create(RCSResourceAttributes&&)
create(const RCSResourceAttributes&, int)
create(RCSResourceAttributes&&, int)
static RCSGetResponse OIC::Service::RCSGetResponse::create ( RCSResourceAttributes &&  attrs)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
attrsThe attributes to set.
See Also
RCSResourceAttributes
create(int)
create(const RCSResourceAttributes&)
create(const RCSResourceAttributes&, int)
create(RCSResourceAttributes&&, int)
static RCSGetResponse OIC::Service::RCSGetResponse::create ( const RCSResourceAttributes attrs,
int  errorCode 
)
static

Creates a RCSGetResponse with error code passed.

This sends the passed attributes as the result attributes instead of the one the RCSResourceObject holds.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
attrsThe attributes to set.
errorCodeThe error code for response.
See Also
RCSResourceAttributes
create(int)
create(const RCSResourceAttributes&)
create(RCSResourceAttributes&&)
create(const RCSResourceAttributes&, int)
create(RCSResourceAttributes&&, int)
static RCSGetResponse OIC::Service::RCSGetResponse::create ( RCSResourceAttributes &&  attrs,
int  errorCode 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
attrsThe attributes to set.
errorCodeThe error code for response.
See Also
RCSResourceAttributes
create(int)
create(const RCSResourceAttributes&)
create(RCSResourceAttributes&&)
create(const RCSResourceAttributes&, int)
static RCSGetResponse OIC::Service::RCSGetResponse::defaultAction ( )
static

Creates a default RCSGetResponse.

The response will have 200 for the errorCode and the attributes of RCSResourceObject will be set as the result attributes.

bool OIC::Service::RCSGetResponse::isSeparate ( ) const

Returns whether it is a separate response.

See Also
separate()
static RCSGetResponse OIC::Service::RCSGetResponse::separate ( )
static

Creates a RCSGetResponse for the separate response.

The separate response is to delay sending actual response to the client.

Note
A separate response needs to be set with RCSSeparateResponse to send the result of the request.
See Also
RCSSeparateResponse

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