From: mk5004.lee Date: Wed, 4 Apr 2018 10:44:22 +0000 (+0900) Subject: Updates header files X-Git-Tag: submit/tizen/20180411.095243~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fb50db50906f58230538849ecdb476c470afb58;p=platform%2Fcore%2Fapi%2Fnotification.git Updates header files - check-header change mode for all files Change-Id: I8dfb703fcc694224d8b9b9f809f685dc797d66b9 Signed-off-by: mk5004.lee --- diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/include/notification.h b/include/notification.h old mode 100755 new mode 100644 index 466f6240..46029e9d --- a/include/notification.h +++ b/include/notification.h @@ -662,8 +662,8 @@ int notification_set_event_handler(notification_h noti, notification_event_type_ /** * @brief Gets the event handler of a specific event. - * @remarks You must release @a app_control using app_control_destroy(). * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @remarks You must release @a app_control using app_control_destroy(). * @param[in] noti The notification handle * @param[in] event_type Launching option type * @param[out] event_handler The handler of App Control @@ -1175,7 +1175,6 @@ int notification_free(notification_h noti); * other value on failure * @retval #NOTIFICATION_ERROR_NONE Success * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @see notification_get_tag() * @par Sample code: * @code @@ -1210,7 +1209,6 @@ int notification_set_tag(notification_h noti, const char *tag); * other value on failure * @retval #NOTIFICATION_ERROR_NONE Success * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @see notification_set_tag() * @par Sample code: * @code @@ -1423,9 +1421,9 @@ int notification_remove_button(notification_h noti, notification_button_index_e /** * @brief Sets the 'auto remove' option of the active notification. * @details The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true. + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @remarks When 'auto_remove' is set as false, the active notification will not be removed * as long as the user removes the active notification or the app which posted the active notification removes the active notification. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @param[in] noti Notification handle * @param[in] auto_remove Auto remove option * @return #NOTIFICATION_ERROR_NONE On success, @@ -1570,11 +1568,11 @@ notification_h notification_create_from_template(const char *template_name); /** * @brief Gets notification block state. - * @details The user can set the notification block state in settings. - * The block state indicates whether or not notifications can be posted. - * Additionally only notifications to the notification panel are - * allowed in "Do not disturb mode". Sound, Vibrate and - * Active/Instant notifications are blocked. + * @details The user can set the notification block state in settings. + * The block state indicates whether or not notifications can be posted. + * Additionally only notifications to the notification panel are + * allowed in "Do not disturb mode". Sound, Vibrate and + * Active/Instant notifications are blocked. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification diff --git a/include/notification_error.h b/include/notification_error.h index bdc19baf..91f768d0 100644 --- a/include/notification_error.h +++ b/include/notification_error.h @@ -40,7 +40,7 @@ typedef enum _notification_error { NOTIFICATION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ NOTIFICATION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - NOTIFICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */ + NOTIFICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ NOTIFICATION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ NOTIFICATION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ NOTIFICATION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */ diff --git a/include/notification_internal.h b/include/notification_internal.h old mode 100755 new mode 100644 index 82913227..bc2596ce --- a/include/notification_internal.h +++ b/include/notification_internal.h @@ -50,12 +50,12 @@ extern "C" { #define NOTIFICATION_VARIABLE_TYPE_MAX NOTIFICATION_VARIABLE_TYPE_COUNT /** - * @brief Enumeration for notification ongoing value type. + * @brief Enumeration for notification resource path type. * @since_tizen 3.0 */ typedef enum _notification_res_path_type { - NOTIFICATION_RES_PATH_TYPE_SOUND = NOTIFICATION_IMAGE_TYPE_MAX + 1, - NOTIFICATION_RES_PATH_TYPE_VIBRATION, + NOTIFICATION_RES_PATH_TYPE_SOUND = NOTIFICATION_IMAGE_TYPE_MAX + 1, /**< Sound */ + NOTIFICATION_RES_PATH_TYPE_VIBRATION, /**< Vibration */ } notification_res_path_type_e; /** @@ -63,8 +63,8 @@ typedef enum _notification_res_path_type { * @since_tizen 3.0 */ typedef enum _notification_ongoing_value_type { - NOTIFICATION_ONGOING_VALUE_TYPE_PERCENT = 0, - NOTIFICATION_ONGOING_VALUE_TYPE_TIME, + NOTIFICATION_ONGOING_VALUE_TYPE_PERCENT = 0, /**< Percent */ + NOTIFICATION_ONGOING_VALUE_TYPE_TIME, /**< Time */ } notification_ongoing_value_type_e; /** @@ -73,17 +73,17 @@ typedef enum _notification_ongoing_value_type { * @see #notification_event_type_e */ typedef enum _notification_event_type_extension { - NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER = 100, - NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT = 101, - NOTIFICATION_EVENT_TYPE_HIDDEN_BY_EXTERNAL = 102, - NOTIFICATION_EVENT_TYPE_PRESSED = 200, - NOTIFICATION_EVENT_TYPE_DELETED = 201, + NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER = 100, /**< Hidden by user */ + NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT = 101, /**< Hidden by timeout */ + NOTIFICATION_EVENT_TYPE_HIDDEN_BY_EXTERNAL = 102, /**< Hidden by external */ + NOTIFICATION_EVENT_TYPE_PRESSED = 200, /**< Pressed by user */ + NOTIFICATION_EVENT_TYPE_DELETED = 201, /**< Deleted by user */ } notification_event_type_extension_e; GQuark notification_error_quark(void); /** - * @brief This function add deferred task. the registered task will be executed when notification service become ready + * @brief This function add deferred task. The registered task will be executed when notification service become ready. * @param[in] deferred_task_cb The callback function * @param[in] user_data The user data to be passed to the callback function * @return #NOTIFICATION_ERROR_NONE if success, other value if failure @@ -131,6 +131,7 @@ notification_unresister_changed_cb_for_uid( /** * @brief Updates the progress of the inserted notification. This only works for the ongoing notification (NOTIFICATION_TYPE_ONGOING). * @details The Notification view on the notification area could be updated. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] noti Notification handle or NULL if priv_id is valid * @param[in] priv_id Private ID * @param[in] progress Percentage value of progressive data @@ -139,7 +140,7 @@ notification_unresister_changed_cb_for_uid( * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code -#include +#include ... { int noti_err = NOTIFICATION_ERROR_NONE; @@ -158,6 +159,7 @@ int notification_update_progress(notification_h noti, /** * @brief Updates the size of inserted notification data. This only works for the ongoing notification (NOTIFICATION_TYPE_ONGOING). * @details Notification view on notification area could be updated. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] noti Notification handle or NULL if priv_id is valid * @param[in] priv_id Private ID * @param[in] size Bytes of progressive data @@ -166,7 +168,7 @@ int notification_update_progress(notification_h noti, * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code -#include +#include ... { int noti_err = NOTIFICATION_ERROR_NONE; @@ -184,6 +186,7 @@ int notification_update_size(notification_h noti, /** * @brief Updates the content of the inserted notification data. This is only for the ongoing notification (NOTIFICATION_TYPE_ONGOING). * @details Notification view on notification area could be updated. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @param[in] noti Notification handle or NULL if priv_id is valid * @param[in] priv_id Private ID * @param[in] content Text to update @@ -192,7 +195,7 @@ int notification_update_size(notification_h noti, * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code -#include +#include ... { int noti_err = NOTIFICATION_ERROR_NONE; @@ -332,11 +335,10 @@ NOTIFICATION_DEPRECATED_API int notification_get_count(notification_type_e type, /** * @internal - * @brief - * @details Gets the numbers of all notifications + * @brief Gets the numbers of all notifications. * @since tizen 4.0 - * @param[int] type the type of notification - * @param[out] count the numbers of all notifications + * @param[in] type The type of notification + * @param[out] count The numbers of all notifications * @return NOTIFICATION_ERROR_NONE on success, other value on failure * @retval NOTIFICATION_ERROR_NONE Success * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value @@ -403,7 +405,9 @@ NOTIFICATION_DEPRECATED_API int notification_set_pkgname(notification_h noti, /** * @internal + * @brief Sets caller's app_id. * @details caller_app_id is set automatically when notification_create() is called. We do not recommend to use this API. + * @since_tizen 4.0 * @param[in] noti Notification handle * @param[in] app_id Caller application id * @return NOTIFICATION_ERROR_NONE on success, other value on failure @@ -559,7 +563,8 @@ NOTIFICATION_DEPRECATED_API int notification_get_id(notification_h noti, /** * @internal - * @brief Set priv_id of the notification. + * @brief Sets priv_id of the notification. + * @since_tizen 4.0 * @param[in] noti Notification handle * @param[in] priv_id Private ID * @return NOTIFICATION_ERROR_NONE on success, other value on failure @@ -698,11 +703,8 @@ NOTIFICATION_DEPRECATED_API int notification_get_execute_option(notification_h n } * @endcode */ -int notification_insert(notification_h noti, - int *priv_id); - -int notification_insert_for_uid(notification_h noti, - int *priv_id, uid_t uid); +int notification_insert(notification_h noti, int *priv_id); +int notification_insert_for_uid(notification_h noti, int *priv_id, uid_t uid); /** * @internal @@ -884,8 +886,8 @@ int notification_get_default_button(notification_h noti, notification_button_ind /** * @brief Gets the notification ongoing value type. * @since_tizen 3.0 - * @param[in] noti The notification handle - * @param[out] type The notification ongoing value type + * @param[in] noti The notification handle + * @param[out] type The notification ongoing value type * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -954,7 +956,7 @@ int notification_get_ongoing_value_type(notification_h noti, notification_ongoin int notification_set_ongoing_value_type(notification_h noti, notification_ongoing_value_type_e type); /** - * @brief Gets the notification ongoing time when ongoint type value is set NOTIFICATION_ONGOING_VALUE_TYPE_TIME. + * @brief Gets the notification ongoing time when ongoint type value is set #NOTIFICATION_ONGOING_VALUE_TYPE_TIME. * @since_tizen 3.0 * @param[in] noti The notification handle * @param[out] current The ongoing current time @@ -991,7 +993,7 @@ int notification_set_ongoing_value_type(notification_h noti, notification_ongoin int notification_get_ongoing_time(notification_h noti, int *current, int *duration); /** - * @brief Sets the notification ongoing time when ongoint type value is set NOTIFICATION_ONGOING_VALUE_TYPE_TIME. + * @brief Sets the notification ongoing time when ongoint type value is set #NOTIFICATION_ONGOING_VALUE_TYPE_TIME. * @since_tizen 3.0 * @param[in] noti The notification handle * @param[in] current The ongoing current time @@ -1347,7 +1349,8 @@ int notification_get_event_flag(notification_h noti, bool *event_flag); int notification_check_event_receiver_available(notification_h noti, bool *available); /** - * @brief This function translate localized texts + * @brief This function translate localized texts. + * @since_tizen 3.0 * @param[in] noti The notification handle that is created by notification_create() * @return #NOTIFICATION_ERROR_NONE if success, other value if failure * @see notification_create() @@ -1392,6 +1395,8 @@ notification_h notification_load_by_tag_for_uid(const char *tag, uid_t uid); /** * @brief Gets a max length of text input. * @since_tizen 3.0 + * @param[in] noti The notification handle + * @param[in] Max length of Text input * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1497,7 +1502,7 @@ int notification_get_extension_event_handler(notification_h noti, * @internal * @brief Sets the label of caller application. * @details It recommends for daemons. For an Application, the label is set when notification create. - * @since tizen 5.0 + * @since_tizen 5.0 * @param[in] noti Notification handle * @param[in] label Label of Caller application * @return NOTIFICATION_ERROR_NONE on success, other value on failure @@ -1528,10 +1533,10 @@ int notification_set_app_label(notification_h noti, char *label); /** * @internal - * @brief Gets the label of caller application + * @brief Gets the label of caller application. * @details Label may be null if it was not set. - * Do not free @a label. It will be freed when notification_free() is called. - * @since tizen 5.0 + * Do not free @a label. It will be freed when notification_free() is called. + * @since_tizen 5.0 * @param[in] noti Notification handle * @param[out] label Label of Caller application * @return NOTIFICATION_ERROR_NONE on success, other value on failure diff --git a/include/notification_ipc.h b/include/notification_ipc.h old mode 100755 new mode 100644 diff --git a/include/notification_list.h b/include/notification_list.h index bfaa64f7..a05d61f0 100644 --- a/include/notification_list.h +++ b/include/notification_list.h @@ -49,9 +49,9 @@ typedef struct _notification_list *notification_list_h; * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] type The notification type - * @param[in] count The returned notification data number - * @param[out] #NOTIFICATION_ERROR_NONE on success, other value on failure + * @param[in] type The notification type + * @param[in] count The returned notification data number + * @param[out] list The notification list handle * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success diff --git a/include/notification_ongoing.h b/include/notification_ongoing.h index e2014bae..fa6e95a9 100644 --- a/include/notification_ongoing.h +++ b/include/notification_ongoing.h @@ -74,15 +74,50 @@ int notification_ongoing_update_cb_set(notification_ongoing_update_cb callback, */ int notification_ongoing_update_cb_unset(void); +/** + * @brief Updates progress. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] caller_app_id + * @param[in] priv_id + * @param[in] progress + * @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_FROM_DBUS Error from DBus + */ int notification_ongoing_update_progress(const char *caller_app_id, - int priv_id, - double progress); + int priv_id, double progress); +/** + * @brief Updates size. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] caller_app_id + * @param[in] priv_id + * @param[in] size + * @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_FROM_DBUS Error from DBus + */ int notification_ongoing_update_size(const char *caller_app_id, - int priv_id, double size); + int priv_id, double size); +/** + * @brief Updates content. + * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @param[in] caller_app_id + * @param[in] priv_id + * @param[in] content + * @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_FROM_DBUS Error from DBus + */ int notification_ongoing_update_content(const char *caller_app_id, - int priv_id, const char *content); + int priv_id, const char *content); /** * @} diff --git a/include/notification_private.h b/include/notification_private.h old mode 100755 new mode 100644 diff --git a/include/notification_setting.h b/include/notification_setting.h index b59cdb52..9186cd6f 100644 --- a/include/notification_setting.h +++ b/include/notification_setting.h @@ -28,9 +28,36 @@ extern "C" { typedef struct notification_setting *notification_setting_h; +/** + * @internal + * @brief Gets setting handle of current process. + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @param[out] setting The setting handle + * @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_OUT_OF_MEMORY Out of memory + * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Already exist private ID + * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied + * @par sample code: + * @code +#include +... +{ + int noti_err = 0; + notification_setting_h setting = NULL; + + noti_err = notification_setting_get_setting(&setting); + if (noti_err != NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_setting_get_setting(notification_setting_h *setting); -/* +/** * @internal * @brief Gets value which whether information on the notification view is visible. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif @@ -42,7 +69,7 @@ int notification_setting_get_setting(notification_setting_h *setting); * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par sample code: * @code -#include +#include ... { int noti_err = 0; @@ -65,7 +92,7 @@ int notification_setting_get_setting(notification_setting_h *setting); */ int notification_setting_get_visibility_class(notification_setting_h setting, int *value); -/* +/** * @internal * @brief Sets value which whether information on the notification view is visible. * @details After notification_setting_update_setting() call, the visibility_class value is not updated. @@ -78,7 +105,7 @@ int notification_setting_get_visibility_class(notification_setting_h setting, in * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par sample code: * @code -#include +#include ... { int noti_err = 0; @@ -103,9 +130,9 @@ int notification_setting_get_visibility_class(notification_setting_h setting, in */ int notification_setting_set_visibility_class(notification_setting_h setting, int value); -/* +/** * @internal - * @brief Update the notification setting handle. + * @brief Updates the notification setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification @@ -114,9 +141,12 @@ int notification_setting_set_visibility_class(notification_setting_h setting, in * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error + * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @par sample code: * @code -#include +#include ... { int noti_err = 0; @@ -139,7 +169,7 @@ int notification_setting_set_visibility_class(notification_setting_h setting, in */ int notification_setting_update_setting(notification_setting_h setting); -/* +/** * @internal * @brief Frees the internal structure data of a notification setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif @@ -150,7 +180,7 @@ int notification_setting_update_setting(notification_setting_h setting); * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par sample code: * @code -#include +#include ... { int noti_err = 0; @@ -170,7 +200,56 @@ int notification_setting_update_setting(notification_setting_h setting); */ int notification_setting_free_notification(notification_setting_h setting); +/** + * @internal + * @brief Refreshs the setting table of current user. + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @param[in] uid User id + * @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_FROM_DB Error from DB query + * @par sample code: + * @code +#include +... +{ + int ret; + + ret = notification_setting_refresh_setting_table(uid); + if (ret = NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_setting_refresh_setting_table(uid_t uid); + +/** + * @internal + * @brief Initializes the system setting table of the current user. + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @param[in] uid User id + * @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_OUT_OF_MEMORY Out of memory + * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Already exist private ID + * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error + * @par sample code: + * @code +#include +... +{ + int ret; + + ret = notification_system_setting_init_system_setting_table(uid); + if (ret != NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_system_setting_init_system_setting_table(uid_t uid); #ifdef __cplusplus diff --git a/include/notification_setting_internal.h b/include/notification_setting_internal.h index 5a38fc61..951d4d3a 100644 --- a/include/notification_setting_internal.h +++ b/include/notification_setting_internal.h @@ -30,15 +30,16 @@ extern "C" { typedef struct notification_system_setting *notification_system_setting_h; typedef struct notification_system_setting_dnd_allow_exception *dnd_allow_exception_h; -/* - * The prototype of handler that 'Do not disturb' mode set schdule changed alarm. +/** + * @brief The prototype of handler that 'Do not disturb' mode set schdule changed alarm. + * @since_tizen 3.0 */ typedef void (*dnd_changed_cb)(void *user_data, int do_not_disturb); /** -* @brief Enumeration for Week Flag, the days of the week. -* @since_tizen 3.0 -*/ + * @brief Enumeration for Week Flag, the days of the week. + * @since_tizen 3.0 + */ typedef enum { DND_SCHEDULE_WEEK_FLAG_SUNDAY = 0x01, /**< Sunday */ DND_SCHEDULE_WEEK_FLAG_MONDAY = 0x02, /**< Monday */ @@ -47,7 +48,6 @@ typedef enum { DND_SCHEDULE_WEEK_FLAG_THURSDAY = 0x10, /**< Thursday */ DND_SCHEDULE_WEEK_FLAG_FRIDAY = 0x20, /**< Friday */ DND_SCHEDULE_WEEK_FLAG_SATURDAY = 0x40, /**< Saturday */ - DND_SCHEDULE_WEEK_FLAG_MAX = 0x80, DND_SCHEDULE_WEEK_FLAG_ALL = DND_SCHEDULE_WEEK_FLAG_SUNDAY| DND_SCHEDULE_WEEK_FLAG_MONDAY | DND_SCHEDULE_WEEK_FLAG_TUESDAY | @@ -58,13 +58,13 @@ typedef enum { } dnd_schedule_week_flag_e; /** -* @brief Enumeration for lock screen content. -* @since_tizen 3.0 -*/ + * @brief Enumeration for lock screen content. + * @since_tizen 3.0 + */ typedef enum lock_screen_content_level { - SHOW_ALL_CONTENT = 0, - HIDE_SENSITIVE_CONTENT, - DO_NOT_SHOW_NOTIFICATIONS, + SHOW_ALL_CONTENT = 0, /**< Show all*/ + HIDE_SENSITIVE_CONTENT, /**< Hide sensitive */ + DO_NOT_SHOW_NOTIFICATIONS, /**< Do not Showw */ } lock_screen_content_level_e; /** @@ -72,7 +72,7 @@ typedef enum lock_screen_content_level { * @since_tizen 3.0 */ typedef enum dnd_allow_exception_type { - NOTIFICATION_DND_ALLOWED_CALLS = 0, + NOTIFICATION_DND_ALLOWED_CALLS = 0, /**< Call */ /* possible to add */ } dnd_allow_exception_type_e; @@ -81,10 +81,10 @@ typedef enum dnd_allow_exception_type { * @since_tizen 3.0 */ typedef enum notification_dnd_allowed_calls { - NOTIFICATION_DND_ALLOWED_CALLS_EVERYONE = 0, - NOTIFICATION_DND_ALLOWED_CALLS_CONTACT, - NOTIFICATION_DND_ALLOWED_CALLS_FAVORITE, - NOTIFICATION_DND_ALLOWED_CALLS_NOBODY, + NOTIFICATION_DND_ALLOWED_CALLS_EVERYONE = 0, /**< Everyone */ + NOTIFICATION_DND_ALLOWED_CALLS_CONTACT, /**< Contact */ + NOTIFICATION_DND_ALLOWED_CALLS_FAVORITE, /**< Favorite */ + NOTIFICATION_DND_ALLOWED_CALLS_NOBODY, /**< Nobody */ } notification_dnd_allowed_calls_e; /* Application setting */ @@ -125,8 +125,8 @@ struct notification_system_setting_dnd_allow_exception { * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[out] setting_array The array of otification setting - * @param[out] count The count of array + * @param[out] setting_array The array of notification setting + * @param[out] count The count of array * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -159,14 +159,14 @@ struct notification_system_setting_dnd_allow_exception { int notification_setting_get_setting_array(notification_setting_h *setting_array, int *count); int notification_setting_get_setting_array_for_uid(notification_setting_h *setting_array, int *count, uid_t uid); -/* +/** * @internal * @brief Gets notification setting by package name. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] package_name The package_name - * @param[out] setting The notification setting + * @param[in] package_name The package_name + * @param[out] setting The notification setting * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -198,12 +198,12 @@ int notification_setting_get_setting_array_for_uid(notification_setting_h *setti int notification_setting_get_setting_by_package_name(const char *package_name, notification_setting_h *setting); int notification_setting_get_setting_by_appid_for_uid(const char *app_id, notification_setting_h *setting, uid_t uid); -/* +/** * @internal * @brief Gets package name from notification setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[out] value The package name + * @param[in] setting The notification setting handle + * @param[out] value The package name * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -234,12 +234,12 @@ int notification_setting_get_setting_by_appid_for_uid(const char *app_id, notifi */ int notification_setting_get_package_name(notification_setting_h setting, char **value); -/* +/** * @internal * @brief Gets application id from notification setting handle. * @since_tizen 3.0 - * @param[in] setting The notification setting handle - * @param[out] app_id The application id + * @param[in] setting The notification setting handle + * @param[out] app_id The application id * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -270,12 +270,12 @@ int notification_setting_get_package_name(notification_setting_h setting, char * */ int notification_setting_get_appid(notification_setting_h setting, char **app_id); -/* +/** * @internal * @brief Gets value which whether allow notification from individual applications. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[out] value The value which whether allow to notification + * @param[in] setting The notification setting handle + * @param[out] value The value which whether allow to notification * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -305,13 +305,13 @@ int notification_setting_get_appid(notification_setting_h setting, char **app_id */ int notification_setting_get_allow_to_notify(notification_setting_h setting, bool *value); -/* +/** * @internal * @brief Sets value which whether allow notification from individual applications. * @details After notification_setting_update_setting() call, the allow_to_notify is updated. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[in] value The value whether allow to notification + * @param[in] setting The notification setting handle + * @param[in] value The value whether allow to notification * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -343,13 +343,12 @@ int notification_setting_get_allow_to_notify(notification_setting_h setting, boo */ int notification_setting_set_allow_to_notify(notification_setting_h setting, bool value); -/* +/** * @internal * @brief Gets value which whether do not disturb notification from notification setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[out] value The value which whether do not disturb notification or not - * + * @param[in] setting The notification setting handle + * @param[out] value The value which whether do not disturb notification or not * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -379,13 +378,13 @@ int notification_setting_set_allow_to_notify(notification_setting_h setting, boo */ int notification_setting_get_do_not_disturb_except(notification_setting_h setting, bool *value); -/* +/** * @internal * @brief Sets value which whether do not disturb notification or not. * @details After notification_setting_update_setting() call, the do_not_disturb value is updated. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[in] value The value which do not disturb notification or not + * @param[in] setting The notification setting handle + * @param[in] value The value which do not disturb notification or not * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -417,12 +416,12 @@ int notification_setting_get_do_not_disturb_except(notification_setting_h settin */ int notification_setting_set_do_not_disturb_except(notification_setting_h setting, bool value); -/* +/** * @internal * @brief Gets value whether Pop up notification is allowed or not. * @since_tizen 3.0 - * @param[in] setting The notification setting handle - * @param[in] value The value + * @param[in] setting The notification setting handle + * @param[in] value The value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -454,13 +453,13 @@ int notification_setting_set_do_not_disturb_except(notification_setting_h settin */ int notification_setting_get_pop_up_notification(notification_setting_h setting, bool *value); -/* +/** * @internal * @brief Sets value which Pop up notification allow or block. * @details After notification_setting_update_setting() call, the pop_up_notification value is updated. * @since_tizen 3.0 - * @param[in] setting The notification setting handle - * @param[in] value The value + * @param[in] setting The notification setting handle + * @param[in] value The value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -492,12 +491,12 @@ int notification_setting_get_pop_up_notification(notification_setting_h setting, */ int notification_setting_set_pop_up_notification(notification_setting_h setting, bool value); -/* +/** * @internal * @brief Gets displaying level that notification's information on lock screen from individual application. * @since_tizen 3.0 - * @param[in] setting The notification setting handle - * @param[out] level The displaying level of notification's information on lock screen + * @param[in] setting The notification setting handle + * @param[out] level The displaying level of notification's information on lock screen * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -528,13 +527,13 @@ int notification_setting_set_pop_up_notification(notification_setting_h setting, */ int notification_setting_get_lock_screen_content(notification_setting_h setting, lock_screen_content_level_e *level); -/* +/** * @internal * @brief Sets displaying level that notification's information on lock screen from individual application. * @details After notification_setting_update_setting() call, the lock_screen_content_level value is updated. * @since_tizen 3.0 - * @param[in] setting The notification setting handle - * @param[out] level The displaying level of notification's information on lock screen + * @param[in] setting The notification setting handle + * @param[out] level The displaying level of notification's information on lock screen * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -567,14 +566,14 @@ int notification_setting_get_lock_screen_content(notification_setting_h setting, */ int notification_setting_set_lock_screen_content(notification_setting_h setting, lock_screen_content_level_e level); -/* +/** * @internal - * @brief Gets The value that determines whether the app is disabled + * @brief Gets The value that determines whether the app is disabled. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] setting The notification system setting handle - * @param[out] value The value that determines whether the app is disabled + * @param[in] setting The notification system setting handle + * @param[out] value The value that determines whether the app is disabled * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -601,17 +600,21 @@ int notification_setting_set_lock_screen_content(notification_setting_h setting, */ int notification_setting_get_app_disabled(notification_setting_h setting, bool *value); -/* +/** * @internal * @brief Gets the notification system setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] setting The notification system setting handle + * @param[in] system_setting The notification system setting handle * @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_OUT_OF_MEMORY Out of memory + * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error + * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @par sample code: * @code #include @@ -637,13 +640,13 @@ int notification_setting_get_app_disabled(notification_setting_h setting, bool * int notification_system_setting_load_system_setting(notification_system_setting_h *system_setting); int notification_system_setting_load_system_setting_for_uid(notification_system_setting_h *system_setting, uid_t uid); -/* +/** * @internal - * @brief Update the notification system handle. + * @brief Updates the notification system handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] setting The notification system setting handle + * @param[in] system_setting The notification system setting handle * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -673,11 +676,11 @@ int notification_system_setting_load_system_setting_for_uid(notification_system_ int notification_system_setting_update_system_setting(notification_system_setting_h system_setting); int notification_system_setting_update_system_setting_for_uid(notification_system_setting_h system_setting, uid_t uid); -/* +/** * @internal * @brief Frees the internal structure data of a notification system setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification system setting handle + * @param[in] system_setting The notification system setting handle * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -704,13 +707,12 @@ int notification_system_setting_update_system_setting_for_uid(notification_syste */ int notification_system_setting_free_system_setting(notification_system_setting_h system_setting); -/* +/** * @internal * @brief Gets value which whether do not disturb notification from notification system setting handle. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification system setting handle - * @param[out] value The value which whether do not disturb notification or not - * + * @param[in] system_setting The notification system setting handle + * @param[out] value The value which whether do not disturb notification or not * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -740,14 +742,13 @@ int notification_system_setting_free_system_setting(notification_system_setting_ */ int notification_system_setting_get_do_not_disturb(notification_system_setting_h system_setting, bool *value); -/* +/** * @internal * @brief Sets value which whether do not disturb notification or not. * @details After notification_system_setting_update_system_setting() call, the do_not_disturb value is not updated. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification system setting handle - * @param[in] value The value which do not disturb notification or not - * + * @param[in] system_setting The notification system setting handle + * @param[in] value The value which do not disturb notification or not * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -779,12 +780,12 @@ int notification_system_setting_get_do_not_disturb(notification_system_setting_h */ int notification_system_setting_set_do_not_disturb(notification_system_setting_h system_setting, bool value); -/* +/** * @internal * @brief Gets value which whether information on the notification view is visible. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification system setting handle - * @param[out] value The visibility_class value + * @param[in] system_setting The notification system setting handle + * @param[out] value The visibility_class value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -814,13 +815,13 @@ int notification_system_setting_set_do_not_disturb(notification_system_setting_h */ int notification_system_setting_get_visibility_class(notification_system_setting_h system_setting, int *value); -/* +/** * @internal * @brief Sets value which whether information on the notification view is visible. * @details After notification_system_setting_update_system_setting() call, the visibility_class value is not updated. * @since_tizen @if wearable 2.3.1 @elseif mobile 2.3 @endif - * @param[in] setting The notification setting handle - * @param[in] value The visibility_class value + * @param[in] system_setting The notification setting handle + * @param[in] value The visibility_class value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -852,12 +853,12 @@ int notification_system_setting_get_visibility_class(notification_system_setting */ int notification_system_setting_set_visibility_class(notification_system_setting_h system_setting, int value); -/* +/** * @internal * @brief Gets value which whether 'Do not disturb' mode is enable or not. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[out] enabled The dnd_schedule_enabled value + * @param[in] system_setting The notification system setting handle + * @param[out] enabled The dnd_schedule_enabled value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -887,13 +888,13 @@ int notification_system_setting_set_visibility_class(notification_system_setting */ int notification_system_setting_dnd_schedule_get_enabled(notification_system_setting_h system_setting, bool *enabled); -/* +/** * @internal * @brief Sets value which whether 'Do not disturb' mode is enable or not. * @details After notification_system_setting_update_system_setting() call, the 'Do not disturb' mode is not updated. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[in] enabled The dnd_schedule_enabled value + * @param[in] system_setting The notification system setting handle + * @param[in] enabled The dnd_schedule_enabled value * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -925,12 +926,12 @@ int notification_system_setting_dnd_schedule_get_enabled(notification_system_set */ int notification_system_setting_dnd_schedule_set_enabled(notification_system_setting_h system_setting, bool enabled); -/* +/** * @internal * @brief Gets days of the week that 'Do not disturb' mode is enable. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[out] day The days of the week that enable 'Do not disturb' mode + * @param[in] system_setting The notification system setting handle + * @param[out] day The days of the week that enable 'Do not disturb' mode * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -961,13 +962,13 @@ int notification_system_setting_dnd_schedule_set_enabled(notification_system_set */ int notification_system_setting_dnd_schedule_get_day(notification_system_setting_h system_setting, int *day); -/* +/** * @internal * @brief Sets days of the week that 'Do not disturb' mode is enable. * @details After notification_system_setting_update_system_setting() call, the days not updated. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[in] day The days of the week that enable 'Do not disturb' mode + * @param[in] system_setting The notification system setting handle + * @param[in] day The days of the week that enable 'Do not disturb' mode * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1000,13 +1001,13 @@ int notification_system_setting_dnd_schedule_get_day(notification_system_setting */ int notification_system_setting_dnd_schedule_set_day(notification_system_setting_h system_setting, int day); -/* +/** * @internal * @brief Gets time that 'Do not disturb' mode is started. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[out] hour The hour that 'Do not disturb' mode is started - * @param[out] min The min that 'Do not disturb' mode is started + * @param[in] system_setting The notification system setting handle + * @param[out] hour The hour that 'Do not disturb' mode is started + * @param[out] min The min that 'Do not disturb' mode is started * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1037,13 +1038,13 @@ int notification_system_setting_dnd_schedule_set_day(notification_system_setting */ int notification_system_setting_dnd_schedule_get_start_time(notification_system_setting_h system_setting, int *hour, int *min); -/* +/** * @internal * @brief Sets time that 'Do not disturb' mode is started. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[in] hour The hour that 'Do not disturb' mode is startd - * @param[in] min The min that 'Do not disturb' mode is started + * @param[in] system_setting The notification system setting handle + * @param[in] hour The hour that 'Do not disturb' mode is startd + * @param[in] min The min that 'Do not disturb' mode is started * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1077,13 +1078,13 @@ int notification_system_setting_dnd_schedule_get_start_time(notification_system_ */ int notification_system_setting_dnd_schedule_set_start_time(notification_system_setting_h system_setting, int hour, int min); -/* +/** * @internal * @brief Gets time that 'Do not disturb' mode is ended. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[out] hour The hour that 'Do not disturb' mode is ended - * @param[out] min The min that 'Do not disturb' mode is ended + * @param[in] system_setting The notification system setting handle + * @param[out] hour The hour that 'Do not disturb' mode is ended + * @param[out] min The min that 'Do not disturb' mode is ended * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1114,13 +1115,13 @@ int notification_system_setting_dnd_schedule_set_start_time(notification_system_ */ int notification_system_setting_dnd_schedule_get_end_time(notification_system_setting_h system_setting, int *hour, int *min); -/* +/** * @internal * @brief Sets time that 'Do not disturb' mode is ended. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[in] hour The hour that 'Do not disturb' mode is ended - * @param[in] min The min that 'Do not disturb' mode is ended + * @param[in] system_setting The notification system setting handle + * @param[in] hour The hour that 'Do not disturb' mode is ended + * @param[in] min The min that 'Do not disturb' mode is ended * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1154,12 +1155,12 @@ int notification_system_setting_dnd_schedule_get_end_time(notification_system_se */ int notification_system_setting_dnd_schedule_set_end_time(notification_system_setting_h system_setting, int hour, int min); -/* +/** * @internal * @brief Gets displaying level that notification's information on lock screen. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[out] level The displaying level of notification's information on lock screen + * @param[in] system_setting The notification system setting handle + * @param[out] level The displaying level of notification's information on lock screen * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1194,8 +1195,8 @@ int notification_system_setting_get_lock_screen_content(notification_system_sett * @internal * @brief Sets displaying level that notification's information on lock screen. * @since_tizen 3.0 - * @param[in] setting The notification system setting handle - * @param[in] level The displaying level of notification's information on lock screen + * @param[in] system_setting The notification system setting handle + * @param[in] level The displaying level of notification's information on lock screen * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1228,14 +1229,14 @@ int notification_system_setting_get_lock_screen_content(notification_system_sett */ int notification_system_setting_set_lock_screen_content(notification_system_setting_h system_setting, lock_screen_content_level_e level); -/* +/** * @internal * @brief Gets a value of the do_not_disturb allow exceptions. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] setting The notification system setting handle - * @param[in] dnd_allow_exception_type_e The exceptional item of do_not_distrub + * @param[in] system_setting The notification system setting handle + * @param[in] type The exceptional item of do_not_distrub * @param[out] value The value of the exceptional item * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure @@ -1269,14 +1270,14 @@ int notification_system_setting_set_lock_screen_content(notification_system_sett */ int notification_system_setting_get_dnd_allow_exceptions(notification_system_setting_h system_setting, dnd_allow_exception_type_e type, int *value); -/* +/** * @internal * @brief Sets a value of the do_not_disturb allow exceptions. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] setting The notification system setting handle - * @param[in] dnd_allow_exception_type_e The exceptional item of do_not_distrub + * @param[in] system_setting The notification system setting handle + * @param[in] type The exceptional item of do_not_distrub * @param[in] value The value of the exceptional item * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure @@ -1311,15 +1312,15 @@ int notification_system_setting_get_dnd_allow_exceptions(notification_system_set */ int notification_system_setting_set_dnd_allow_exceptions(notification_system_setting_h system_setting, dnd_allow_exception_type_e type, int value); -/* +/** * @internal * @brief Registers a callback for turn on/off 'Do not disturb' mode by user_data * or 'Do not disturb' mode setting schedule is start or end. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] callback The callback function - * @param[in] user_data The user data + * @param[in] callback The callback function + * @param[in] user_data The user data * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1355,14 +1356,14 @@ static void changed_cb(void *user_data, int do_not_disturb) int notification_register_system_setting_dnd_changed_cb(dnd_changed_cb callback, void *user_data); int notification_register_system_setting_dnd_changed_cb_for_uid(dnd_changed_cb callback, void *user_data, uid_t uid); -/* +/** * @internal * @brief Unregisters a callback for turn on/off 'Do not disturb' mode by user_data * or 'Do not disturb' mode setting schedule is start or end. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification - * @param[in] callback The callback function + * @param[in] callback The callback function * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success @@ -1395,8 +1396,90 @@ static void changed_cb(void *user_data, int do_not_disturb) int notification_unregister_system_setting_dnd_changed_cb(dnd_changed_cb callback); int notification_unregister_system_setting_dnd_changed_cb_for_uid(dnd_changed_cb callback, uid_t uid); +/** + * @internal + * @brief Updates the notification setting if the pacakge is installed or updated. + * @since_tizen 3.0 + * @param[in] package_name + * @param[in] uid User id + * @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_FROM_DB Error from DB query + * @par sample code: + * @code +#include +... +{ + int ret; + + ret = notification_setting_insert_package_for_uid(pkg_name, uid); + if (ret = NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_setting_insert_package_for_uid(const char *package_name, uid_t uid); + +/** + * @internal + * @brief Deletes the notification setting if the pacakge is uninstalled. + * @since_tizen 3.0 + * @param[in] package_name + * @param[in] uid User id + * @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_FROM_DB Error from DB query + * @par sample code: + * @code +#include +... +{ + int ret; + + ret = notification_setting_delete_package_for_uid(pkg_name, uid); + if (ret = NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_setting_delete_package_for_uid(const char *package_name, uid_t uid); + +/** + * @internal + * @brief Updates the notification setting. + * @since_tizen 3.0 + * @param[in] setting Notification setting handle + * @param[in] uid User id + * @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_OUT_OF_MEMORY Out of memory + * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error + * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied + * @par sample code: + * @code +#include +... +{ + int ret; + notification_setting_h setting; + + // Get setting data + + // Update setting data + + ret = notification_setting_update_setting_for_uid(setting, uid); + if (ret = NOTIFICATION_ERROR_NONE) + return; +} + * @endcode + */ int notification_setting_update_setting_for_uid(notification_setting_h setting, uid_t uid); /* OLD IMPLEMENTATION */ diff --git a/include/notification_shared_file.h b/include/notification_shared_file.h old mode 100755 new mode 100644 diff --git a/include/notification_type.h b/include/notification_type.h index ee0e82e2..bb0d5809 100644 --- a/include/notification_type.h +++ b/include/notification_type.h @@ -68,8 +68,7 @@ typedef enum _notification_ly_type { * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif */ typedef enum _notification_launch_option_type { - NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1, - /**< Launching with app control */ + NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1, /**< Launching with app control */ } notification_launch_option_type; @@ -133,7 +132,7 @@ typedef enum _notification_led_op { * @since_tizen 2.3 */ typedef enum _notification_count_display_type { - NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1, + NOTIFICATION_COUNT_DISPLAY_TYPE_NONE = -1, /**< None */ NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT = 0, /**< The number is placed to left */ NOTIFICATION_COUNT_DISPLAY_TYPE_IN, /**< The number is placed to center */ NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT, /**< The number is placed to right */ @@ -163,7 +162,7 @@ typedef enum _notification_button_index { * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif */ typedef enum _notification_text_type { - NOTIFICATION_TEXT_TYPE_NONE = -1, + NOTIFICATION_TEXT_TYPE_NONE = -1, /**< None */ NOTIFICATION_TEXT_TYPE_TITLE = 0, /**< Title */ NOTIFICATION_TEXT_TYPE_CONTENT, /**< Content */ NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF, /**< Content for content display option is off of the Settings */ @@ -198,7 +197,7 @@ typedef enum _notification_text_type { * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif */ typedef enum _notification_image_type { - NOTIFICATION_IMAGE_TYPE_NONE = -1, + NOTIFICATION_IMAGE_TYPE_NONE = -1, /**< None */ NOTIFICATION_IMAGE_TYPE_ICON = 0, /**< Icon */ NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, /**< Indicator icon */ NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK, /**< Lock screen icon */ @@ -378,9 +377,9 @@ typedef struct _notification_op { * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum notification_permission_type { - NOTIFICATION_PERMISSION_TYPE_NONE = 0, - NOTIFICATION_PERMISSION_TYPE_DELETE = 1, - NOTIFICATION_PERMISSION_TYPE_UPDATE = 2, + NOTIFICATION_PERMISSION_TYPE_NONE = 0, /**< None */ + NOTIFICATION_PERMISSION_TYPE_DELETE = 1, /**< Delete */ + NOTIFICATION_PERMISSION_TYPE_UPDATE = 2, /**< Update */ } notification_permission_type_e; /** diff --git a/packaging/notification.spec b/packaging/notification.spec old mode 100755 new mode 100644 diff --git a/src/notification.c b/src/notification.c old mode 100755 new mode 100644 diff --git a/src/notification_db.c b/src/notification_db.c old mode 100755 new mode 100644 diff --git a/src/notification_db_query.h b/src/notification_db_query.h old mode 100755 new mode 100644 diff --git a/src/notification_group.c b/src/notification_group.c old mode 100755 new mode 100644 diff --git a/src/notification_internal.c b/src/notification_internal.c old mode 100755 new mode 100644 diff --git a/src/notification_ipc.c b/src/notification_ipc.c old mode 100755 new mode 100644 diff --git a/src/notification_list.c b/src/notification_list.c old mode 100755 new mode 100644 diff --git a/src/notification_noti.c b/src/notification_noti.c old mode 100755 new mode 100644 diff --git a/src/notification_ongoing.c b/src/notification_ongoing.c old mode 100755 new mode 100644 diff --git a/src/notification_setting.c b/src/notification_setting.c old mode 100755 new mode 100644 index ab34aae3..c8974b76 --- a/src/notification_setting.c +++ b/src/notification_setting.c @@ -85,16 +85,15 @@ EXPORT_API int notification_setting_get_setting_by_package_name(const char *pack EXPORT_API int notification_setting_get_setting(notification_setting_h *setting) { int ret; - char *package_name = NULL; - - package_name = notification_get_app_id_by_pid(getpid()); + char *app_id = NULL; - if (package_name == NULL) + app_id = notification_get_app_id_by_pid(getpid()); + if (app_id == NULL) return NOTIFICATION_ERROR_NOT_EXIST_ID; - ret = notification_setting_get_setting_by_package_name(package_name, setting); + ret = notification_setting_get_setting_by_package_name(app_id, setting); - free(package_name); + free(app_id); return ret; } diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c old mode 100755 new mode 100644 diff --git a/src/notification_shared_file.c b/src/notification_shared_file.c old mode 100755 new mode 100644 diff --git a/src/notification_status.c b/src/notification_status.c old mode 100755 new mode 100644 diff --git a/test-app/main.c b/test-app/main.c old mode 100755 new mode 100644