X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fnotification%2Fcpp-wrapper%2Fprovider%2Finc%2FNSConsumer.h;h=6a3f89de8086016a61e134613a78c6540e9808ba;hb=refs%2Ftags%2Fsubmit%2Ftizen_4.0%2F20171010.021147;hp=c71c66685476d803a975c204be05d44794c98e14;hpb=8acdc24115836ae2beea49c8519d4ae567e6f99e;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/notification/cpp-wrapper/provider/inc/NSConsumer.h b/service/notification/cpp-wrapper/provider/inc/NSConsumer.h index c71c666..6a3f89d 100755 --- a/service/notification/cpp-wrapper/provider/inc/NSConsumer.h +++ b/service/notification/cpp-wrapper/provider/inc/NSConsumer.h @@ -29,6 +29,7 @@ #include +#include #include "NSCommon.h" #include "NSUtils.h" #include "NSTopicsList.h" @@ -55,7 +56,9 @@ namespace OIC * @param consumerId -consumerId of the Notification service Consumer. */ NSConsumer(const std::string &consumerId) - : m_consumerId(consumerId) {} + : m_consumerId(consumerId) + { + } /** * Constructor of NSConsumer. @@ -78,34 +81,35 @@ namespace OIC /** * This method is for setting icon image for the Notification service media contents. - * - * @param consumer - NSConsumer. + * This function is valid only when subControllability is set true. * @param accepted - as bool. + * @return :: OK or result code of NSResult */ - int acceptSubscription(NSConsumer *consumer, bool accepted); + NSResult acceptSubscription(bool accepted); /** * Select a topic name for a consumer * @param[in] topicName Topic name to select * @return :: OK or result code of NSResult */ - NSResult selectTopic(const std::string &topicName); + NSResult setTopic(const std::string &topicName); /** * Unselect a topic from the topic list for consumer * @param[in] topicName Topic name to unselect * @return :: OK or result code of NSResult */ - NSResult unselectTopic(const std::string &topicName); + NSResult unsetTopic(const std::string &topicName); /** * Request topic list with selection state for the consumer * @return :: Topic list */ - NSTopicsList *getConsumerTopics(); + std::shared_ptr getConsumerTopicList(); private: ::NSConsumer *getNSConsumer(); + bool isValid() const; private: std::string m_consumerId;