* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_APP_CONTROL_ACTION_H_
-#define CAPI_NOTIFICATION_EX_APP_CONTROL_ACTION_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_APP_CONTROL_ACTION_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_APP_CONTROL_ACTION_H__
#include <app_control.h>
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex action handle with app control handle.
* @details The notification_ex can define the action with noti_ex_action_h.
- * If it is necessary to use app control handle for action,
- * app control handle must be set in notification_ex action handle.
+ * If it is necessary to use app control handle for an action,
+ * the app control handle must be set in notification_ex action handle.
+ * @a extra can be used to pass user defined data
+ * and the extra data can be obtained from an action handle using #noti_ex_action_get_extra().
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_action_destroy().
+ * @a app_control must be released after noti_ex_action_app_control_create() function is called.
* @param[out] handle The notification_ex action handle
* @param[in] app_control The app control handle
* @param[in] extra The extra data
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_action_h
- * @see #noti_ex_action_destroy
+ * @see #noti_ex_action_destroy()
+ * @see #noti_ex_action_get_extra()
* @par Sample code:
* @code
#include <notification_ex_app_control_action.h>
app_control_set_app_id(app_control, "temp_appid");
ret = noti_ex_action_app_control_create(&appcontrol_action, app_control, NULL);
+
+ app_control_destroy(app_control);
}
* @endcode
*/
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_action_h
- * @see #noti_ex_action_app_control_create
+ * @see #noti_ex_action_app_control_create()
* @par Sample code:
* @code
#include <notification_ex_app_control_action.h>
/**
* @brief Gets the app control handle from notification_ex action.
* @since_tizen 5.5
+ * @remarks The @a app_control should be released using app_control_destroy().
* @param[in] handle The notification_ex action handle
* @param[out] app_control The app control handle
* @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
* @see #noti_ex_action_h
- * @see #noti_ex_action_app_control_create
+ * @see #noti_ex_action_app_control_create()
* @par Sample code:
* @code
#include <notification_ex_app_control_action.h>
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_APP_CONTROL_ACTION_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_APP_CONTROL_ACTION_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_BUTTON_H_
-#define CAPI_NOTIFICATION_EX_BUTTON_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_BUTTON_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_BUTTON_H__
#include <notification_ex_item.h>
#endif
/**
- * @brief Creates the notification_ex item handle with button.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with button,
- * notification_ex handle have to be made as button item.
+ * @brief Creates the notification_ex item handle with a button.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to display the notification with a button,
+ * the notification_ex handle has to be created as a button item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_button.h>
int noti_ex_item_button_create(noti_ex_item_h *handle, const char *id, const char *title);
/**
- * @brief Gets the title of button item.
+ * @brief Gets the title of a button item.
* @since_tizen 5.5
* @remarks @a title must be released using free().
* @param[in] handle The notification_ex item handle
* @param[out] title The title of notification_ex item
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_button_create
+ * @see #noti_ex_item_button_create()
* @par Sample code:
* @code
#include <notification_ex_button.h>
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_BUTTON_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_BUTTON_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_CHAT_MESSAGE_H_
-#define CAPI_NOTIFICATION_EX_CHAT_MESSAGE_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_CHAT_MESSAGE_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_CHAT_MESSAGE_H__
#include <notification_ex_item.h>
} noti_ex_item_chat_message_type_e;
/**
- * @brief Creates the notification_ex item handle for chat message.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to make chat message notification,
- * notification_ex handle have to be made as chat message item.
+ * @brief Creates the notification_ex item handle for the chat message.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to create a chat message notification,
+ * notification_ex handle has to be created as a chat message item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
- * @a name, @a text, @a image and @a time must not be released if it returns #NOTI_EX_ERROR_NONE.
+ * @a name, @a text, @a image and @a time must not be released if the function returns #NOTI_EX_ERROR_NONE.
+ * @a name, @a text, @a image and @a time will be released when @a handle is released.
* @param[out] handle The noti ex item handle
* @param[in] id The id of notification_ex item
* @param[in] name The notification_ex item handle for name
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_item_h
* @see #noti_ex_item_chat_message_type_e
- * @see #noti_ex_item_text_create
- * @see #noti_ex_item_image_create
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_text_create()
+ * @see #noti_ex_item_image_create()
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_chat_message.h>
{
int ret;
noti_ex_item_h chatmessage_item = NULL;
- noti_ex_item_h name = NULL;
- noti_ex_item_h text = NULL;
- noti_ex_item_h image = NULL;
- noti_ex_item_h time = NULL;
+ noti_ex_item_h name_handle = NULL;
+ noti_ex_item_h text_handle = NULL;
+ noti_ex_item_h image_handle = NULL;
+ noti_ex_item_h time_handle = NULL;
time_t current_time;
- noti_ex_item_text_create(&name, "name_id", "name", NULL);
- noti_ex_item_text_create(&text, "text_id", "text", NULL);
- noti_ex_item_image_create(&image, "image_id", "image_path");
+ noti_ex_item_text_create(&name_handle, "name_id", "name", NULL);
+ noti_ex_item_text_create(&text_handle, "text_id", "text", NULL);
+ noti_ex_item_image_create(&image_handle, "image_id", APP_IMAGE_FULL_PATH);
time(¤t_time);
- noti_ex_item_time_create(&time, "time_id", current_time);
+ noti_ex_item_time_create(&time_handle, "time_id", current_time);
- ret = noti_ex_item_chat_message_create(&chatmessage_item, "message_id", name,
- text, image, time, NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_USER);
+ ret = noti_ex_item_chat_message_create(&chatmessage_item, "message_id", name_handle,
+ text_handle, image_handle, time_handle, NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_USER);
}
* @endcode
*/
noti_ex_item_h time, noti_ex_item_chat_message_type_e message_type);
/**
- * @brief Gets the notification_ex item handle for name of chat message.
- * @details The name of chat message is notification_ex item handle with text that is name.
+ * @brief Gets the notification_ex item handle for the chat message name.
+ * @details The name is a notification_ex item handle created with noti_ex_item_text_create().
* @since_tizen 5.5
* @remarks @a name should not be released.
+ * @remarks The @a name is available until @a handle is released.
* @param[in] handle The notification_ex item handle
* @param[out] name The notification_ex item handle with name
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_chat_message_create
+ * @see #noti_ex_item_chat_message_create()
+ * @see #noti_ex_item_text_get_contents()
* @par Sample code:
* @code
#include <notification_ex_chat_message.h>
{
int ret;
- noti_ex_item_h name = NULL;
+ noti_ex_item_h name_handle = NULL;
+ char *name = NULL;
- ret = noti_ex_item_chat_message_get_name(chatmessage_item, &name);
+ ret = noti_ex_item_chat_message_get_name(chatmessage_item, &name_handle);
+ ret = noti_ex_item_text_get_contents(name_handle, &name);
}
* @endcode
*/
int noti_ex_item_chat_message_get_name(noti_ex_item_h handle, noti_ex_item_h *name);
/**
- * @brief Gets the notification_ex item handle for text of chat message.
- * @details The text of chat message is notification_ex item handle with text.
+ * @brief Gets the notification_ex item handle for the chat message text.
+ * @details The text is a notification_ex item handle created with noti_ex_item_text_create().
* @since_tizen 5.5
* @remarks @a text should not be released.
+ * @remarks The @a text is available until @a handle is released.
* @param[in] handle The notification_ex item handle
* @param[out] text The notification_ex item handle with text
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_chat_message_create
+ * @see #noti_ex_item_chat_message_create()
+ * @see #noti_ex_item_text_get_contents()
* @par Sample code:
* @code
#include <notification_ex_chat_message.h>
{
int ret;
- noti_ex_item_h text = NULL;
+ noti_ex_item_h text_handle = NULL;
+ char *text = NULL;
- ret = noti_ex_item_chat_message_get_text(chatmessage_item, &text);
+ ret = noti_ex_item_chat_message_get_text(chatmessage_item, &text_handle);
+ ret = noti_ex_item_text_get_contents(text_handle, &text);
}
* @endcode
*/
int noti_ex_item_chat_message_get_text(noti_ex_item_h handle, noti_ex_item_h *text);
/**
- * @brief Gets the notification_ex item handle for image of chat message.
- * @details The image of chat message is notification_ex item handle with image.
+ * @brief Gets the notification_ex item handle for the chat message image.
+ * @details The image is a notification_ex item handle created with noti_ex_item_image_create().
* @since_tizen 5.5
* @remarks @a image should not be released.
+ * @remarks The @a image is available until @a handle is released.
* @param[in] handle The notification_ex item handle
* @param[out] image The notification_ex item handle with image
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_chat_message_create
+ * @see #noti_ex_item_chat_message_create()
+ * @see #noti_ex_item_image_get_image_path()
* @par Sample code:
* @code
#include <notification_ex_chat_message.h>
{
int ret;
- noti_ex_item_h image = NULL;
+ noti_ex_item_h image_handle = NULL;
+ char *image_path = NULL;
- ret = noti_ex_item_chat_message_get_image(chatmessage_item, &image);
+ ret = noti_ex_item_chat_message_get_image(chatmessage_item, &image_handle);
+ ret = noti_ex_item_image_get_image_path(image_handle, &image_path);
}
* @endcode
*/
int noti_ex_item_chat_message_get_image(noti_ex_item_h handle, noti_ex_item_h *image);
/**
- * @brief Gets the notification_ex item handle for time of chat message.
- * @details The time of chat message is notification_ex item handle with time.
+ * @brief Gets the notification_ex item handle for the chat message time.
+ * @details The time is notification_ex item handle created with noti_ex_item_time_create().
* @since_tizen 5.5
* @remarks @a time should not be released.
+ * @remarks The @a time is available until @a handle is released.
* @param[in] handle The notification_ex item handle
* @param[out] time The notification_ex item handle with time
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_chat_message_create
+ * @see #noti_ex_item_chat_message_create()
+ * @see #noti_ex_item_time_get_time()
* @par Sample code:
* @code
#include <notification_ex_chat_message.h>
{
int ret;
- noti_ex_item_h time = NULL;
+ noti_ex_item_h time_handle = NULL;
+ time_t time_info;
- ret = noti_ex_item_chat_message_get_time(chatmessage_item, &time);
+ ret = noti_ex_item_chat_message_get_time(chatmessage_item, &time_handle);
+ ret = noti_ex_item_time_get_time(time_handle, &time_info);
}
* @endcode
*/
* @param[out] message_type The type of chat message
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_chat_message_create
+ * @see #noti_ex_item_chat_message_create()
* @see #noti_ex_item_chat_message_type_e
* @par Sample code:
* @code
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_CHAT_MESSAGE_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_CHAT_MESSAGE_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_CHECKBOX_H_
-#define CAPI_NOTIFICATION_EX_CHECKBOX_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_CHECKBOX_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_CHECKBOX_H__
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex item handle with checkbox.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with checkbox,
- * notification_ex handle have to be made as checkbox item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to display the notification with a checkbox,
+ * the notification_ex handle has to be created as a checkbox item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_checkbox.h>
int noti_ex_item_checkbox_create(noti_ex_item_h *handle, const char *id, const char *title, bool checked);
/**
- * @brief Gets the title of checkbox item.
+ * @brief Gets the title of a checkbox.
* @since_tizen 5.5
* @remarks @a title must be released using free().
* @param[in] handle The notification_ex item handle
* @param[out] title The title of notification_ex item
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_checkbox_create
+ * @see #noti_ex_item_checkbox_create()
* @par Sample code:
* @code
#include <notification_ex_checkbox.h>
int noti_ex_item_checkbox_get_title(noti_ex_item_h handle, char **title);
/**
- * @brief Gets the check state of checkbox.
+ * @brief Gets the check state of a checkbox.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[out] checked The check state of checkbox
+ * @param[out] checked The check state of a checkbox
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_checkbox_create
+ * @see #noti_ex_item_checkbox_create()
* @par Sample code:
* @code
#include <notification_ex_checkbox.h>
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_CHECKBOX_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_CHECKBOX_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_ENTRY_H_
-#define CAPI_NOTIFICATION_EX_ENTRY_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_ENTRY_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_ENTRY_H__
#include <notification_ex_item.h>
#endif
/**
- * @brief Creates the notification_ex item handle for entry item.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to get text input directly from the notification,
- * notification_ex handle have to be made as entry item.
+ * @brief Creates the notification_ex item handle for an entry item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to get the text input directly from the notification,
+ * the notification_ex handle has to be created as an entry item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_entry.h>
int noti_ex_item_entry_create(noti_ex_item_h *handle, const char *id);
/**
- * @brief Gets the text of entry item.
+ * @brief Gets the text of an entry item.
* @since_tizen 5.5
* @remarks @a text must be released using free().
* @param[in] handle The notification_ex item handle
* @param[out] text The text of entry item
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_entry_create
+ * @see #noti_ex_item_entry_create()
* @par Sample code:
* @code
#include <notification_ex_entry.h>
int noti_ex_item_entry_get_text(noti_ex_item_h handle, char **text);
/**
- * @brief Sets the text of entry item.
+ * @brief Sets the text of an entry item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] text The text of entry item
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
- * @see #noti_ex_item_entry_create
+ * @see #noti_ex_item_entry_create()
* @par Sample code:
* @code
#include <notification_ex_entry.h>
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_ENTRY_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_ENTRY_H__ */
*/
-#ifndef __NOTIFICATION_EX_ERROR_H__
-#define __NOTIFICATION_EX_ERROR_H__
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_ERROR_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_ERROR_H__
#include <tizen.h>
NOTI_EX_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
NOTI_EX_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
NOTI_EX_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- NOTI_EX_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
+ NOTI_EX_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
NOTI_EX_ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
- NOTI_EX_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
+ NOTI_EX_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Private ID already exists */
NOTI_EX_ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
- NOTI_EX_ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Not exist private ID */
+ NOTI_EX_ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Private ID does not exist */
NOTI_EX_ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
- NOTI_EX_ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded (@b Since: 3.0) */
+ NOTI_EX_ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded */
} noti_ex_error_e;
*/
-#endif /* __NOTIFICATION_EX_ERROR_H__ */
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_ERROR_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_EVENT_INFO_H_
-#define CAPI_NOTIFICATION_EX_EVENT_INFO_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_EVENT_INFO_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_EVENT_INFO_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
- * @brief Enumeration for the type of notifrication_ex event.
+ * @brief Enumeration for the type of notification_ex event.
* @since_tizen 5.5
*/
typedef enum _noti_ex_event_info_type {
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_destroy
+ * @see #noti_ex_event_info_destroy()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
void _manager_events_update_cb(noti_ex_manager_h handle,
- noti_ex_event_info_h info, noti_ex_item_h updated_item, void *data) {
+ noti_ex_event_info_h info, noti_ex_item_h updated_item, void *user_data) {
int ret;
noti_ex_event_info_h cloned = NULL;
#include <notification_ex_event_info.h>
void _manager_events_update_cb(noti_ex_manager_h handle,
- noti_ex_event_info_h info, noti_ex_item_h updated_item, void *data) {
+ noti_ex_event_info_h info, noti_ex_item_h updated_item, void *user_data) {
int ret;
noti_ex_event_info_h cloned = NULL;
int noti_ex_event_info_destroy(noti_ex_event_info_h handle);
/**
- * @brief Gets the type of event.
+ * @brief Gets the type of an event.
* @since_tizen 5.5
* @param[in] handle The notification_ex event info handle
* @param[out] event_type The type of event
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_create
+ * @see #noti_ex_event_info_create()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
int noti_ex_event_info_get_event_type(noti_ex_event_info_h handle, noti_ex_event_info_type_e *event_type);
/**
- * @brief Gets the owner of event.
+ * @brief Gets the app id of event owner
* @since_tizen 5.5
* @remarks @a owner must be released using free().
* @param[in] handle The notification_ex event info handle
- * @param[out] owner The owner of event
+ * @param[out] owner The app id of event owner
* @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
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_create
+ * @see #noti_ex_event_info_create()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
int noti_ex_event_info_get_owner(noti_ex_event_info_h handle, char **owner);
/**
- * @brief Gets the channel of event.
+ * @brief Gets the channel of an event.
* @since_tizen 5.5
* @remarks @a channel must be released using free().
* @param[in] handle The notification_ex event info handle
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_create
+ * @see #noti_ex_event_info_create()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
int noti_ex_event_info_get_channel(noti_ex_event_info_h handle, char **channel);
/**
- * @brief Gets the id of notification_ex item.
+ * @brief Gets the id of a notification_ex item.
* @since_tizen 5.5
* @remarks @a item_id must be released using free().
* @param[in] handle The notification_ex event info handle
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_create
+ * @see #noti_ex_event_info_create()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
int noti_ex_event_info_get_item_id(noti_ex_event_info_h handle, char **item_id);
/**
- * @brief Gets the id of reqest for event
+ * @brief Gets the id of reqest for an event.
* @since_tizen 5.5
* @param[in] handle The notification_ex event info handle
* @param[out] req_id The id of reqeust for event
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_event_info_h
- * @see #noti_ex_event_info_create
+ * @see #noti_ex_event_info_create()
* @par Sample code:
* @code
#include <notification_ex_event_info.h>
{
int ret;
- int reqeust_id;
+ int request_id;
- ret = noti_ex_event_info_get_request_id(event_handle, &reqeust_id);
+ ret = noti_ex_event_info_get_request_id(event_handle, &request_id);
}
* @endcode
*/
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_EVENT_INFO_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_EVENT_INFO_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_GROUP_H_
-#define CAPI_NOTIFICATION_EX_GROUP_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_GROUP_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_GROUP_H__
#include <notification_ex_item.h>
/**
* @brief Creates the group of notification_ex items.
- * @details The notification_ex is made with notification_ex items.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
* If the user wants to make the group of notification_ex items,
- * notification_ex handle have to be made as group item.
+ * the notification_ex handle has to be created as a group item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_group.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_create
+ * @see #noti_ex_item_group_create()
+ * @see #noti_ex_item_group_is_vertical().
* @par Sample code:
* @code
#include <notification_ex_group.h>
* @param[out] vertical The vertical state of group item
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_create
+ * @see #noti_ex_item_group_create()
+ * @see #noti_ex_item_group_set_direction()
* @par Sample code:
* @code
#include <notification_ex_group.h>
* @param[out] label The label of application
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_create
+ * @see #noti_ex_item_group_create()
* @par Sample code:
* @code
#include <notification_ex_group.h>
int noti_ex_item_group_get_app_label(noti_ex_item_h handle, char **label);
/**
- * @brief Add the child to the group item.
+ * @brief Adds the child to the group item.
* @since_tizen 5.5
* @remarks @a child must not be released after calling this function
* @param[in] handle The notification_ex item handle
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_create
+ * @see #noti_ex_item_group_create()
* @par Sample code:
* @code
#include <notification_ex_group.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_create
+ * @see #noti_ex_item_group_create()
* @par Sample code:
* @code
#include <notification_ex_group.h>
* @brief Called to get the data of child item for each child of the group item.
* @since_tizen 5.5
* @remarks @a handle must not be released
+ * @remarks @a handle can be used only in the callback.
+ * @a handle will be freed after the callback exists.
* @param[in] handle The notification_ex item handle
- * @param[in] data The data of child passed from foreach function
+ * @param[in] user_data The user data
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_foreach
+ * @see #noti_ex_item_group_foreach()
*/
-typedef int (*noti_ex_item_group_foreach_cb)(noti_ex_item_h handle, void *data);
+typedef int (*noti_ex_item_group_foreach_child_cb)(noti_ex_item_h handle, void *user_data);
/**
* @brief Gets the data of children from the group item.
- * @details The noti_ex_item_group_foreach_cb is called each child of group item.
+ * @details The noti_ex_item_group_foreach_cb() is called for each child of the group item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] callback The callback function to get the children data
- * @param[in] data The data to be passed to the callback function
+ * @param[in] user_data The user data to be passed to the callback function
* @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
* @see #noti_ex_item_h
- * @see #noti_ex_item_group_foreach_cb
+ * @see #noti_ex_item_group_foreach_cb()
* @par Sample code:
* @code
#include <notification_ex_group.h>
-int _ex_item_group_foreach_cb(noti_ex_item_h handle, void *data) {
+int _ex_item_group_foreach_child_cb(noti_ex_item_h handle, void *user_data) {
return 0;
}
ret = noti_ex_item_button_create(&child_item, "button_id", "button_title");
ret = noti_ex_item_group_add_child(group_item, child_item);
- ret = noti_ex_item_group_foreach(_ex_item_group_foreach_cb, NULL);
+ ret = noti_ex_item_group_foreach(group_item, _ex_item_group_foreach_child_cb, NULL);
}
* @endcode
*/
-int noti_ex_item_group_foreach(noti_ex_item_h handle,
- noti_ex_item_group_foreach_cb callback, void *data);
+int noti_ex_item_group_foreach_child(noti_ex_item_h handle,
+ noti_ex_item_group_foreach_child_cb callback, void *user_data);
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_GROUP_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_GROUP_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_IMAGE_H_
-#define CAPI_NOTIFICATION_EX_IMAGE_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_IMAGE_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_IMAGE_H__
#include <notification_ex_item.h>
#endif
/**
- * @brief Creates the notification_ex item handle with image.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with image,
- * notification_ex handle have to be made as image item.
+ * @brief Creates the notification_ex item handle with an image.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to display the notification with an image,
+ * the notification_ex handle has to be created as an image item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @param[in] id The id of notification_ex item
- * @param[in] image_path The path of image
+ * @param[in] image_path The absolute path of image
* @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_OUT_OF_MEMORY out of memory
* @see #noti_ex_item_h
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_image.h>
{
int ret;
noti_ex_item_h image_item = NULL;
+ char *image_path[BUFLEN];
- ret = noti_ex_item_image_create(&image_item, "image_id", "image_path");
+ char *shared_path = app_get_shared_resource_path();
+ snprintf(image_path, BUFLEN, "%simage.png", shared_path);
+ free(shared_path);
+
+ ret = noti_ex_item_image_create(&image_item, "image_id", image_path);
}
* @endcode
*/
* @since_tizen 5.5
* @remarks @a image_path must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] image_path The path of image
+ * @param[out] image_path The absolute path of image
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_image_create
+ * @see #noti_ex_item_image_create()
* @par Sample code:
* @code
#include <notification_ex_image.h>
int ret;
char *path = NULL;
- ret = noti_ex_item_image_get_image_path(button_item, &path);
+ ret = noti_ex_item_image_get_image_path(image_item, &path);
}
* @endcode
*/
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_IMAGE_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_IMAGE_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_INPUT_SELECTOR_H_
-#define CAPI_NOTIFICATION_EX_INPUT_SELECTOR_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_INPUT_SELECTOR_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_INPUT_SELECTOR_H__
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex item handle with input selector.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with selector to select predefined input,
- * notification_ex handle have to be made as input selector item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to be display the notification with selector to select predefined input,
+ * the notification_ex handle has to be created as an input selector item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_input_selector.h>
/**
* @brief Gets the contents that can be selected by input selector.
* @since_tizen 5.5
- * @remarks @a list must be released after releasing all contents using free().
+ * @remarks Each item in the @a list must be released using free(), then the @a list must be released using free().
* @param[in] handle The notification_ex item handle
* @param[out] list The list of contents
* @param[out] count The count of contents
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_input_selector_create
+ * @see #noti_ex_item_input_selector_create()
+ * @see #noti_ex_item_input_selector_set_contents()
* @par Sample code:
* @code
#include <notification_ex_input_selector.h>
{
int ret;
- char **list = NULL;
- int count = 0;
+ char **list = NULL;
+ int count = 0;
- ret = noti_ex_item_input_selector_get_contents(&selector_item, &list, &count);
+ ret = noti_ex_item_input_selector_get_contents(selector_item, &list, &count);
}
* @endcode
*/
* @brief Sets the contents for input selector item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[out] contents The list of contents
- * @param[out] count The count of contents
+ * @param[in] contents The list of contents
+ * @param[in] count The count of contents
* @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
* @see #noti_ex_item_h
- * @see #noti_ex_item_input_selector_create
+ * @see #noti_ex_item_input_selector_create()
* @par Sample code:
* @code
#include <notification_ex_input_selector.h>
{
int ret;
+ const char *contents[] = {"content_1", "content_2", "content_3"};
+ int count = 3;
- ret = noti_ex_item_input_selector_set_contents(&selector_item, list, count);
+ ret = noti_ex_item_input_selector_set_contents(selector_item, contents, count);
}
* @endcode
*/
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_INPUT_SELECTOR_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_INPUT_SELECTOR_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_ITEM_H_
-#define CAPI_NOTIFICATION_EX_ITEM_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_ITEM_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_ITEM_H__
#include <bundle.h>
+#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
-#define RECEIVERGROUP_PANEL "tizen.org/receiver/panel" /**< Panel */
-#define RECEIVERGROUP_TICKER "tizen.org/receiver/ticker" /**< Ticker */
-#define RECEIVERGROUP_LOCKSCREEN "tizen.org/receiver/lockscreen" /**< Lockscreen */
-#define RECEIVERGROUP_INDICATOR "tizen.org/receiver/indicator" /**< Indicator */
-#define RECEIVERGROUP_POPUP "tizen.org/receiver/popup" /**< Popup */
+/**
+ * @brief Predefined receiver group for the Ticker.
+ * @since_tizen 5.5
+ */
+#define NOTI_EX_RECEIVER_GROUP_TICKER "tizen.org/receiver/ticker"
+
+/**
+ * @brief Predefined receiver group for the Lockscreen.
+ * @since_tizen 5.5
+ */
+#define NOTI_EX_RECEIVER_GROUP_LOCKSCREEN "tizen.org/receiver/lockscreen"
+
+/**
+ * @brief Predefined receiver group for the Indicator.
+ * @since_tizen 5.5
+ */
+#define NOTI_EX_RECEIVER_GROUP_INDICATOR "tizen.org/receiver/indicator"
+
+/**
+ * @brief Predefined receiver group for the Popup.
+ * @since_tizen 5.5
+ */
+#define NOTI_EX_RECEIVER_GROUP_POPUP "tizen.org/receiver/popup"
/**
* @brief Enumeration for notification_ex item types.
*/
typedef enum _noti_ex_item_type {
NOTI_EX_ITEM_TYPE_NULL, /**< notification_ex item is null */
- NOTI_EX_ITEM_TYPE_TEXT, /**< notificatin_ex item for text */
- NOTI_EX_ITEM_TYPE_IMAGE, /**< notificatin_ex item for image */
- NOTI_EX_ITEM_TYPE_ICON, /**< notificatin_ex item for icon */
- NOTI_EX_ITEM_TYPE_BUTTON, /**< notificatin_ex item for button */
- NOTI_EX_ITEM_TYPE_CHAT_MESSAGE, /**< notificatin_ex item for chat message */
- NOTI_EX_ITEM_TYPE_CHECKBOX, /**< notificatin_ex item for check box */
- NOTI_EX_ITEM_TYPE_ICON_TEXT, /**< notificatin_ex item for icon and text */
- NOTI_EX_ITEM_TYPE_INPUT_SELECTOR, /**< notificatin_ex item for input selector */
- NOTI_EX_ITEM_TYPE_GROUP, /**< notificatin_ex item for group */
- NOTI_EX_ITEM_TYPE_ENTRY, /**< notificatin_ex item for entry */
- NOTI_EX_ITEM_TYPE_PROGRESS, /**< notificatin_ex item for progress */
- NOTI_EX_ITEM_TYPE_TIME, /**< notificatin_ex item for time */
- NOTI_EX_ITEM_TYPE_CUSTOM = 100 /**< notificatin_ex item for custom item */
+ NOTI_EX_ITEM_TYPE_TEXT, /**< notification_ex item for text */
+ NOTI_EX_ITEM_TYPE_IMAGE, /**< notification_ex item for image */
+ NOTI_EX_ITEM_TYPE_ICON, /**< notification_ex item for icon */
+ NOTI_EX_ITEM_TYPE_BUTTON, /**< notification_ex item for button */
+ NOTI_EX_ITEM_TYPE_CHAT_MESSAGE, /**< notification_ex item for chat message */
+ NOTI_EX_ITEM_TYPE_CHECKBOX, /**< notification_ex item for check box */
+ NOTI_EX_ITEM_TYPE_ICON_TEXT, /**< notification_ex item for icon and text */
+ NOTI_EX_ITEM_TYPE_INPUT_SELECTOR, /**< notification_ex item for input selector */
+ NOTI_EX_ITEM_TYPE_GROUP, /**< notification_ex item for group */
+ NOTI_EX_ITEM_TYPE_ENTRY, /**< notification_ex item for entry */
+ NOTI_EX_ITEM_TYPE_PROGRESS, /**< notification_ex item for progress */
+ NOTI_EX_ITEM_TYPE_TIME, /**< notification_ex item for time */
+ NOTI_EX_ITEM_TYPE_CUSTOM = 100 /**< notification_ex item for custom item */
} noti_ex_item_type_e;
/**
NOTI_EX_ACTION_TYPE_APP_CONTROL, /**< notification_ex action with app control */
NOTI_EX_ACTION_TYPE_VISIBILITY, /**< notification_ex action for visibility */
NOTI_EX_ACTION_TYPE_CUSTOM = 100, /**< notification_ex action for custom action */
-} noti_ex_action_type;
+} noti_ex_action_type_e;
/**
* @brief Enumeration for notification_ex item policy.
typedef enum _noti_ex_item_policy {
NOTI_EX_ITEM_POLICY_NONE = 0, /**< no policy */
NOTI_EX_ITEM_POLICY_ON_BOOT_CLEAR = 1 << 0, /**< on boot clear */
- NOTI_EX_ITEM_POLICY_SIM_MODE = 1 << 1, /**< sim mode */
+ NOTI_EX_ITEM_POLICY_SIM_MODE = 1 << 1, /**< SIM mode */
} noti_ex_item_policy_e;
/**
/**
* @brief Creates the notification_ex color handle.
- * @details Color information can be defined as notification_ex color handle
+ * @details Color information can be defined as a notification_ex color handle
* with alpha, red, green, blue value.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_color_destroy().
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_color_h
- * @see #noti_ex_color_destroy
+ * @see #noti_ex_color_destroy()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_color_create(noti_ex_color_h *handle, unsigned char a, unsigned char r, unsigned char g, unsigned char b);
/**
- * @brief Releases notification_ex color handle.
+ * @brief Releases a notification_ex color handle.
* @since_tizen 5.5
* @param[in] handle The notification_ex color handle
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
int noti_ex_color_destroy(noti_ex_color_h handle);
/**
- * @brief Gets the alpha value of color.
+ * @brief Gets the alpha value of a color.
* @since_tizen 5.5
* @param[in] handle The notification_ex color handle
* @param[out] val The alpha value
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_color_h
- * @see #noti_ex_color_create
+ * @see #noti_ex_color_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_color_get_alpha(noti_ex_color_h handle, unsigned char *val);
/**
- * @brief Gets the red value of color.
+ * @brief Gets the red value of a color.
* @since_tizen 5.5
* @param[in] handle The notification_ex color handle
* @param[out] val The red value
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_color_h
- * @see #noti_ex_color_create
+ * @see #noti_ex_color_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_color_get_red(noti_ex_color_h handle, unsigned char *val);
/**
- * @brief Gets the green value of color.
+ * @brief Gets the green value of a color.
* @since_tizen 5.5
* @param[in] handle The notification_ex color handle
* @param[out] val The green value
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_color_h
- * @see #noti_ex_color_create
+ * @see #noti_ex_color_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_color_get_green(noti_ex_color_h handle, unsigned char *val);
/**
- * @brief Gets the blue value of color.
+ * @brief Gets the blue value of a color.
* @since_tizen 5.5
* @param[in] handle The notification_ex color handle
* @param[out] val The blue value
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_color_h
- * @see #noti_ex_color_create
+ * @see #noti_ex_color_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex padding handle.
- * @details Padding information can be defined as notification_ex padding handle
- * with left, top, right, bottom value.
+ * @details Padding information can be defined as a notification_ex padding handle
+ * with left, right, top and bottom values.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_padding_destroy().
* @param[out] handle The notification_ex padding handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_padding_h
- * @see #noti_ex_padding_destroy
+ * @see #noti_ex_padding_destroy()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_padding_create(noti_ex_padding_h *handle, int left, int top, int right, int bottom);
/**
- * @brief Releases notification_ex padding handle.
+ * @brief Releases a notification_ex padding handle.
* @since_tizen 5.5
* @param[in] handle The notification_ex padding handle
* @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
* @see #noti_ex_padding_h
- * @see #@see #noti_ex_padding_create
+ * @see #@see #noti_ex_padding_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_padding_h
- * @see #@see #noti_ex_padding_create
+ * @see #@see #noti_ex_padding_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_padding_h
- * @see #@see #noti_ex_padding_create
+ * @see #@see #noti_ex_padding_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_padding_h
- * @see #@see #noti_ex_padding_create
+ * @see #@see #noti_ex_padding_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex geometry handle.
- * @details Geometry information can be defined as notification_ex geometry handle
- * with x, y, width, height value.
+ * @details Geometry information can be defined as a notification_ex geometry handle
+ * with x, y, width and height value.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_geometry_destroy().
* @param[out] handle The notification_ex geometry handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_geometry_h
- * @see #noti_ex_geometry_destroy
+ * @see #noti_ex_geometry_destroy()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_geometry_h
- * @see #noti_ex_geometry_create
+ * @see #noti_ex_geometry_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_geometry_h
- * @see #noti_ex_geometry_create
+ * @see #noti_ex_geometry_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_geometry_h
- * @see #noti_ex_geometry_create
+ * @see #noti_ex_geometry_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_geometry_h
- * @see #noti_ex_geometry_create
+ * @see #noti_ex_geometry_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex style handle.
- * @details Style information can be defined as notification_ex style handle
- * with color, padding, geometry information.
- * The color is defined notification_ex color handle.
- * The padding is defined notification_ex padding handle.
- * The geometry is defined notification_ex geometry handle.
+ * @details Style information can be defined as a notification_ex style handle
+ * with color, padding and geometry information.
+ * The color is the defined notification_ex color handle.
+ * The padding is the defined notification_ex padding handle.
+ * The geometry is the defined notification_ex geometry handle.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_style_destroy().
+ * @a color, @a padding and @a geometry must not be released if the function returns #NOTI_EX_ERROR_NONE.
+ * @a color, @a padding and @a geometry will be released when @a handle is released.
* @param[out] handle The notification_ex padding handle
* @param[in] color The notification_ex color handle
* @param[in] padding The notification_ex padding handle
* @see #noti_ex_color_h
* @see #noti_ex_padding_h
* @see #noti_ex_geometry_h
- * @see #noti_ex_style_destroy
+ * @see #noti_ex_style_destroy()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_style_destroy(noti_ex_style_h handle);
/**
- * @brief Gets the padding information.
+ * @brief Gets the padding information from a style.
* @since_tizen 5.5
* @remarks @a padding must be released using noti_ex_padding_destroy().
* @param[in] handle The notification_ex style handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_style_h
* @see #noti_ex_padding_h
- * @see #noti_ex_style_create
+ * @see #noti_ex_style_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_style_get_padding(noti_ex_style_h handle, noti_ex_padding_h *padding);
/**
- * @brief Gets the color information.
+ * @brief Gets the color information from 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
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_style_h
* @see #noti_ex_color_h
- * @see #noti_ex_style_create
+ * @see #noti_ex_style_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_style_get_color(noti_ex_style_h handle, noti_ex_color_h *color);
/**
- * @brief Gets the geometry information.
+ * @brief Gets the geometry information from style.
* @since_tizen 5.5
* @remarks @a geometry must be released using noti_ex_geometry_destroy().
* @param[in] handle The notification_ex style handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_style_h
* @see #noti_ex_geometry_h
- * @see #noti_ex_style_create
+ * @see #noti_ex_style_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_style_get_geometry(noti_ex_style_h handle, noti_ex_geometry_h *geometry);
/**
- * @brief The handle for the led information.
+ * @brief The handle for the LED information.
* @since_tizen 5.5
*/
typedef void* noti_ex_led_info_h;
/**
- * @brief Creates the notification_ex led info handle.
- * @details LED information can be defined as notification_ex led handle
+ * @brief Creates the notification_ex LED info handle.
+ * @details LED information can be defined as a notification_ex LED handle
* with color information.
- * The color is defined notification_ex color handle.
+ * The color is the defined notification_ex color handle.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_led_info_destroy().
- * @param[out] handle The notification_ex led info handle
+ * @a color must not be released if the function returns #NOTI_EX_ERROR_NONE.
+ * @a color will be released when @a handle is released.
+ * @param[out] handle The notification_ex LED info handle
* @param[in] color The notification_ex color handle
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_led_info_h
* @see #noti_ex_color_h
- * @see #noti_ex_led_info_destroy
+ * @see #noti_ex_led_info_destroy()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_create(noti_ex_led_info_h *handle, noti_ex_color_h color);
/**
- * @brief Releases the notification_ex led info handle.
+ * @brief Releases the notification_ex LED info handle.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
+ * @param[in] handle The notification_ex LED info handle
* @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 noti_ex_led_info_destroy(noti_ex_led_info_h handle);
/**
- * @brief Sets the time period for turning on the led.
+ * @brief Sets the time period for turning on the LED.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
- * @param[in] ms The time for turning on the led
+ * @param[in] handle The notification_ex LED info handle
+ * @param[in] ms The time for turning on the LED, in milliseconds
* @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
* @see #noti_ex_led_info_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_set_on_period(noti_ex_led_info_h handle, int ms);
/**
- * @brief Gets the time period for turning on the led.
+ * @brief Gets the time period for turning on the LED.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
- * @param[out] ms The time for turning on the led
+ * @param[in] handle The notification_ex LED info handle
+ * @param[out] ms The time for turning on the LED, in milliseconds
* @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
* @see #noti_ex_led_info_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_get_on_period(noti_ex_led_info_h handle, int *ms);
/**
- * @brief Sets the time period for turning off the led.
+ * @brief Sets the time period for turning off the LED.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
- * @param[in] ms The time for turning off the led
+ * @param[in] handle The notification_ex LED info handle
+ * @param[in] ms The time for turning off the LED, in milliseconds
* @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
* @see #noti_ex_led_info_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_set_off_period(noti_ex_led_info_h handle, int ms);
/**
- * @brief Gets the time period for turning off the led.
+ * @brief Gets the time period for turning off the LED.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
- * @param[out] ms The time for turning off the led
+ * @param[in] handle The notification_ex LED info handle
+ * @param[out] ms The time for turning off the LED, in milliseconds
* @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
* @see #noti_ex_led_info_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_get_off_period(noti_ex_led_info_h handle, int *ms);
/**
- * @brief Gets the color information.
+ * @brief Gets the color information from LED info.
* @since_tizen 5.5
- * @param[in] handle The notification_ex led info handle
+ * @remarks @a color must be released using noti_ex_color_destroy().
+ * @param[in] handle The notification_ex LED info handle
* @param[out] color The notification_ex color handle
* @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
* @see #noti_ex_led_info_h
* @see #noti_ex_color_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_led_info_get_color(noti_ex_led_info_h handle, noti_ex_color_h *color);
/**
- * @brief The notification_ex action handle
+ * @brief The notification_ex action handle.
* @since_tizen 5.5
*/
typedef void* noti_ex_action_h;
/**
- * @brief The notification_ex item handle
+ * @brief The notification_ex item handle.
* @since_tizen 5.5
*/
typedef void* noti_ex_item_h;
/**
- * @brief The notification_ex item_info handle
+ * @brief The notification_ex item_info handle.
* @since_tizen 5.5
*/
typedef void* noti_ex_item_info_h;
int noti_ex_action_destroy(noti_ex_action_h handle);
/**
- * @brief Gets the type of action.
+ * @brief Gets the type of an action.
+ * @details The action type is equal to one of the values of #noti_ex_action_type_e
* @since_tizen 5.5
* @param[in] handle The notification_ex action handle
- * @param[out] type The type of action
+ * @param[out] type The type of action \n
* @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
* @see #noti_ex_action_h
+ * @see #noti_ex_action_type_e
* @par Sample code:
* @code
#include <notification_ex_item.h>
{
int ret;
- int type;
+ int type = NOTI_EX_ACTION_TYPE_NULL;
+
+ ret = noti_ex_action_get_type(action, &type);
- ret = noti_ex_action_get_type(action,&type);
+ if (type == NOTI_EX_ACTION_TYPE_VISIBILITY) {
+ // Do something
+ }
}
* @endcode
*/
int noti_ex_action_get_type(noti_ex_action_h handle, int *type);
/**
- * @brief Gets the local state of action.
+ * @brief Gets the local state of an action.
* @since_tizen 5.5
* @param[in] handle The notification_ex action handle
* @param[out] local The local state of action
int noti_ex_action_is_local(noti_ex_action_h handle, bool *local);
/**
- * @brief Executes the action for notification_ex item.
+ * @brief Executes the action for a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex action handle
* @param[in] item The notification_ex item handle
int noti_ex_action_execute(noti_ex_action_h handle, noti_ex_item_h item);
/**
- * @brief Gets the extra data for action.
+ * @brief Gets the extra data for an action.
* @since_tizen 5.5
* @remarks @a extra must be released using free().
* @param[in] handle The notification_ex action handle
* @brief Gets the time to hide the notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item info handle
- * @param[out] hide_time The time to hide notification
+ * @param[out] hide_time The time to hide notification, in seconds
* @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
* @see #noti_ex_item_info_h
- * @see #noti_ex_item_get_info
+ * @see #noti_ex_item_get_info()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @brief Sets the time to hide the notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item info handle
- * @param[in] hide_time The time to hide notification
+ * @param[in] hide_time The time to hide notification, in seconds
* @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
* @see #noti_ex_item_info_h
- * @see #noti_ex_item_get_info
+ * @see #noti_ex_item_get_info()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @brief Gets the time to delete the notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item info handle
- * @param[out] delete_time The time to delete notification
+ * @param[out] delete_time The time to delete notification, in seconds
* @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
* @see #noti_ex_item_info_h
- * @see #noti_ex_item_get_info
+ * @see #noti_ex_item_get_info()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @brief Sets the time to delete the notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item info handle
- * @param[out] delete_time The time to delete notification
+ * @param[out] delete_time The time to delete notification, in seconds
* @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
* @see #noti_ex_item_info_h
- * @see #noti_ex_item_get_info
+ * @see #noti_ex_item_get_info()
* @par Sample code:
* @code
#include <notification_ex_item.h>
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_info_h
- * @see #noti_ex_item_get_info
+ * @see #noti_ex_item_get_info()
* @par Sample code:
* @code
#include <notification_ex_item.h>
/**
* @brief Gets the type of notification_ex item.
+ * @details The item type is equal to one of the values of #noti_ex_item_type_e.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] type The type of notification_ex item
* @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_item.h>
{
int ret;
- int type;
+ int type = NOTI_EX_ITEM_TYPE_NULL;
ret = noti_ex_item_get_type(item_handle, &type);
+
+ if (type == NOTI_EX_ITEM_TYPE_BUTTON) {
+ // Do something
+ }
}
* @endcode
*/
int noti_ex_item_get_type(noti_ex_item_h handle, int *type);
/**
- * @brief Gets the path of shared file.
+ * @brief Gets the path of shared files.
* @since_tizen 5.5
- * @remarks @a path must be released after releasing all paths using free()
+ * @remarks Each path in the @a paths must be released using free(), then the @a paths must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] path The path of shared file
- * @param[out] count The count of path
+ * @param[out] paths The absolute paths of shared files
+ * @param[out] count The number of paths
* @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 **path = NULL;
+ char **paths = NULL;
int count;
- ret = noti_ex_item_get_shared_path(item_handle, &path, &count);
+ ret = noti_ex_item_get_shared_paths(item_handle, &paths, &count);
}
* @endcode
*/
-int noti_ex_item_get_shared_path(noti_ex_item_h handle, char ***path, int *count);
+int noti_ex_item_get_shared_paths(noti_ex_item_h handle, char ***paths, int *count);
/**
- * @brief Gets the id of notification_ex item.
+ * @brief Gets the id of a notification_ex item.
* @since_tizen 5.5
* @remarks @a id must be released using free().
* @param[in] handle The notification_ex item handle
int noti_ex_item_get_id(noti_ex_item_h handle, char **id);
/**
- * @brief Sets the id of notification_ex item.
+ * @brief Sets the id of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] id The id of notification_ex item
int noti_ex_item_set_id(noti_ex_item_h handle, const char *id);
/**
- * @brief Gets the action for notification_ex item.
+ * @brief Gets the action for a notification_ex item.
* @details The action is defined as notification_ex action handle.
* @since_tizen 5.5
+ * @remarks @a action must be released using noti_ex_action_destroy().
* @param[in] handle The notification_ex item handle
* @param[out] action The notification_ex action handle
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
int noti_ex_item_get_action(noti_ex_item_h handle, noti_ex_action_h *action);
/**
- * @brief Sets the action for notification_ex item.
+ * @brief Sets the action of a notification_ex item.
* @details The action is defined as notification_ex action handle.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
int noti_ex_item_set_action(noti_ex_item_h handle, noti_ex_action_h action);
/**
- * @brief Gets the style for notification_ex item.
+ * @brief Gets the style of a notification_ex item.
* @details The style is defined as notification_ex style handle.
* @since_tizen 5.5
+ * @remarks @a style must be released using noti_ex_style_destroy().
* @param[in] handle The notification_ex item handle
* @param[out] style The notification_ex style handle
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
int noti_ex_item_get_style(noti_ex_item_h handle, noti_ex_style_h *style);
/**
- * @brief Sets the style for notification_ex item.
+ * @brief Sets the style of a notification_ex item.
* @details The style is defined as notification_ex style handle.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
* @see #noti_ex_style_h
- * @see #noti_ex_style_create
+ * @see #noti_ex_style_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_item_set_style(noti_ex_item_h handle, noti_ex_style_h style);
/**
- * @brief Sets the visible state for notification_ex item.
+ * @brief Sets the visibility state of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] visible The visible state
int noti_ex_item_set_visible(noti_ex_item_h handle, bool visible);
/**
- * @brief Gets the visible state for notification_ex item.
+ * @brief Gets the visibility state of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] visible The visible state
int noti_ex_item_get_visible(noti_ex_item_h handle, bool *visible);
/**
- * @brief Sets the enable state for notification_ex item.
+ * @brief Sets the enabled state of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] enable The enable state
int noti_ex_item_set_enable(noti_ex_item_h handle, bool enable);
/**
- * @brief Gets the enable state for notification_ex item.
+ * @brief Gets the enabled state of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] enable The enable state
int noti_ex_item_get_enable(noti_ex_item_h handle, bool *enable);
/**
- * @brief Adds the receiver group for notification_ex item.
+ * @brief Adds the receiver group of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] receiver_group The receiver group
{
int ret;
- ret = noti_ex_item_add_receiver(item_handle, RECEIVERGROUP_PANEL);
+ ret = noti_ex_item_add_receiver(item_handle, NOTI_EX_RECEIVER_GROUP_INDICATOR);
}
* @endcode
*/
int noti_ex_item_add_receiver(noti_ex_item_h handle, const char *receiver_group);
/**
- * @brief Removes the receiver group of notification_ex item.
+ * @brief Removes the receiver group from a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] receiver_group The receiver group
{
int ret;
- ret = noti_ex_item_remove_receiver(item_handle, RECEIVERGROUP_PANEL);
+ ret = noti_ex_item_remove_receiver(item_handle, NOTI_EX_RECEIVER_GROUP_INDICATOR);
}
* @endcode
*/
int noti_ex_item_remove_receiver(noti_ex_item_h handle, const char *receiver_group);
/**
- * @brief Gets the list of receiver group for notification_ex item.
+ * @brief Gets the list of receiver group of a notification_ex item.
* @since_tizen 5.5
- * @remarks @a list must be released after releasing all members of list using free()
+ * @remarks Each member of the list must be released using free(), then the @a list must be released using free().
* @param[in] handle The notification_ex item handle
* @param[out] list The list of receiver group
* @param[out] count The count of list
int noti_ex_item_get_receiver_list(noti_ex_item_h handle, char ***list, int *count);
/**
- * @brief Sets the policy for notification_ex item.
+ * @brief Sets the policy of a notification_ex item.
+ * @details @a policy should be set to values of #noti_ex_item_policy_e combined with bitwise 'or'.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[in] policy The policy for notification_ex item
+ * @param[in] policy The policy of a notification_ex item
* @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
* @see #noti_ex_item_h
+ * @see #noti_ex_item_policy_e
* @par Sample code:
* @code
#include <notification_ex_item.h>
{
int ret;
- ret = noti_ex_item_set_policy(item_handle, NOTI_EX_ITEM_POLICY_ON_BOOT_CLEAR);
+ ret = noti_ex_item_set_policy(item_handle,
+ NOTI_EX_ITEM_POLICY_ON_BOOT_CLEAR | NOTI_EX_ITEM_POLICY_SIM_MODE);
}
* @endcode
*/
int noti_ex_item_set_policy(noti_ex_item_h handle, int policy);
/**
- * @brief Gets the policy for notification_ex item.
+ * @brief Gets the policy of a notification_ex item.
+ * @details @a policy is equal to values of #noti_ex_item_policy_e combined with bitwise 'or'.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[out] policy The policy for notification_ex item
+ * @param[out] policy The policy of a notification_ex item
* @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
* @see #noti_ex_item_h
+ * @see #noti_ex_item_policy_e
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_item_get_policy(noti_ex_item_h handle, int *policy);
/**
- * @brief Gets the channel for notification_ex item.
+ * @brief Gets the channel of a notification_ex item.
* @since_tizen 5.5
* @remarks @a channel must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] channel The channel for notification_ex item
+ * @param[out] channel The channel of a notification_ex item
* @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 noti_ex_item_get_channel(noti_ex_item_h handle, char **channel);
/**
- * @brief Sets the channel for notification_ex item.
+ * @brief Sets the channel of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[in] channel The channel for notification_ex item
+ * @param[in] channel The channel of a notification_ex item
* @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 noti_ex_item_set_channel(noti_ex_item_h handle, const char *channel);
/**
- * @brief Sets the led for notification_ex item.
- * @details The LED information is defined as notification_ex led info handle
+ * @brief Sets the LED information of a notification_ex item.
+ * @details The LED information is defined as notification_ex LED info handle
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[in] led The notification_ex led info item
+ * @param[in] led The notification_ex LED info item
* @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
* @see #noti_ex_item_h
* @see #noti_ex_led_info_h
- * @see #noti_ex_led_info_create
+ * @see #noti_ex_led_info_create()
* @par Sample code:
* @code
#include <notification_ex_item.h>
int noti_ex_item_set_led_info(noti_ex_item_h handle, noti_ex_led_info_h led);
/**
- * @brief Gets the led option for notification_ex item.
- * @details The LED information is defined as notification_ex led info handle
+ * @brief Gets the LED information of a notification_ex item.
+ * @details The LED information is defined as notification_ex LED info handle
* @since_tizen 5.5
+ * @remarks @a led must be released using noti_ex_led_info_destroy().
* @param[in] handle The notification_ex item handle
- * @param[out] led The notification_ex led info item
+ * @param[out] led The notification_ex LED info item
* @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 noti_ex_item_get_led_info(noti_ex_item_h handle, noti_ex_led_info_h *led);
/**
- * @brief Sets the sound path for notification_ex item.
+ * @brief Sets the sound path of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[in] path The sound path for notification_ex item
+ * @param[in] path The absolute path of sound for notification_ex item
* @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 noti_ex_item_set_sound_path(noti_ex_item_h handle, const char *path);
/**
- * @brief Sets the vibration path for notification_ex item.
+ * @brief Gets the sound path of a notification_ex item.
* @since_tizen 5.5
+ * @remarks @a path must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[in] path The vibration path for notification_ex item
+ * @param[out] path The absolute path of sound for notification_ex item
* @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 *path = NULL;
- ret = noti_ex_item_set_vibration_path(item_handle, "vibration_path");
+ ret = noti_ex_item_get_sound_path(item_handle, &path);
}
* @endcode
*/
-int noti_ex_item_set_vibration_path(noti_ex_item_h handle, const char *path);
+int noti_ex_item_get_sound_path(noti_ex_item_h handle, char **path);
/**
- * @brief Gets the sound path for notification_ex item.
+ * @brief Sets the vibration path of a notification_ex item.
* @since_tizen 5.5
- * @remarks @a path must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] path The sound path for notification_ex item
+ * @param[in] path The absolute path of vibration for notification_ex item
* @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 *path = NULL
- ret = noti_ex_item_get_sound_path(item_handle, &path);
+ ret = noti_ex_item_set_vibration_path(item_handle, "vibration_path");
}
* @endcode
*/
-int noti_ex_item_get_sound_path(noti_ex_item_h handle, char **path);
+int noti_ex_item_set_vibration_path(noti_ex_item_h handle, const char *path);
/**
- * @brief Gets the vibration path for notification_ex item.
+ * @brief Gets the vibration path of a notification_ex item.
* @since_tizen 5.5
* @remarks @a path must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] path The vibration path for notification_ex item
+ * @param[out] path The absolute path of vibration for a notification_ex item
* @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 *path = NULL
+ char *path = NULL;
ret = noti_ex_item_get_vibration_path(item_handle, &path);
}
int noti_ex_item_get_vibration_path(noti_ex_item_h handle, char **path);
/**
- * @brief Gets the information for notification_ex item.
+ * @brief Gets the information of a notification_ex item.
* @details The information of notificaction_ex item is defined as
* notification_ex item info handle.
* @since_tizen 5.5
+ * @remarks @a info should not be released.
+ * @remarks @a info is available until @a handle is released.
* @param[in] handle The notification_ex item handle
* @param[out] info The notification_ex item info handle
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
int noti_ex_item_get_info(noti_ex_item_h handle, noti_ex_item_info_h *info);
/**
- * @brief Gets the sender app id of notification_ex item.
+ * @brief Gets the sender app id of a notification_ex item.
* @since_tizen 5.5
* @remarks @a id must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] id The sender app id of notification_ex item
+ * @param[out] id The sender app id of a notification_ex item
* @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 noti_ex_item_get_sender_app_id(noti_ex_item_h handle, char **id);
/**
- * @brief Sets the sender app id of notification_ex item.
- * @since_tizen 5.5
- * @param[in] handle The notification_ex item handle
- * @param[in] id The sender app id of notification_ex item
- * @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
- * @see #noti_ex_item_h
- * @par Sample code:
- * @code
-#include <notification_ex_item.h>
-
-{
- int ret;
-
- ret = noti_ex_item_set_sender_app_id(item_handle, "sender_appid");
-}
- * @endcode
- */
-int noti_ex_item_set_sender_app_id(noti_ex_item_h handle, const char *id);
-
-/**
- * @brief Gets the tag of notification_ex item.
+ * @brief Gets the tag of 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[out] tag The tag of notification_ex item
+ * @param[out] tag The tag of a notification_ex item
* @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 noti_ex_item_get_tag(noti_ex_item_h handle, char **tag);
/**
- * @brief Sets the tag of notification_ex item.
+ * @brief Sets the tag of a notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[int] tag The tag of notification_ex item
+ * @param[in] tag The tag of a notification_ex item
* @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
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_ITEM_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_ITEM_H__ */
typedef void* noti_ex_manager_h;
/**
- * @brief Called when the notification add event is received.
+ * @brief Called when a notification addition event is received.
+ * @details If this callback is set to NULL in #event_callbacks, addition events cannot be received.
* @since_tizen 5.5
* @param[in] handle The manager handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] info The handle that contains event information \n
* The @a info can be used only in the callback. To use outside, make a copy. \n
* The @a info will be freed after the callback exits.
- * @param[in] added_item The item handle to be added \n
- * The @a added_item must be released using noti_ex_item_destroy().
+ * @param[in] added_items The item handles to be added \n
+ * Each item in @a added_items should be destroyed with using noti_ex_item_destroy(), then @a added_items should be released with free().
* @param[in] count The count of the item to be added
* @param[in] user_data The user data which was registered with callback
* @see #noti_ex_manager_h
* @see #noti_ex_event_info_h
* @see #noti_ex_item_h
* @see #noti_ex_event_info_clone
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_destroy()
*/
typedef void (*noti_ex_manager_events_add_cb)(noti_ex_manager_h handle,
- noti_ex_event_info_h info, noti_ex_item_h *added_item,
+ noti_ex_event_info_h info, noti_ex_item_h *added_items,
int count, void *user_data);
/**
- * @brief Called when the notification update event is received.
+ * @brief Called when a notification update event is received.
+ * @details If this callback is set to NULL in #event_callbacks, update events cannot be received.
* @since_tizen 5.5
* @param[in] handle The manager handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] info The handle that contains event information \n
* The @a info can be used only in the callback. To use outside, make a copy. \n
* The @a info will be freed after the callback exits.
* @see #noti_ex_event_info_h
* @see #noti_ex_item_h
* @see #noti_ex_event_info_clone
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_destroy()
*/
typedef void (*noti_ex_manager_events_update_cb)(noti_ex_manager_h handle,
noti_ex_event_info_h info, noti_ex_item_h updated_item,
void *user_data);
/**
- * @brief Called when the notification delete event is received.
+ * @brief Called when a notification deletion event is received.
+ * @details If this callback is set to NULL in #event_callbacks, deletion events cannot be received.
* @since_tizen 5.5
* @param[in] handle The manager handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] info The handle that contains event information \n
* The @a info can be used only in the callback. To use outside, make a copy. \n
* The @a info will be freed after the callback exits.
* @see #noti_ex_event_info_h
* @see #noti_ex_item_h
* @see #noti_ex_event_info_clone
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_destroy()
*/
typedef void (*noti_ex_manager_events_delete_cb)(noti_ex_manager_h handle,
noti_ex_event_info_h info, noti_ex_item_h deleted_item,
void *user_data);
/**
- * @brief Called when the error event is received.
+ * @brief Called when an error event is received.
* @details The errors are passed from #noti_ex_reporter_send_error().
+ * If this callback is set to NULL in #event_callbacks, error events cannot be received.
* @since_tizen 5.5
* @param[in] handle The manager handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] error The error type
* @param[in] request_id The id of the request that occurred error
* @param[in] user_data The user data which was registered with callback
/**
* @brief Creates the notification_ex manager handle.
- * @details The manager handle is created with a events callback and
- * the user can listen notification events through the events callback.
+ * @details The manager handle is created with event callbacks and
+ * the user can listen to notification events through the event callbacks.
* If the user wants to manage notifications for specific group
* the user should identify it with @a receiver_group
+ * Callbacks in @a event_callbacks can be set to NULL, which will result in the corresponding events not being received.
* @since_tizen 5.5
* @privlevel public
* @privilege %http://tizen.org/privilege/notification
* @see #NOTI_EX_RECEIVER_GROUP_LOCKSCREEN
* @see #NOTI_EX_RECEIVER_GROUP_INDICATOR
* @see #NOTI_EX_RECEIVER_GROUP_POPUP
+ * @see #noti_ex_manager_destroy()
* @par Sample code:
* @code
#include <notification_ex_manager.h>
* @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification manager handle
* @param[out] items The result of the get request \n
- * The @a items must be released using free() after releasing each item using noti_ex_item_destroy().
+ * Each item in @a items must be released using noti_ex_item_destroy(), then @a items must be released using free().
* @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_IO_ERROR IO error
* @see #noti_ex_item_h
* @see #noti_ex_manager_h
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_manager.h>
ev.error = _manager_events_error_cb;
ret = noti_ex_manager_create(&handle, NOTI_EX_RECEIVER_GROUP_INDICATOR, ev, NULL);
- ret = noti_ex_manager_delete_all(handle, request_id);
+ ret = noti_ex_manager_delete_all(handle, &request_id);
}
* @endcode
*/
* @code
#include <notification_ex_manager.h>
-void _manager_events_error_cb(noti_ex_error_e error, int req_id, void *user_data) {
+void _manager_events_error_cb(noti_ex_manager_h handle, noti_ex_error_e error,
+ int req_id, void *user_data) {
}
{
* @retval #NOTI_EX_ERROR_IO_ERROR IO error
* @see #noti_ex_manager_h
* @see #noti_ex_item_h
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_manager.h>
-void _manager_events_error_cb(noti_ex_error_e error, int req_id, void *user_data) {
+void _manager_events_error_cb(noti_ex_manager_h handle, noti_ex_error_e error,
+ int req_id, void *user_data) {
}
{
ev.error = _manager_events_error_cb;
ret = noti_ex_manager_create(&handle, NOTI_EX_RECEIVER_GROUP_INDICATOR, ev, NULL);
- ret = noti_ex_manager_get_count(handle, &cnt);
+ ret = noti_ex_manager_get_notification_count(handle, &cnt);
}
* @endcode
*/
-int noti_ex_manager_get_count(noti_ex_manager_h handle, int *cnt);
+int noti_ex_manager_get_notification_count(noti_ex_manager_h handle, int *cnt);
#ifdef __cplusplus
}
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_PROGRESS_H_
-#define CAPI_NOTIFICATION_EX_PROGRESS_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_PROGRESS_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_PROGRESS_H__
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex item handle with progress.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with progress,
- * notification_ex handle have to be made as progress item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to be display the notification with progress,
+ * the notification_ex handle has to be created as a progress item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_progress.h>
int noti_ex_item_progress_create(noti_ex_item_h *handle, const char *id, float min, float current, float max);
/**
- * @brief Gets the current value of progress
+ * @brief Gets the current value of progress.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] current The current value of progress
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_progress_create
+ * @see #noti_ex_item_progress_create()
* @par Sample code:
* @code
#include <notification_ex_progress.h>
{
int ret;
- float current;
+ float current;
ret = noti_ex_item_progress_get_current(progress_item, ¤t);
}
int noti_ex_item_progress_get_current(noti_ex_item_h handle, float *current);
/**
- * @brief Sets the current value of progress
+ * @brief Sets the current value of progress.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[in] current The current value of progress
* @retval #NOTI_EX_ERROR_NONE Success
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @see #noti_ex_item_h
- * @see #noti_ex_item_progress_create
+ * @see #noti_ex_item_progress_create()
* @par Sample code:
* @code
#include <notification_ex_progress.h>
int noti_ex_item_progress_set_current(noti_ex_item_h handle, float current);
/**
- * @brief Gets the minimum value of progress
+ * @brief Gets the minimum value of progress.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] min The minimum value of progress
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_progress_create
+ * @see #noti_ex_item_progress_create()
* @par Sample code:
* @code
#include <notification_ex_progress.h>
{
int ret;
- float min;
+ float min;
ret = noti_ex_item_progress_get_min(progress_item, &min);
}
int noti_ex_item_progress_get_min(noti_ex_item_h handle, float *min);
/**
- * @brief Gets the maximum value of progress
+ * @brief Gets the maximum value of progress.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
* @param[out] max The maximum value of progress
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_progress_create
+ * @see #noti_ex_item_progress_create()
* @par Sample code:
* @code
#include <notification_ex_progress.h>
{
int ret;
- float max;
+ float max;
ret = noti_ex_item_progress_get_max(progress_item, &max);
}
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_PROGRESS_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_PROGRESS_H__ */
/**
* @brief Called when the error event is received.
* @details The errors are passed from noti_ex_manager_send_error().
+ * If this callback is set to NULL in #event_callbacks, error events cannot be received.
* @since_tizen 5.5
* @param[in] handle The reporter handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] error The error type
* @param[in] request_id The id of the request that occurred error
* @param[in] user_data The user data which was registered with callback
/**
* @brief Called when the notification event is received.
+ * @details If this callback is set to NULL in #event_callbacks, notification events cannot be received.
* @since_tizen 5.5
* @param[in] handle The reporter handle \n
- * The @a handle can be used only in the callback. \n
- * The @a handle will be freed after the callback exits.
+ * The @a handle is the same handle for which the callback was set
* @param[in] info The handle that contains event information \n
* The @a info can be used only in the callback. To use outside, make a copy. \n
* The @a info will be freed after the callback exits.
* @param[in] items The target items of event \n
- * The @a items must be released using free() after releasing each item using noti_ex_item_destroy().
+ * Each item in @a items must be released using noti_ex_item_destroy(), then @a items must be released using free().
* @param[in] count The count of @a items
* @param[in] user_data The user data which was registered with callback
* @see #noti_ex_reporter_h
* @see #noti_ex_event_info_h
* @see #noti_ex_item_h
* @see #noti_ex_event_info_clone
- * @see #noti_ex_item_destroy
+ * @see #noti_ex_item_destroy()
*/
typedef void (*noti_ex_reporter_events_event_cb)(noti_ex_reporter_h handle,
noti_ex_event_info_h info, noti_ex_item_h *items, int count,
/**
* @brief Creates the notification_ex reporter handle.
- * @details The reporter handle is created with a events callback and
- * the user can listen notification events through the events callback.
+ * @details The reporter handle is created with event callbacks and
+ * the user can listen notification events through the event callbacks.
+ * Callbacks in @a event_callbacks can be set to NULL, which will result in the corresponding events not being received.
* @since_tizen 5.5
* @privlevel public
* @privilege %http://tizen.org/privilege/notification
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY Out of memory
* @see #noti_ex_item_h
* @see #noti_ex_reporter_events_s
+ * @see #noti_ex_reporter_destroy()
* @par Sample code:
* @code
#include <notification_ex_reporter.h>
int ret;
noti_ex_reporter_h handle;
noti_ex_reporter_events_s ev;
- int request_id;
ev.event = _reporter_events_event_cb;
ev.error = _reporter_events_error_cb;
- ret = noti_ex_reporter_create(&handle, ev, NULL, &request_id);
+ ret = noti_ex_reporter_create(&handle, ev, NULL);
}
* @endcode
*/
/**
* @brief Posts a notification.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[in] noti The notification handle to be posted
* @param[out] request_id The id of request
/**
* @brief Posts notifications contained in a list.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[in] noti_list The notification handle list to be posted
* @param[in] count The count of notifications in @a noti_list
/**
* @brief Updates a notification.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[in] noti The notification handle to be updated
* @param[out] request_id The id of request
/**
* @brief Deletes a notification.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[in] noti The notification handle to be updated
* @param[out] request_id The id of request
/**
* @brief Deletes all notifications.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[out] request_id The id of request
* @return #NOTI_EX_ERROR_NONE On success, other value on failure
/**
* @brief Finds notification by root id.
* @since_tizen 5.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
* @param[in] handle The notification reporter handle
* @param[in] root_id The id of the foremost notification item to be retrived
* @param[out] item The result of the find operation \n
* @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()
* @par Sample code:
* @code
#include <notification_ex_reporter.h>
noti_ex_reporter_events_s ev;
noti_ex_item_h group_item = NULL;
noti_ex_item_h child_item = NULL;
+ int request_id;
ev.error = _reporter_events_error_cb;
ret = noti_ex_reporter_create(&handle, ev, NULL);
ret = noti_ex_reporter_find_by_root_id(handle, "group_id", &group_item);
- ret = noti_ex_reporter_delete(handle, group_item);
+ ret = noti_ex_reporter_delete(handle, group_item, &request_id);
}
* @endcode
*/
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_TEXT_H_
-#define CAPI_NOTIFICATION_EX_TEXT_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_TEXT_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_TEXT_H__
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex item handle with text.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with text,
- * notification_ex handle have to be made as text item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to be display the notification with text,
+ * the notification_ex handle has to be created as a text item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_text.h>
int noti_ex_item_text_create(noti_ex_item_h *handle, const char *id, const char *text, const char *hyper_link);
/**
- * @brief Sets the text contents of text item
+ * @brief Sets the text contents of the text item.
* @since_tizen 5.5
* @param[in] handle The notification_ex item handle
- * @param[in] contents The text contents of text item
+ * @param[in] contents The text contents
* @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
* @see #noti_ex_item_h
- * @see #noti_ex_item_text_create
+ * @see #noti_ex_item_text_create()
* @par Sample code:
* @code
#include <notification_ex_text.h>
int noti_ex_item_text_set_contents(noti_ex_item_h handle, const char *contents);
/**
- * @brief Gets the text contents of text item
+ * @brief Gets the text contents of the text item.
* @since_tizen 5.5
* @remarks @a contents must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] contents The text contents of text item
+ * @param[out] contents The text contents
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_text_create
+ * @see #noti_ex_item_text_create()
* @par Sample code:
* @code
#include <notification_ex_text.h>
{
int ret;
- char *contents = NULL;
+ char *contents = NULL;
ret = noti_ex_item_text_get_contents(text_item, &contents);
}
int noti_ex_item_text_get_contents(noti_ex_item_h handle, char **contents);
/**
- * @brief Gets the hyperlink of text item
+ * @brief Gets the hyperlink of the text item.
* @since_tizen 5.5
- * @remarks @a hyper_link must be released using free().
+ * @remarks @a hyperlink must be released using free().
* @param[in] handle The notification_ex item handle
- * @param[out] hyper_link The hyperlink of text item
+ * @param[out] hyperlink The hyperlink
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_text_create
+ * @see #noti_ex_item_text_create()
* @par Sample code:
* @code
#include <notification_ex_text.h>
{
int ret;
- char *hyper_link = NULL;
+ char *hyperlink = NULL;
- ret = noti_ex_item_text_get_hyperlink(text_item, &hyper_link);
+ ret = noti_ex_item_text_get_hyperlink(text_item, &hyperlink);
}
* @endcode
*/
-int noti_ex_item_text_get_hyperlink(noti_ex_item_h handle, char **hyper_link);
+int noti_ex_item_text_get_hyperlink(noti_ex_item_h handle, char **hyperlink);
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_TEXT_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_TEXT_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_TIME_H_
-#define CAPI_NOTIFICATION_EX_TIME_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_TIME_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_TIME_H__
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex item handle with time.
- * @details The notification_ex is made with notification_ex items.
- * If the user wants to be displayed with time,
- * notification_ex handle have to be made as time item.
+ * @details The notification_ex item is the predefined type of notifications.
+ * The notification can be created with one item or group of items.
+ * If the user wants to be display the notification with time,
+ * the notification_ex handle has to be created as a time item.
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_item_destroy().
* @param[out] handle The notification_ex item handle
* @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_item_destroy
+ * @see #noti_ex_item_destroy()
* @par Sample code:
* @code
#include <notification_ex_time.h>
{
int ret;
noti_ex_item_h time_item = NULL;
- time_t time;
- time(&time);
+ time_t time_info;
+ time(&time_info);
- ret = noti_ex_item_time_create(&time_item, "time_id", time);
+ ret = noti_ex_item_time_create(&time_item, "time_id", time_info);
}
* @endcode
*/
* @param[out] time The time information of time item
* @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_INVALID_PARAMETER Invalid parameter, if the item type is not correct, this error is returned
* @see #noti_ex_item_h
- * @see #noti_ex_item_time_create
+ * @see #noti_ex_item_time_create()
* @par Sample code:
* @code
#include <notification_ex_time.h>
{
int ret;
- time_t time;
+ time_t time_info;
- ret = noti_ex_item_time_get_time(time_item, &time);
+ ret = noti_ex_item_time_get_time(time_item, &time_info);
}
* @endcode
*/
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_TIME_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_TIME_H__ */
* limitations under the License.
*/
-#ifndef CAPI_NOTIFICATION_EX_VISIBILITY_ACTION_H_
-#define CAPI_NOTIFICATION_EX_VISIBILITY_ACTION_H_
+#ifndef __TIZEN_APPFW_NOTIFICATION_EX_VISIBILITY_ACTION_H__
+#define __TIZEN_APPFW_NOTIFICATION_EX_VISIBILITY_ACTION_H__
#include <stdbool.h>
#include <notification_ex_item.h>
/**
* @brief Creates the notification_ex action handle to control visibility.
* @details The notification_ex can define the action with noti_ex_action_h.
- * If it is necessary to control visibility of notification_ex item,
- * notification_ex action handle have to be made as visibility action. .
+ * If it is necessary to control visibility of the notification_ex item,
+ * the notification_ex action handle has to be created as a visibility action.
+ * @a extra can be used to pass user defined data
+ * and the extra data can be obtained from an action handle using #noti_ex_action_get_extra().
* @since_tizen 5.5
* @remarks @a handle must be released using noti_ex_action_destroy().
* @param[out] handle The notification_ex action handle
* @retval #NOTI_EX_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #NOTI_EX_ERROR_OUT_OF_MEMORY out of memory
* @see #noti_ex_action_h
- * @see #noti_ex_action_destroy
+ * @see #noti_ex_action_destroy()
+ * @see #noti_ex_action_get_extra()
* @par Sample code:
* @code
#include <notification_ex_visibility_action.h>
int noti_ex_action_visibility_create(noti_ex_action_h *handle, const char *extra);
/**
- * @brief Sets the visible state for notification_ex item.
+ * @brief Sets the visibility state for notification_ex item.
* @since_tizen 5.5
* @param[in] handle The notification_ex action handle
* @param[in] id The id of notification_ex item
- * @param[in] visible The visible state
+ * @param[in] visible The visibility state
* @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
* @see #noti_ex_action_h
- * @see #noti_ex_action_visibility_create
+ * @see #noti_ex_action_visibility_create()
* @par Sample code:
* @code
#include <notification_ex_visibility_action.h>
{
int ret;
+ noti_ex_item_h button_item = NULL;
+ noti_ex_action_h action = NULL;
- ret = noti_ex_action_visibility_set(&visibility_action, "item_id", true);
+ ret = noti_ex_item_button_create(&button_item, "button_id1", "button_title");
+
+ ret = noti_ex_action_visibility_create(&action, NULL);
+ ret = noti_ex_action_visibility_set(action, "button_id1", true);
+ ret = noti_ex_action_visibility_set(action, "button_id2", false);
+
+ ret = noti_ex_item_set_action(button_item, action);
}
* @endcode
*/
#ifdef __cplusplus
}
#endif
-#endif // CAPI_NOTIFICATION_EX_VISIBILITY_ACTION_H_
+#endif /* __TIZEN_APPFW_NOTIFICATION_EX_VISIBILITY_ACTION_H__ */
return NOTI_EX_ERROR_NONE;
}
-extern "C" EXPORT_API int noti_ex_item_group_foreach(noti_ex_item_h handle,
- noti_ex_item_group_foreach_cb callback, void *data) {
+extern "C" EXPORT_API int noti_ex_item_group_foreach_child(noti_ex_item_h handle,
+ noti_ex_item_group_foreach_child_cb callback, void *data) {
if (handle == nullptr || callback == nullptr) {
LOGE("Invalid parameter");
return NOTI_EX_ERROR_INVALID_PARAMETER;
return NOTI_EX_ERROR_NONE;
}
-extern "C" EXPORT_API int noti_ex_item_get_shared_path(noti_ex_item_h handle,
+extern "C" EXPORT_API int noti_ex_item_get_shared_paths(noti_ex_item_h handle,
char ***path, int *count) {
if (handle == nullptr || path == nullptr || count == nullptr) {
LOGE("Invalid parameter");
return NOTI_EX_ERROR_NONE;
}
-extern "C" EXPORT_API int noti_ex_item_set_sender_app_id(noti_ex_item_h handle,
- const char *id) {
- if (handle == nullptr) {
- LOGE("Invalid parameter");
- return NOTI_EX_ERROR_INVALID_PARAMETER;
- }
-
- Handle* p = static_cast<Handle*>(handle);
- if (id == nullptr)
- p->Get()->SetSenderAppId("");
- else
- p->Get()->SetSenderAppId(id);
- return NOTI_EX_ERROR_NONE;
-}
-
extern "C" EXPORT_API int noti_ex_item_get_tag(noti_ex_item_h handle,
char **tag) {
if (handle == nullptr || tag == nullptr) {
return NOTI_EX_ERROR_NONE;
}
-extern "C" EXPORT_API int noti_ex_manager_get_count(noti_ex_manager_h handle,
- int *cnt) {
+extern "C" EXPORT_API int noti_ex_manager_get_notification_count(
+ noti_ex_manager_h handle, int *cnt) {
if (handle == nullptr || cnt == nullptr) {
LOGE("Invalid parameter");