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

This class provides a set of C++APIs for managing accepted Consumers. More...

Public Member Functions

 NSAcceptedConsumers ()
 Constructor of NSAcceptedConsumers. More...
 
 NSAcceptedConsumers (const NSAcceptedConsumers &)
 Copy Constructor of NSAcceptedConsumers. More...
 
NSAcceptedConsumersoperator= (const NSAcceptedConsumers &)
 Copy assignment operator of NSAcceptedConsumers. More...
 
 ~NSAcceptedConsumers ()
 Destructor of NSAcceptedConsumers. More...
 
std::shared_ptr< NSConsumergetConsumer (const std::string &id)
 request to get NSConsumer pointer More...
 
void addConsumer (std::shared_ptr< NSConsumer > consumer)
 Request to add NSConsumer pointer. More...
 
void removeConsumer (const std::string &id)
 request to remove NSConsumer More...
 
bool isAccepted (const std::string &id)
 request to check if NSConsumer is accepted More...
 
int size ()
 get size of Consumers accepted. More...
 
void removeConsumers ()
 request to remove all NSConsumer More...
 
std::map< std::string,
std::shared_ptr< NSConsumer > > 
getConsumers () const
 get the map of Consumers accepted. More...
 

Detailed Description

This class provides a set of C++APIs for managing accepted Consumers.

Constructor & Destructor Documentation

OIC::Service::NSAcceptedConsumers::NSAcceptedConsumers ( )
inline

Constructor of NSAcceptedConsumers.

OIC::Service::NSAcceptedConsumers::NSAcceptedConsumers ( const NSAcceptedConsumers )

Copy Constructor of NSAcceptedConsumers.

OIC::Service::NSAcceptedConsumers::~NSAcceptedConsumers ( )
inline

Destructor of NSAcceptedConsumers.

Member Function Documentation

void OIC::Service::NSAcceptedConsumers::addConsumer ( std::shared_ptr< NSConsumer consumer)

Request to add NSConsumer pointer.

Parameters
consumerpointer to NSConsumer
std::shared_ptr<NSConsumer> OIC::Service::NSAcceptedConsumers::getConsumer ( const std::string &  id)

request to get NSConsumer pointer

Parameters
id-id as string
Returns
pointer to NSConsumer
std::map<std::string, std::shared_ptr<NSConsumer> > OIC::Service::NSAcceptedConsumers::getConsumers ( ) const

get the map of Consumers accepted.

Returns
m_consumers -map of accepted Consumers
bool OIC::Service::NSAcceptedConsumers::isAccepted ( const std::string &  id)

request to check if NSConsumer is accepted

Parameters
id-id as string
Returns
true if accepted else false
NSAcceptedConsumers& OIC::Service::NSAcceptedConsumers::operator= ( const NSAcceptedConsumers )

Copy assignment operator of NSAcceptedConsumers.

Returns
NSAcceptedConsumers object reference
void OIC::Service::NSAcceptedConsumers::removeConsumer ( const std::string &  id)

request to remove NSConsumer

Parameters
id-id as string
void OIC::Service::NSAcceptedConsumers::removeConsumers ( )

request to remove all NSConsumer

int OIC::Service::NSAcceptedConsumers::size ( )

get size of Consumers accepted.

Returns
m_consumers size

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