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

This class provides a set of Notification service Consumer representation APIs. More...

Public Member Functions

 NSConsumer ()=default
 Constructor of NSConsumer. More...
 
 NSConsumer (const std::string &consumerId)
 Constructor of NSConsumer. More...
 
 NSConsumer (::NSConsumer *consumer)
 Constructor of NSConsumer. More...
 
 ~NSConsumer ()=default
 Destructor of NSConsumer. More...
 
std::string getConsumerId () const
 This method is for getting ConsumerId from the Notification service Consumer. More...
 
NSResult acceptSubscription (bool accepted)
 This method is for setting icon image for the Notification service media contents. More...
 
NSResult setTopic (const std::string &topicName)
 Select a topic name for a consumer. More...
 
NSResult unsetTopic (const std::string &topicName)
 Unselect a topic from the topic list for consumer. More...
 
std::shared_ptr< NSTopicsListgetConsumerTopicList ()
 Request topic list with selection state for the consumer. More...
 

Detailed Description

This class provides a set of Notification service Consumer representation APIs.

Constructor & Destructor Documentation

OIC::Service::NSConsumer::NSConsumer ( )
default

Constructor of NSConsumer.

OIC::Service::NSConsumer::NSConsumer ( const std::string &  consumerId)
inline

Constructor of NSConsumer.

Parameters
consumerId-consumerId of the Notification service Consumer.
OIC::Service::NSConsumer::NSConsumer ( ::NSConsumer consumer)

Constructor of NSConsumer.

Parameters
consumer- NSConsumer struct to initialize.
OIC::Service::NSConsumer::~NSConsumer ( )
default

Destructor of NSConsumer.

Member Function Documentation

NSResult OIC::Service::NSConsumer::acceptSubscription ( bool  accepted)

This method is for setting icon image for the Notification service media contents.

This function is valid only when subControllability is set true.

Parameters
accepted- as bool.
Returns
:: OK or result code of NSResult
std::string OIC::Service::NSConsumer::getConsumerId ( ) const

This method is for getting ConsumerId from the Notification service Consumer.

Returns
ConsumerId as string.
std::shared_ptr<NSTopicsList> OIC::Service::NSConsumer::getConsumerTopicList ( )

Request topic list with selection state for the consumer.

Returns
:: Topic list
NSResult OIC::Service::NSConsumer::setTopic ( const std::string &  topicName)

Select a topic name for a consumer.

Parameters
[in]topicNameTopic name to select
Returns
:: OK or result code of NSResult
NSResult OIC::Service::NSConsumer::unsetTopic ( const std::string &  topicName)

Unselect a topic from the topic list for consumer.

Parameters
[in]topicNameTopic name to unselect
Returns
:: OK or result code of NSResult

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