From: Seungha Son Date: Mon, 20 Nov 2017 07:49:53 +0000 (+0900) Subject: Fix notification_get/set_extension_data() X-Git-Tag: submit/tizen/20171120.105459~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8bede5675b6b21948bcdd9bcd77cac07105106c;p=platform%2Fcore%2Fapi%2Fnotification.git Fix notification_get/set_extension_data() To fix the incorrect spelling, the previous function is deprecated and defines a new function. Signed-off-by: Seungha Son Change-Id: If132fc4812751e0f9aa32208309e682ec1c30135 --- diff --git a/include/notification_internal.h b/include/notification_internal.h index 1b23d2a7..b56cd6cd 100755 --- a/include/notification_internal.h +++ b/include/notification_internal.h @@ -1396,7 +1396,47 @@ notification_h notification_load_by_tag_for_uid(const char *tag, uid_t uid); */ int notification_get_text_input_max_length(notification_h noti, int *text_input_max_length); +/** + * @brief Sets an extension data. + * @since_tizen 4.0 + * @param[in] noti The notification handle + * @param[in] key The key + * @param[in] value The bundle data + * @return #NOTIFICATION_ERROR_NONE on success, + * otherwise any other value on failure + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter + */ +int notification_set_extension_data(notification_h noti, const char *key, bundle *value); + +/** + * @brief Gets an extension data. + * @since_tizen 4.0 + * @param[in] noti The notification handle + * @param[in] key The key + * @param[out] value The bundle data + * @return #NOTIFICATION_ERROR_NONE on success, + * otherwise any other value on failure + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #NOTIFICATION_ERROR_IO_ERROR IO Error + */ +int notification_get_extension_data(notification_h noti, const char *key, bundle **value); + +/** + * @brief This function will be deprecated. + * @see notification_set_extension_data() + * + */ +NOTIFICATION_DEPRECATED_API int notification_set_extention_data(notification_h noti, const char *key, bundle *value); + +/** + * @brief This function will be deprecated. + * @see notification_get_extension_data() + * + */ +NOTIFICATION_DEPRECATED_API int notification_get_extention_data(notification_h noti, const char *key, bundle **value); int notification_set_extension_event_handler(notification_h noti, diff --git a/src/notification_internal.c b/src/notification_internal.c index 3a79332a..07ebe37e 100755 --- a/src/notification_internal.c +++ b/src/notification_internal.c @@ -1785,6 +1785,11 @@ static bundle *_create_bundle_from_bundle_raw(bundle_raw *string) } EXPORT_API int notification_set_extention_data(notification_h noti, const char *key, bundle *value) +{ + return notification_set_extension_data(noti, key, value); +} + +EXPORT_API int notification_set_extension_data(notification_h noti, const char *key, bundle *value) { int ret; int len = 0; @@ -1819,6 +1824,11 @@ EXPORT_API int notification_set_extention_data(notification_h noti, const char * } EXPORT_API int notification_get_extention_data(notification_h noti, const char *key, bundle **value) +{ + return notification_get_extension_data(noti, key, value); +} + +EXPORT_API int notification_get_extension_data(notification_h noti, const char *key, bundle **value) { char *ret_str; bundle *args;