Fix notification_get/set_extension_data() 39/160839/2
authorSeungha Son <seungha.son@samsung.com>
Mon, 20 Nov 2017 07:49:53 +0000 (16:49 +0900)
committerSeungha Son <seungha.son@samsung.com>
Mon, 20 Nov 2017 07:57:10 +0000 (16:57 +0900)
 To fix the incorrect spelling, the previous function is deprecated and
 defines a new function.

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: If132fc4812751e0f9aa32208309e682ec1c30135

include/notification_internal.h
src/notification_internal.c

index 1b23d2a79aa556a9f61ce72528f535b22c23dfc6..b56cd6cd547399956f4d423204c045739eb3de4c 100755 (executable)
@@ -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,
index 3a79332a1b6dcf63efd63da45efdfa4e03a29241..07ebe37e64776e211d625c579009c2853016ed42 100755 (executable)
@@ -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;