From: ch79.cho Date: Wed, 27 Jul 2016 04:32:40 +0000 (+0900) Subject: Update API comments X-Git-Tag: 1.2.0+RC1~52^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04f80e72b5824d35709e9e1ea2af8c1d685bcf60;p=platform%2Fupstream%2Fiotivity.git Update API comments provider and consumer API comments are updated Change-Id: Ie7f48010f4f26688aef99d5c8bfe5e4144713b4c Signed-off-by: ch79.cho Reviewed-on: https://gerrit.iotivity.org/gerrit/9749 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- diff --git a/service/notification/include/NSConsumerInterface.h b/service/notification/include/NSConsumerInterface.h index d7caaef..efbc2c1 100644 --- a/service/notification/include/NSConsumerInterface.h +++ b/service/notification/include/NSConsumerInterface.h @@ -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 diff --git a/service/notification/include/NSProviderInterface.h b/service/notification/include/NSProviderInterface.h index dd979f1..a85c521 100644 --- a/service/notification/include/NSProviderInterface.h +++ b/service/notification/include/NSProviderInterface.h @@ -37,15 +37,16 @@ extern "C" #include /** - * Provider uses this callback function to receive subscription request of consumer - * @param[in] consumer Consumer who subscribes the resource + * Invoked the subscription request from consumer is received + * @param[in] consumer Consumer who subscribes the resource */ typedef void (*NSSubscribeRequestCallback)(NSConsumer *); /** - * Provider use this callback function to receive the status of the message + * Invoked when the synchronization data which has notification message + * read/delete event from consumer is received * synchronization - * @param[in] sync Synchronization information of the notification message + * @param[in] syncinfo Synchronization information of the notification message */ typedef void (*NSProviderSyncInfoCallback)(NSSyncInfo *); @@ -96,23 +97,17 @@ NSResult NSSendMessage(NSMessage *msg); NSResult NSAcceptSubscription(NSConsumer *consumer, bool accepted); /** - * Get consumer list that is stored in the cache of notification service - * @param[in] list Consumer list - * @param[in] size the number of consumers stored in the cache - * @return ::NS_OK or result code of NSResult - */ -// NSResult NSGetConsumerList(uint8_t *list, uint32_t size); - -/** - * Send read-check to provider in order to synchronize notification status with other consumers - * @param[in] message Notification message to synchronize the status + * Send sync type in order to synchronize notification status with other consumers, + * when provider consumes the notification such as READ, DELETE + * @param[in] messageId Notification message if to synchronize the status + * @param[in] type changed notification status from NSSyncType * @return ::NS_OK or result code of NSResult */ NSResult NSProviderSendSyncInfo(uint64_t messageId, NSSyncType type); /** - * Initialize NSMessage struct, our service set message id and provider(device) id + * Initialize NSMessage structure with message id and provider(device) id * @return ::NSMessage * */ NSMessage * NSCreateMessage();