#ifdef __cplusplus
}
#endif
-#endif // __TIZEN_APPFW_NOTIFICATION_EX_H__
\ No newline at end of file
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_H__ */
NOTI_EX_EVENT_DELETE, /**< Delete the notification */
NOTI_EX_EVENT_GET, /**< Get the notification */
NOTI_EX_EVENT_ERROR, /**< Error occurs */
- NOTI_EX_EVENT_DELETE_ALL, /**< Delete all notification */
+ NOTI_EX_EVENT_DELETE_ALL, /**< Delete all notifications */
} noti_ex_event_info_type_e;
/**
/**
* @brief Gets the background image path from style.
* @since_tizen 5.5
+ * @remarks The @a image_path should be released using free().
* @param[in] handle The notification_ex style handle
- * @param[out] background_image The background image path
+ * @param[out] image_path The background image path
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
{
int ret;
- char *background_image;
+ char *image_path;
- ret = noti_ex_style_get_background_image(style, &background_image);
+ ret = noti_ex_style_get_background_image(style, &image_path);
}
* @endcode
*/
int noti_ex_style_get_background_image(noti_ex_style_h handle,
- char **background_image);
+ char **image_path);
/**
* @brief Sets the background image path of a style.
* @since_tizen 5.5
* @param[in] handle The notification_ex style handle
- * @param[in] background_image The background image path
+ * @param[in] image_path The background image path
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
{
int ret;
- noti_ex_geometry_h geometry = NULL;
+ char *image_path[BUFLEN];
- ret = noti_ex_style_get_geometry(style, &geometry);
+ char *shared_path = app_get_shared_resource_path();
+ snprintf(image_path, BUFLEN, "%simage.png", shared_path);
+ free(shared_path);
+
+ ret = noti_ex_style_set_background_image(style, image_path);
}
* @endcode
*/
int noti_ex_style_set_background_image(noti_ex_style_h handle,
- char *background_image);
+ char *image_path);
/**
- * @brief Gets the background color from style.
+ * @brief Gets the background color of a style.
* @since_tizen 5.5
* @remarks @a color must be released using noti_ex_color_destroy().
* @param[in] handle The notification_ex style handle
ret = noti_ex_color_create(&color, 0, 0, 0, 0);
ret = noti_ex_style_set_background_color(style, color);
+ ret = noti_ex_color_destroy(color);
}
* @endcode
*/
int noti_ex_item_set_tag(noti_ex_item_h handle, const char *tag);
/**
- * @brief Gets a value indicating whether a notification is currently ongoing.
+ * @brief Gets the value indicating whether a notification is currently ongoing.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] ongoing The state of ongoing
int noti_ex_item_get_ongoing_state(noti_ex_item_h handle, bool *ongoing);
/**
- * @brief Sets a value indicating whether a notification is currently ongoing.
+ * @brief Sets the value indicating whether a notification is currently ongoing.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] ongoing The state of ongoing
int noti_ex_item_set_ongoing_state(noti_ex_item_h handle, bool ongoing);
/**
- * @brief Checks if a specified type is included in a notification_ex item.
+ * @brief Checks if an item of a specified type is included in a notification_ex item.
* @since_tizen 5.5
- * @remarks @a tag must be released using free().
* @param[in] handle The notification_ex item handle
* @param[in] type The type of a notification_ex item
* @param[out] exist The state of if a type is included
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
+ * @see #noti_ex_item_type_e
* @par Sample code:
* @code
#include <notification_ex.h>
int noti_ex_item_check_type_exist(noti_ex_item_h handle, int type, bool *exist);
/**
- * @brief Gets the main type of notification item.
+ * @brief Gets the main type of a notification item.
+ * @details The type is equal to one of the values of #noti_ex_item_main_type_e.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] type The main type
/**
* @brief Sets the main type of a notification item.
- * @details Use this api to configure main type among multiple items.
- * In other words, if there is only one item, it should not be used.
+ * @details Use this function to configure main type among multiple items.
+ * In other words, if there is only one item, it should not be used.
+ * The type is equal to one of the values of #noti_ex_item_main_type_e.
* @since_tizen 5.5
- * @remarks When set to a specific type, values previously set to the same type are deleted.
+ * @remarks When set to a specific type, the previous main item of the same type is canceled.
* @param[in] handle The notification_ex item handle
- * @param[in] id The id of notification_ex item
+ * @param[in] id The ID of notification_ex item
* @param[in] type The main type
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
* @brief Finds the notification item of the specified main type.
* @details Finds the item that matches the main type among the group items.
* @since_tizen 5.5
+ * @remarks @a handle must be released using noti_ex_item_destroy().
* @param[in] handle The notification_ex item handle
* @param[in] type The main type
* @param[out] item The notification_ex item handle
int type = NOTI_EX_ITEM_MAIN_TYPE_TITLE;
int ret;
- ret = noti_ex_item_get_main_type(item_handle, type, &text_item);
+ ret = noti_ex_item_find_by_main_type(item_handle, type, &text_item);
if (text_item != NULL) {
// Do something
* @param[in] user_data The user data for @a event_callbacks
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY Out of memory
* @see #noti_ex_manager_h
* @see #noti_ex_manager_events_s
* @param[out] count The count of retrieved notification items
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_item_h
* @see #noti_ex_manager_h
for (int i = 0; i < items_count; i++) {
item = items[i];
// do something with item
+ noti_ex_item_destroy(item);
}
+
+ free(items);
}
* @endcode
*/
int *count);
/**
- * @brief Gets notifications with channel for the notification_ex manager.
+ * @brief Gets notifications with @a channel for the notification_ex manager.
* @details Every notification that has been sent for the manager will be retrieved.
* @since_tizen 5.5
* @privlevel public
* @param[out] count The count of retrieved notification items
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_item_h
* @see #noti_ex_manager_h
for (int i = 0; i < items_count; i++) {
item = items[i];
// do something with item
+ noti_ex_item_destroy(item);
}
+
+ free(items);
}
* @endcode
*/
int noti_ex_manager_get_by_channel(noti_ex_manager_h handle, char *channel,
noti_ex_item_h **items, int *count);
-int noti_ex_manager_get_by_channel(noti_ex_manager_h handle, char *channel,
- noti_ex_item_h **items, int *count);
-
/**
* @brief Updates notification.
* @since_tizen 5.5
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_item_h
* @see #noti_ex_manager_h
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_manager_h
* @see #noti_ex_error_e
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_manager_h
* @see #noti_ex_error_e
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_item_h
* @see #noti_ex_manager_h
* The @a item must be released using noti_ex_item_destroy().
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_manager_h
* @see #noti_ex_item_h
* @param[in] error The error type
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_event_info_h
* @see #noti_ex_manager_h
* @param[out] cnt The count of notifications
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_manager_h
* @see #NOTI_EX_RECEIVER_GROUP_TICKER
*/
int noti_ex_item_progress_get_max(noti_ex_item_h handle, float *max);
-int noti_ex_item_progress_get_type(noti_ex_item_h handle, int *type);
-
-int noti_ex_item_progress_set_type(noti_ex_item_h handle, int type);
-
/**
* @brief Gets the type of progress.
+ * The type is equal to one of the values of #noti_ex_item_progress_type_e.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] type The type of progress
/**
* @brief Sets the type of progress.
+ * @details The type is equal to one of the values of #noti_ex_item_progress_type_e.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] type The type of progress
* @param[in] user_data The user data for @a event_callbacks
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY Out of memory
* @see #noti_ex_item_h
* @see #noti_ex_reporter_events_s
* @param[in] error The error type
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_event_info_h
* @see #noti_ex_manager_events_s
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @par Sample code:
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @par Sample code:
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @par Sample code:
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @par Sample code:
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @par Sample code:
* The @a item must be released using noti_ex_item_destroy().
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
- * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_PERMISSION_DENIED Permission deny
+ * @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see noti_ex_reporter_create()
* @see noti_ex_item_destroy()