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=cae98c081af1b9221121bdf7d2a7f49ae15bae4d;hpb=4ed8d73b591a245d828e97f79a47a2e572475bd3;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 cae98c0..6a3f89d 100755 --- a/service/notification/cpp-wrapper/provider/inc/NSConsumer.h +++ b/service/notification/cpp-wrapper/provider/inc/NSConsumer.h @@ -29,10 +29,10 @@ #include -#include +#include #include "NSCommon.h" -#include "oic_string.h" -#include "NSConstants.h" +#include "NSUtils.h" +#include "NSTopicsList.h" namespace OIC { @@ -53,10 +53,12 @@ namespace OIC /** * Constructor of NSConsumer. * - * @param consumerId - consumerId of the Notification service Consumer. + * @param consumerId -consumerId of the Notification service Consumer. */ NSConsumer(const std::string &consumerId) - : m_consumerId(consumerId) {} + : m_consumerId(consumerId) + { + } /** * Constructor of NSConsumer. @@ -79,14 +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 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 unsetTopic(const std::string &topicName); + + /** + * Request topic list with selection state for the consumer + * @return :: Topic list + */ + std::shared_ptr getConsumerTopicList(); private: ::NSConsumer *getNSConsumer(); + bool isValid() const; private: std::string m_consumerId;