replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / cpp-wrapper / provider / inc / NSConsumer.h
index cae98c0..6a3f89d 100755 (executable)
 \r
 \r
 #include <string>\r
-#include <cstring>\r
+#include <memory>\r
 #include "NSCommon.h"\r
-#include "oic_string.h"\r
-#include "NSConstants.h"\r
+#include "NSUtils.h"\r
+#include "NSTopicsList.h"\r
 \r
 namespace OIC\r
 {\r
@@ -53,10 +53,12 @@ namespace OIC
                 /**\r
                       * Constructor of NSConsumer.\r
                       *\r
-                      * @param consumerId - consumerId of the Notification service Consumer.\r
+                      * @param consumerId -consumerId of the Notification service Consumer.\r
                       */\r
                 NSConsumer(const std::string &consumerId)\r
-                    : m_consumerId(consumerId) {}\r
+                    : m_consumerId(consumerId)\r
+                {\r
+                }\r
 \r
                 /**\r
                       * Constructor of NSConsumer.\r
@@ -79,14 +81,35 @@ namespace OIC
 \r
                 /**\r
                       * This method is for setting icon image for the Notification service media contents.\r
-                      *\r
-                      * @param consumer - NSConsumer.\r
+                      * This function is valid only when subControllability is set true.\r
                       * @param accepted - as bool.\r
+                      * @return :: OK or result code of NSResult\r
                       */\r
-                int acceptSubscription(NSConsumer *consumer, bool accepted);\r
+                NSResult acceptSubscription(bool accepted);\r
+\r
+                /**\r
+                     * Select a topic name for a consumer\r
+                     * @param[in]  topicName Topic name to select\r
+                     * @return :: OK or result code of NSResult\r
+                     */\r
+                NSResult setTopic(const std::string &topicName);\r
+\r
+                /**\r
+                     * Unselect a topic from the topic list for consumer\r
+                     * @param[in]  topicName Topic name to unselect\r
+                     * @return :: OK or result code of NSResult\r
+                     */\r
+                NSResult unsetTopic(const std::string &topicName);\r
+\r
+                /**\r
+                     * Request topic list with selection state for the consumer\r
+                     * @return :: Topic list\r
+                     */\r
+                std::shared_ptr<NSTopicsList> getConsumerTopicList();\r
 \r
             private:\r
                 ::NSConsumer *getNSConsumer();\r
+                bool isValid() const;\r
 \r
             private:\r
                 std::string m_consumerId;\r