IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OC::OCResourceRequest Class Reference

OCResourceRequest provides APIs to extract details from a request URI. More...

Public Types

typedef std::shared_ptr
< OCResourceRequest
Ptr
 

Public Member Functions

 OCResourceRequest ()
 
 OCResourceRequest (OCResourceRequest &&)=default
 
OCResourceRequestoperator= (OCResourceRequest &&)=default
 
virtual ~OCResourceRequest (void)
 Virtual destructor. More...
 
std::string getRequestType () const
 Retrieves the type of request string for the entity handler function to operate. More...
 
const QueryParamsMapgetQueryParameters () const
 Retrieves the query parameters from the request. More...
 
int getRequestHandlerFlag () const
 Retrieves the request handler flag type. More...
 
const OCRepresentationgetResourceRepresentation () const
 Provides the entire resource attribute representation. More...
 
const ObservationInfogetObservationInfo () const
 
void setResourceUri (const std::string resourceUri)
 sets resource uri More...
 
std::string getResourceUri (void)
 gets resource uri More...
 
const HeaderOptionsgetHeaderOptions () const
 This API retrieves headerOptions which was sent from a client. More...
 
const OCRequestHandlegetRequestHandle () const
 This API retrieves the request handle. More...
 
const OCResourceHandlegetResourceHandle () const
 This API retrieves the resource handle. More...
 
int16_t getMessageID () const
 This API retrieves the request message ID. More...
 

Friends

void() formResourceRequest (OCEntityHandlerFlag, OCEntityHandlerRequest *, std::shared_ptr< OC::OCResourceRequest >)
 

Detailed Description

OCResourceRequest provides APIs to extract details from a request URI.

Member Typedef Documentation

Constructor & Destructor Documentation

OC::OCResourceRequest::OCResourceRequest ( )
inline
OC::OCResourceRequest::OCResourceRequest ( OCResourceRequest &&  )
default
virtual OC::OCResourceRequest::~OCResourceRequest ( void  )
inlinevirtual

Virtual destructor.

Member Function Documentation

const HeaderOptions& OC::OCResourceRequest::getHeaderOptions ( ) const
inline

This API retrieves headerOptions which was sent from a client.

Returns
std::map HeaderOptions with the header options
int16_t OC::OCResourceRequest::getMessageID ( ) const
inline

This API retrieves the request message ID.

Returns
int16_t value of message ID
const ObservationInfo& OC::OCResourceRequest::getObservationInfo ( ) const
inline
Returns
ObservationInfo reference provides observation information
const QueryParamsMap& OC::OCResourceRequest::getQueryParameters ( ) const
inline

Retrieves the query parameters from the request.

Returns
std::string query parameters in the request
const OCRequestHandle& OC::OCResourceRequest::getRequestHandle ( ) const
inline

This API retrieves the request handle.

Returns
OCRequestHandle
int OC::OCResourceRequest::getRequestHandlerFlag ( ) const
inline

Retrieves the request handler flag type.

This can be either INIT flag or REQUEST flag or OBSERVE flag. NOTE: INIT indicates that the vendor's entity handler should go and perform initialization operations REQUEST indicates that it is a request of certain type (GET/PUT/POST/DELETE) and entity handler needs to perform corresponding operations OBSERVE indicates that the request is of type Observe and entity handler needs to perform corresponding operations

Returns
int type of request flag
std::string OC::OCResourceRequest::getRequestType ( ) const
inline

Retrieves the type of request string for the entity handler function to operate.

Returns
std::string request type. This could be 'GET'/'PUT'/'POST'/'DELETE'
const OCResourceHandle& OC::OCResourceRequest::getResourceHandle ( ) const
inline

This API retrieves the resource handle.

return OCResourceHandle

const OCRepresentation& OC::OCResourceRequest::getResourceRepresentation ( ) const
inline

Provides the entire resource attribute representation.

Returns
OCRepresentation reference containing the name value pairs representing the resource's attributes
std::string OC::OCResourceRequest::getResourceUri ( void  )
inline

gets resource uri

Returns
std::string resource uri
OCResourceRequest& OC::OCResourceRequest::operator= ( OCResourceRequest &&  )
default
void OC::OCResourceRequest::setResourceUri ( const std::string  resourceUri)
inline

sets resource uri

Parameters
resourceUrispecifies the resource uri

Friends And Related Function Documentation

void() formResourceRequest ( OCEntityHandlerFlag  ,
OCEntityHandlerRequest ,
std::shared_ptr< OC::OCResourceRequest  
)
friend

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