From fa4fe55e3de24e9a534d5891abe78af456ae40f4 Mon Sep 17 00:00:00 2001 From: "mk5004.lee" Date: Thu, 26 Sep 2019 11:09:25 +0900 Subject: [PATCH] Update doxygen about legacy notification Change-Id: I0960bc8b826c368a1ac8a23893101b8f940def50 Signed-off-by: mk5004.lee --- notification/include/notification.h | 78 +++++++++++++++------------- notification/include/notification_internal.h | 42 +++++++-------- notification/include/notification_list.h | 73 ++++++++++++++------------ notification/include/notification_type.h | 4 +- 4 files changed, 106 insertions(+), 91 deletions(-) diff --git a/notification/include/notification.h b/notification/include/notification.h index 54a6f3b..6aa8334 100644 --- a/notification/include/notification.h +++ b/notification/include/notification.h @@ -85,10 +85,10 @@ int notification_set_image(notification_h noti, notification_image_type_e type, * @param[in] noti Notification handle * @param[in] type Notification image type * @param[out] image_path Image file full path - * @return NOTIFICATION_ERROR_NONE on success, + * @return #NOTIFICATION_ERROR_NONE on success, * other value on failure - * @retval NOTIFICATION_ERROR_NONE Success - * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @pre Notification handle should be created by notification_create(). * @see #notification_image_type_e * @see notification_create() @@ -256,6 +256,7 @@ int notification_set_text(notification_h noti, notification_text_type_e type, /** * @brief Gets the text from the notification handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif + * @remarks Do not free @a text. It will be freed when notification_free() is called. * @param[in] noti The notification handle * @param[in] type The notification text type * @param[out] text The notification text @@ -344,6 +345,7 @@ int notification_set_sound(notification_h noti, notification_sound_type_e type, /** * @brief Gets the sound type from the notification handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif + * @remarks Do not free @a path. It will be freed when notification_free() is called. * @param[in] noti The notification handle * @param[out] type The notification sound type * @param[out] path The user sound file path @@ -401,6 +403,7 @@ int notification_set_vibration(notification_h noti, notification_vibration_type_ /** * @brief Gets the vibrate type from the notification handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif + * @remarks Do not free @a path. It will be freed when notification_free() is called. * @param[in] noti The notification handle * @param[out] type The notification sound type * @param[out] path The user vibration file path @@ -413,11 +416,11 @@ int notification_set_vibration(notification_h noti, notification_vibration_type_ #include { - notification_h noti = NULL; - int noti_err = NOTIFICATION_ERROR_NONE; - notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE; + int noti_err; + notification_vibration_type_e type; + char *path; - noti_err = notification_get_vibration(noti, &type, NULL); + noti_err = notification_get_vibration(noti, &type, &path); if (noti_err != NOTIFICATION_ERROR_NONE) return; @@ -546,6 +549,7 @@ int notification_get_led_time_period(notification_h noti, int *on_ms, int *off_m * @brief Sets the launch option for a notification. * @details When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif + * @privlevel public * @privilege http://tizen.org/privilege/appmanager.launch * @remarks Since 4.0, %http://tizen.org/privilege/appmanager.launch privilege is additionally required. * @param[in] noti The notification handle @@ -588,7 +592,7 @@ int notification_set_launch_option(notification_h noti, notification_launch_opti /** * @brief Gets the launch option from the notification handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif - * @remarks You must release @a app_control using app_control_destroy(). + * @remarks You must release @a option using app_control_destroy(). * @param[in] noti The notification handle * @param[in] type Launching option type * @param[out] option The pointer of App Control handler @@ -602,13 +606,14 @@ int notification_set_launch_option(notification_h noti, notification_launch_opti { app_control_h app_control = NULL; - app_control_create(&app_control); - - // Do something noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control); if (noti_err != NOTIFICATION_ERROR_NONE) return; + + // Do something + + app_control_destroy(app_control); } * @endcode */ @@ -620,6 +625,7 @@ int notification_get_launch_option(notification_h noti, notification_launch_opti * @details When some event occurs on notification, application launched by app_control_send_launch_request with app_control handle. \n * Setting event handler of a button means that the notification will show the button. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @privlevel public * @privilege http://tizen.org/privilege/appmanager.launch * @remarks Since 4.0, %http://tizen.org/privilege/appmanager.launch privilege is additionally required. * @param[in] noti The notification handle @@ -663,7 +669,7 @@ int notification_set_event_handler(notification_h noti, notification_event_type_ /** * @brief Gets the event handler of a specific event. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * @remarks You must release @a app_control using app_control_destroy(). + * @remarks You must release @a event_handler 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 @@ -678,7 +684,6 @@ int notification_set_event_handler(notification_h noti, notification_event_type_ { app_control_h app_control = NULL; - app_control_create(&app_control); // Do something @@ -687,6 +692,8 @@ int notification_set_event_handler(notification_h noti, notification_event_type_ notification_free(noti); return; } + + app_control_destroy(app_control); } * @endcode */ @@ -756,7 +763,7 @@ int notification_get_property(notification_h noti, int *flags); /** * @brief Sets applications to display the notification. - * @details All display application is enabled(NOTIFICATION_DISPLAY_APP_ALL) if you do not call this API. + * @details All display application is enabled(NOTIFICATION_DISPLAY_APP_ALL) if you do not call this function. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @param[in] noti The notification handle * @param[in] applist The with | operation @@ -1004,9 +1011,9 @@ int notification_get_type(notification_h noti, notification_type_e *type); * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @par Sample code: * @code #include @@ -1033,8 +1040,8 @@ int notification_update(notification_h noti); * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @par Sample code: * @code #include @@ -1062,11 +1069,10 @@ int notification_delete(notification_h noti); * #NOTIFICATION_TYPE_ONGOING can display progress on a notification with #NOTIFICATION_LY_ONGOING_PROGRESS layout. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free(). * @param[in] type The notification type - * @return Notification handle(notification_h) on success, + * @return Notification handle(#notification_h) on success, * otherwise @c NULL on failure - * @retval notification_h Success - * @retval NULL Failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory @@ -1085,6 +1091,7 @@ int notification_delete(notification_h noti); // Do something + notification_free(noti); } * @endcode */ @@ -1192,6 +1199,7 @@ int notification_set_tag(notification_h noti, const char *tag); /** * @brief Gets the tag of the notification handle. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif + * @remarks Do not free @a tag. It will be freed when notification_free() is called. * @param[in] noti Notification handle * @param[out] tag Tag for loading notification handle * @return #NOTIFICATION_ERROR_NONE on success, @@ -1225,15 +1233,14 @@ int notification_get_tag(notification_h noti, const char **tag); * @privlevel public * @privilege %http://tizen.org/privilege/notification * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free(). * @param[in] tag Tag for loading notification handle - * @return Notification handle(notification_h) on success, + * @return Notification handle(#notification_h) on success, * NULL on failure - * @retval notification_h Success - * @retval NULL Failure * @exception #NOTIFICATION_ERROR_NONE Success + * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @see #notification_type_e * @par Sample code: * @code @@ -1263,8 +1270,8 @@ notification_h notification_load_by_tag(const char *tag); * @return #NOTIFICATION_ERROR_NONE if success, * other value if failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @par Sample code: * @code #include @@ -1291,8 +1298,8 @@ int notification_delete_all(notification_type_e type); * @return #NOTIFICATION_ERROR_NONE if success, * other value if failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @pre Notification handle should be created by notification_create(). * @post notification_free(). * @par Sample code: @@ -1315,12 +1322,13 @@ int notification_post(notification_h noti); /** * @brief Gets the package name of the notification. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @remarks Do not free @a pkgname. It will be freed when notification_free() is called. * @param[in] noti Notification handle * @param[out] pkgname The package name of the notification * @return #NOTIFICATION_ERROR_NONE on success, * otherwise a negative error value - * @retval NOTIFICATION_ERROR_NONE Success - * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code #include @@ -1338,6 +1346,7 @@ int notification_post(notification_h noti); notification_free(noti); return; } + } * @endcode */ @@ -1351,8 +1360,8 @@ int notification_get_pkgname(notification_h noti, char **pkgname); * @param[in] button_index Button index * @return #NOTIFICATION_ERROR_NONE on success, * otherwise a negative error value - * @retval NOTIFICATION_ERROR_NONE Success - * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code #include @@ -1383,8 +1392,8 @@ int notification_add_button(notification_h noti, notification_button_index_e but * @param[in] button_index Button index * @return #NOTIFICATION_ERROR_NONE on success, * otherwise a negative error value - * @retval NOTIFICATION_ERROR_NONE Success - * @retval NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @par Sample code: * @code #include @@ -1450,7 +1459,6 @@ int notification_set_auto_remove(notification_h noti, bool auto_remove); * @return #NOTIFICATION_ERROR_NONE On success, other value on failure * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @see #notification_h - * @see #notification_get_auto_remove * @par Sample code: * @code #include @@ -1485,10 +1493,10 @@ int notification_get_auto_remove(notification_h noti, bool *auto_remove); * @param[in] noti Notification handle * @param[in] template_name Template name * @return #NOTIFICATION_ERROR_NONE On success, other value on failure + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error * @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @retval #NOTIFICATION_ERROR_MAX_EXCEEDED Max notification count exceeded * @see #notification_h * @see notification_create_from_template() @@ -1533,9 +1541,9 @@ int notification_save_as_template(notification_h noti, const char *template_name * @param[in] template_name Template name * @return Notification handle on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success + * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @exception #NOTIFICATION_ERROR_FROM_DB Error from DB query * @see #notification_h * @see notification_save_as_template() @@ -1569,10 +1577,10 @@ notification_h notification_create_from_template(const char *template_name); * @param[out] state Notification block state * @return #NOTIFICATION_ERROR_NONE On success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied * @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_PERMISSION_DENIED Permission denied * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service * @see #notification_block_state_e * @par Sample code: diff --git a/notification/include/notification_internal.h b/notification/include/notification_internal.h index 194405d..9199eb5 100644 --- a/notification/include/notification_internal.h +++ b/notification/include/notification_internal.h @@ -87,7 +87,7 @@ int notification_unresister_changed_cb_for_uid( * @param[in] progress Percentage value of progressive data * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -113,7 +113,7 @@ int notification_update_progress(notification_h noti, int priv_id, double progre * @param[in] size Bytes of progressive data * @return #NOTIFICATION_ERROR_NONE if success, other value if failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -139,7 +139,7 @@ int notification_update_size(notification_h noti, int priv_id, double size); * @param[in] content Text to update * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -252,10 +252,10 @@ int notification_get_count(notification_type_e type, const char *app_id, int gro * @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 + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @retval #NOTIFICATION_ERROR_IO_ERROR I/O Error * @retval #NOTIFICATION_ERROR_FROM_DB Error from DB - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method */ int notification_get_all_count(notification_type_e type, int *count); int notification_get_all_count_for_uid(notification_type_e type, int *count, uid_t uid); @@ -267,7 +267,7 @@ int notification_get_all_count_for_uid(notification_type_e type, int *count, uid * @param[in] type Notification type * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @see #notification_type_e * @par Sample code: * @code @@ -319,7 +319,7 @@ int notification_set_pkgname(notification_h noti, const char *pkgname) NOTIFICAT * @param[in] app_id Caller application id * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -351,7 +351,7 @@ int notification_set_app_id(notification_h noti, const char *app_id); * @param[in] type Notification type * @return #NOTIFICATION_ERROR_NONE if success, other value if failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -377,7 +377,7 @@ int notification_delete_all_by_type(const char *app_id, notification_type_e type * @param[in] priv_id Priv ID * @return #NOTIFICATION_ERROR_NONE if success, other value if failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -588,8 +588,8 @@ int notification_get_execute_option(notification_h noti, * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @pre Notification handle should be created by notification_create(). * @post notification_free(). * @par Sample code: @@ -623,9 +623,9 @@ int notification_insert_for_uid(notification_h noti, int *priv_id, uid_t uid); * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @retval #NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @par Sample code: * @code #include @@ -657,8 +657,8 @@ int notification_update_async_for_uid(notification_h noti, * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @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_unregister_detailed_changed_cb() * @par Sample code: * @code @@ -689,8 +689,8 @@ int notification_register_detailed_changed_cb_for_uid( * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @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_register_detailed_changed_cb() * @par Sample code: * @code @@ -1224,9 +1224,9 @@ int notification_get_event_flag(notification_h noti, bool *event_flag); * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @retval #NOTIFICATION_ERROR_IO_ERROR I/O Error - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service * @see #notification_send_event() @@ -1278,10 +1278,10 @@ int notification_translate_localized_text(notification_h noti); * @param[in] template_name Template name * @return Notification handle on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success - * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The Permission denied + * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @exception #NOTIFICATION_ERROR_IO_ERROR I/O Error * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - * @exception #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @exception #NOTIFICATION_ERROR_FROM_DB Error from DB query * @exception #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service * @see #notification_h @@ -1410,7 +1410,7 @@ int notification_get_extension_event_handler(notification_h noti, * @param[in] label Label of Caller application * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -1444,7 +1444,7 @@ int notification_set_app_label(notification_h noti, char *label); * @param[out] label Label of Caller application * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @par Sample code: * @code #include @@ -1476,10 +1476,10 @@ int notification_set_indirect_request(notification_h noti, pid_t pid, uid_t uid) * @param[in] display_applist Combination value of display list * @return #NOTIFICATION_ERROR_NONE on success, other value on failure * @retval #NOTIFICATION_ERROR_NONE Success - * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied + * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter * @retval #NOTIFICATION_ERROR_IO_ERROR I/O error * @retval #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory - * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @retval #NOTIFICATION_ERROR_FROM_DB Error from DB query * @retval #NOTIFICATION_ERROR_SERVICE_NOT_READY No response from notification service * @par Sample code: diff --git a/notification/include/notification_list.h b/notification/include/notification_list.h index a05d61f..2b148e7 100644 --- a/notification/include/notification_list.h +++ b/notification/include/notification_list.h @@ -49,14 +49,15 @@ 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 + * @remarks The @a list should be released using notification_free_list(). * @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 + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @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_list_h * @par Sample code: * @code @@ -70,16 +71,16 @@ typedef struct _notification_list *notification_list_h; if (noti_err != NOTIFICATION_ERROR_NONE) { return; } + + notification_free_list(noti_list); } * @endcode */ -int notification_get_list(notification_type_e type, - int count, - notification_list_h *list); +int notification_get_list(notification_type_e type, int count, + notification_list_h *list); -int notification_get_list_for_uid(notification_type_e type, - int count, - notification_list_h *list, uid_t uid); +int notification_get_list_for_uid(notification_type_e type, int count, + notification_list_h *list, uid_t uid); /** * @internal @@ -87,6 +88,7 @@ int notification_get_list_for_uid(notification_type_e type, * @since_tizen 4.0 * @privlevel public * @privilege %http://tizen.org/privilege/notification + * @remarks The @a list should be released using notification_free_list(). * @param[in] type The notification type * @param[in] page_number The page number of the value set \n * It starts from @c 1. @@ -97,8 +99,8 @@ int notification_get_list_for_uid(notification_type_e type, * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @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_list_h */ int notification_get_list_by_page(notification_type_e type, @@ -113,6 +115,7 @@ int notification_get_list_by_page_for_uid(notification_type_e type, * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/notification + * @remarks The @a list should be released using notification_free_list(). * @param[in] app_id The caller application ID * @param[in] group_id The group ID * @param[in] priv_id The private ID @@ -121,8 +124,8 @@ int notification_get_list_by_page_for_uid(notification_type_e type, * @return #NOTIFICATION_ERROR_NONE if success, * other value if failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @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_list_h * @par Sample code: * @code @@ -136,6 +139,8 @@ int notification_get_list_by_page_for_uid(notification_type_e type, if (noti_err != NOTIFICATION_ERROR_NONE) { return; } + + notification_free_list(noti_list); } * @endcode */ @@ -162,8 +167,8 @@ int notification_get_detail_list_for_uid(const char *app_id, * @return #NOTIFICATION_ERROR_NONE on success, * otherwise any other value on failure * @retval #NOTIFICATION_ERROR_NONE Success + * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED Permission denied * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter - * @retval NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method * @pre notification_get_grouping_list() or notification_get_detail_list(). * @see #notification_list_h * @par Sample code: @@ -191,10 +196,9 @@ int notification_free_list(notification_list_h list); * @brief Gets the head pointer of the notification list. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free_list(). * @param[in] list Notification list handle - * @return Notification list handle on success, NULL on failure - * @retval #notification_list_h Success - * @retval NULL Failure + * @return #notification_list_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -212,6 +216,8 @@ int notification_free_list(notification_list_h list); } noti_list = notification_list_get_head(noti_list); + + notification_free_list(noti_list); } * @endcode */ @@ -222,10 +228,9 @@ notification_list_h notification_list_get_head(notification_list_h list); * @brief Gets the tail pointer to the notification list. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free_list(). * @param[in] list Notification list handle - * @return Notification list handle on success, NULL on failure - * @retval #notification_list_h Success - * @retval NULL Failure + * @return #notification_list_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -243,6 +248,8 @@ notification_list_h notification_list_get_head(notification_list_h list); } noti_list = notification_list_get_tail(noti_list); + + notification_free_list(noti_list); } * @endcode */ @@ -253,10 +260,9 @@ notification_list_h notification_list_get_tail(notification_list_h list); * @brief Gets the previous pointer of the current notification list. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free_list(). * @param[in] list Notification list handle - * @return Notification list handle on success, NULL on failure - * @retval #notification_list_h Success - * @retval NULL Failure + * @return #notification_list_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -274,6 +280,8 @@ notification_list_h notification_list_get_tail(notification_list_h list); } noti_list = notification_list_get_prev(noti_list); + + notification_free_list(noti_list); } * @endcode */ @@ -284,10 +292,9 @@ notification_list_h notification_list_get_prev(notification_list_h list); * @brief Gets the next pointer of the current notification list. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free_list(). * @param[in] list Notification list handle - * @return Notification list handle on success, NULL on failure - * @retval #notification_list_h Success - * @retval NULL Failure + * @return #notification_list_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -297,7 +304,7 @@ notification_list_h notification_list_get_prev(notification_list_h list); ... { notification_list_h noti_list = NULL; - int noti_err = NOTIFICATION_ERROR_NONE; + int noti_err; noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list); if (noti_err != NOTIFICATION_ERROR_NONE) { @@ -305,6 +312,8 @@ notification_list_h notification_list_get_prev(notification_list_h list); } noti_list = notification_list_get_next(noti_list); + + notification_free_list(noti_list); } * @endcode */ @@ -315,10 +324,9 @@ notification_list_h notification_list_get_next(notification_list_h list); * @brief Gets the notification handle that the list has. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. + * The returned value should be released using notification_free(). * @param[in] list Notification list handle - * @return Notification handle on success, NULL on failure - * @retval #notification_h Success - * @retval NULL Failure + * @return #notification_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -338,6 +346,8 @@ notification_list_h notification_list_get_next(notification_list_h list); } noti = notification_list_get_data(noti_list); + + notification_free(noti); } * @endcode */ @@ -381,9 +391,7 @@ int notification_list_get_count(notification_list_h list); * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] list Notification list handle * @param[in] noti Notification handle - * @return Notification handle on success, NULL on failure - * @retval #notification_h Success - * @retval NULL Failure + * @return #notification_h on success, NULL on failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @exception #NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory @@ -417,10 +425,8 @@ notification_list_h notification_list_append(notification_list_h list, * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. * @param[in] list The notification list handle * @param[in] noti The notification handle - * @return Notification handle on success, + * @return #notification_h on success, * otherwise @c NULL on failure - * @retval #notification_h Success - * @retval NULL Failure * @exception #NOTIFICATION_ERROR_NONE Success * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value * @see #notification_list_h @@ -437,11 +443,12 @@ notification_list_h notification_list_append(notification_list_h list, ... noti_list = notification_list_remove(noti_list, noti); + } * @endcode */ notification_list_h notification_list_remove(notification_list_h list, - notification_h noti); + notification_h noti); /** * @} diff --git a/notification/include/notification_type.h b/notification/include/notification_type.h index bb0d580..61010cf 100644 --- a/notification/include/notification_type.h +++ b/notification/include/notification_type.h @@ -56,7 +56,7 @@ typedef enum _notification_ly_type { NOTIFICATION_LY_NOTI_EVENT_MULTIPLE, /**< Layout for notification. Used to inform multiple event */ NOTIFICATION_LY_NOTI_THUMBNAIL, /**< Layout for notification. Used to display images */ NOTIFICATION_LY_ONGOING_EVENT, /**< Layout for ongoing notification. Used to display text message. - * notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from + * notifications with #NOTIFICATION_LY_ONGOING_EVENT can not be protected from * removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ NOTIFICATION_LY_ONGOING_PROGRESS, /**< Layout for ongoing notification. Used to display progress */ NOTIFICATION_LY_EXTENSION, /**< Layout for extended notification (Since 4.0) */ @@ -203,7 +203,7 @@ typedef enum _notification_image_type { NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK, /**< Lock screen icon */ NOTIFICATION_IMAGE_TYPE_THUMBNAIL, /**< Thumbnail */ NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK, /**< Lock screen thumbnail */ - NOTIFICATION_IMAGE_TYPE_ICON_SUB, /**< Icon */ + NOTIFICATION_IMAGE_TYPE_ICON_SUB, /**< Sub icon */ NOTIFICATION_IMAGE_TYPE_BACKGROUND, /**< image displayed on background */ NOTIFICATION_IMAGE_TYPE_LIST_1, /**< Image for thumbnail list */ NOTIFICATION_IMAGE_TYPE_LIST_2, /**< Image for thumbnail list */ -- 2.7.4