From: seungha.son Date: Tue, 1 Nov 2016 10:27:41 +0000 (+0900) Subject: Delete notification_setting_set_package_name API() X-Git-Tag: submit/tizen_3.0/20161108.101813~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64c932de495944782a29ce9c190a4ec3dd46644c;p=platform%2Fcore%2Fapi%2Fnotification.git Delete notification_setting_set_package_name API() - It is dangerous that package_name is changed. If package name is changed, unexpected problems may arise. Signed-off-by: seungha.son Change-Id: Ic2939c8385cc5b639a14a8ee45e3e1f89f83798c --- diff --git a/include/notification_setting_internal.h b/include/notification_setting_internal.h index 9320bb7e..f3bd201c 100644 --- a/include/notification_setting_internal.h +++ b/include/notification_setting_internal.h @@ -224,41 +224,6 @@ int notification_setting_get_setting_by_package_name_for_uid(const char *package */ int notification_setting_get_package_name(notification_setting_h setting, char **value); -/* - * @internal - * @brief Sets package name to notification setting handle. - * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[in] value The package name - * @return #NOTIFICATION_ERROR_NONE on success, - * otherwise any other value on failure - * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @par sample code: - * @code -#include -... -{ - int noti_err = 0; - char *package_name = "org.tizen.example"; - notification_setting_h setting = NULL; - - ... - - noti_err = notification_setting_set_package_name(setting, package_name); - if (noti_err != NOTIFICATION_ERROR_NONE) { - return; - } - - notification_setting_free_notification(setting); - - return 0; - -} - * @endcode - */ -int notification_setting_set_package_name(notification_setting_h setting, char *value); - /* * @internal * @brief Gets value which whether allow notification from individual applications. diff --git a/src/notification_setting.c b/src/notification_setting.c index 013efdd7..6116e7b4 100755 --- a/src/notification_setting.c +++ b/src/notification_setting.c @@ -117,22 +117,6 @@ EXPORT_API int notification_setting_get_package_name(notification_setting_h sett return NOTIFICATION_ERROR_NONE; } -EXPORT_API int notification_setting_set_package_name(notification_setting_h setting, char *value) -{ - - if (setting == NULL || value == NULL) { - NOTIFICATION_ERR("Invalid parameter"); - return NOTIFICATION_ERROR_INVALID_PARAMETER; - } - - if (setting->package_name != NULL) - free(setting->package_name); - - setting->package_name = SAFE_STRDUP(value); - - return NOTIFICATION_ERROR_NONE; -} - EXPORT_API int notification_setting_get_allow_to_notify(notification_setting_h setting, bool *value) { if (setting == NULL || value == NULL) {