Update API comments
authorch79.cho <ch79.cho@samsung.com>
Wed, 27 Jul 2016 04:32:40 +0000 (13:32 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Fri, 5 Aug 2016 08:30:23 +0000 (08:30 +0000)
provider and consumer API comments are updated

Change-Id: Ie7f48010f4f26688aef99d5c8bfe5e4144713b4c
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9749
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/notification/include/NSConsumerInterface.h
service/notification/include/NSProviderInterface.h

index d7caaef..efbc2c1 100644 (file)
@@ -35,26 +35,29 @@ extern "C"
 #include "NSCommon.h"
 
 /**
- * Consumer uses this callback function to receive the discovered providers
- * @param[in] provider        Provider who has the notification resource
+ * Invoked when the discovered provider is received
+ * @param[in] provider  Provider who has the notification resource
  */
 typedef void (* NSProviderDiscoveredCallback)(NSProvider *);
 
+/**
+ * Invoked when the response of the subscription is received
+ * @param[in] provider  Provider which has the notification resource
+ */
 typedef void (* NSSubscriptionAcceptedCallback)(NSProvider *);
 
 /**
- * Consumer use this callback function to receive notification message from provider
+ * Invoked when the notification message from provider is received
  * synchronization
- * @param[in] provider    Provider who sends notification message
- * @param[in] message     Notification message
+ * @param[in] message  Notification message
  */
 typedef void (* NSMessageReceivedCallback)(NSMessage *);
 
 /**
- * Provider and consumer use this callback function to receive the status of the message
+ * Invoked when the synchronization data which has notification message 
+ * read/delete event from provider/consumer is received
  * synchronization
- * @param[in] provider    Provider who requests synchronization with the status
- * @param[in] sync        Synchronization information of the notification message
+ * @param[in] syncInfo  Synchronization information of the notification message
  */
 typedef void (* NSSyncInfoReceivedCallback)(NSSyncInfo *);
 
@@ -69,9 +72,7 @@ typedef struct
 
 /**
  * Initialize notification service for consumer
- * @param[in]  providerDiscoveredCallback   Callback function to discover notification providers
- * @param[in]  notificationReceivedCallback   Callback function to receive notification messages
- * @param[in]  syncCallback   Callback function to receive synchronization status of notification
+ * @param[in]  config  NSConsumerconfig structure of callback functions
  * @return ::NS_OK or result code of NSResult
  */
 NSResult NSStartConsumer(NSConsumerConfig config);
@@ -109,11 +110,29 @@ NSResult NSSubscribe(NSProvider *provider);
  */
 NSResult NSUnsubscribe(NSProvider *provider);
 
+/**
+ * Send sync type to provider in order to synchronize notification status with other consumers
+ * when consumer consumes the notification such as READ, DELETE
+ * @param[in]  providerId  Provider id of the Notification message
+ * @param[in]  messageId  Notification message id to synchronize the status
+ * @param[in]  type  changed notification status from NSSyncType
+ * @return ::NS_OK or result code of NSResult
+ */
 NSResult NSConsumerSendSyncInfo(
         const char * providerId, uint64_t messageId, NSSyncType type);
 
+/**
+ * Request NSProvider that is matched by provider id
+ * @param[in]  providerId  the id of provider that user wants to get
+ * @return NSProvider
+ */
 NSProvider * NSConsumerGetProvider(const char * providerId);
 
+/**
+ * Request NSMessage that is matched by message id
+ * @param[in]  messageId  the id of message that user wants to get
+ * @return NSMessage
+ */
 NSMessage * NSConsumerGetMessage(uint64_t messageId);
 
 #ifdef __cplusplus
index dd979f1..a85c521 100644 (file)
@@ -37,15 +37,16 @@ extern "C"
 #include <stdint.h>\r
 \r
 /**\r
- * Provider uses this callback function to receive subscription request of consumer\r
- * @param[in] consumer        Consumer who subscribes the resource\r
+ * Invoked the subscription request from consumer is received\r
+ * @param[in] consumer  Consumer who subscribes the resource\r
  */\r
 typedef void (*NSSubscribeRequestCallback)(NSConsumer *);\r
 \r
 /**\r
- * Provider use this callback function to receive the status of the message\r
+ * Invoked when the synchronization data which has notification message \r
+ * read/delete event from consumer is received\r
  * synchronization\r
- * @param[in] sync        Synchronization information of the notification message\r
+ * @param[in] syncinfo  Synchronization information of the notification message\r
  */\r
 typedef void (*NSProviderSyncInfoCallback)(NSSyncInfo *);\r
 \r
@@ -96,23 +97,17 @@ NSResult NSSendMessage(NSMessage *msg);
 NSResult NSAcceptSubscription(NSConsumer *consumer, bool accepted);\r
 \r
 /**\r
- * Get consumer list that is stored in the cache of notification service\r
- * @param[in]  list  Consumer list\r
- * @param[in]  size  the number of consumers stored in the cache\r
- * @return ::NS_OK or result code of NSResult\r
- */\r
-// NSResult NSGetConsumerList(uint8_t *list, uint32_t size);\r
-\r
-/**\r
- * Send read-check to provider in order to synchronize notification status with other consumers\r
- * @param[in]  message  Notification message to synchronize the status\r
+ * Send sync type in order to synchronize notification status with other consumers,\r
+ * when provider consumes the notification such as READ, DELETE\r
+ * @param[in]  messageId  Notification message if to synchronize the status\r
+ * @param[in]  type  changed notification status from NSSyncType\r
  * @return ::NS_OK or result code of NSResult\r
  */\r
 NSResult NSProviderSendSyncInfo(uint64_t messageId, NSSyncType type);\r
 \r
 \r
 /**\r
- * Initialize NSMessage struct, our service set message id and provider(device) id\r
+ * Initialize NSMessage structure with message id and provider(device) id\r
  * @return ::NSMessage *\r
  */\r
 NSMessage * NSCreateMessage();\r