int notification_set_ongoing_time(notification_h noti, int current, int duration);
/**
- * @brief Gets the time that notification is hidden.
+ * @brief Gets timeout value in second when the notification can be hidden from the viewer.
* @since_tizen 3.0
* @param[in] noti The notification handle
- * @param[out] timeout The timeout time
+ * @param[out] timeout The timeout time(sec)
* @return #NOTIFICATION_ERROR_NONE on success,
* otherwise any other value on failure
* @retval #NOTIFICATION_ERROR_NONE Success
int notification_get_hide_timeout(notification_h noti, int *timeout);
/**
- * @brief Sets the time that notification is hidden.
+ * @brief Sets timeout value in second when the notification can be hidden from the viewer.
* @since_tizen 3.0
* @param[in] noti The notification handle
- * @param[in] timeout The timeout time
+ * @param[in] timeout The timeout time(sec)
* @return #NOTIFICATION_ERROR_NONE on success,
* otherwise any other value on failure
* @retval #NOTIFICATION_ERROR_NONE Success
*/
int notification_set_hide_timeout(notification_h noti, int timeout);
+/**
+ * @brief Gets timeout value in second when the notification can be deleted from the viewer.
+ * @since_tizen 3.0
+ * @param[in] noti The notification handle
+ * @param[out] timeout The timeout time(sec)
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ * otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Notification handle should be created by notification_create().
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+ int timeout;
+
+ noti = notification_create(NOTIFICATION_TYPE_NOTI);
+ if (noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_get_delete_timeout(noti, &timeout)
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+int notification_get_delete_timeout(notification_h noti, int *timeout);
+
+/**
+ * @brief Sets timeout value in second when the notification can be deleted from the viewer.
+ * @since_tizen 3.0
+ * @param[in] noti The notification handle
+ * @param[in] timeout The timeout time(sec)
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ * otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Notification handle should be created by notification_create().
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_create(NOTIFICATION_TYPE_NOTI);
+ if (noti == NULL) {
+ return;
+ }
+
+ noti_err = notification_set_delete_timeout(noti, 10)
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
+ }
+}
+ * @endcode
+ */
+int notification_set_delete_timeout(notification_h noti, int timeout);
+
typedef void (*event_handler_cb)(notification_h noti, int event_type, void *userdata);
/**
"flags_for_property, flag_simmode, display_applist, "
"progress_size, progress_percentage, "
"ongoing_flag, ongoing_value_type, ongoing_current, ongoing_duration, "
- "auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid) values ("
+ "auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid) values ("
"%d, "
"%d, "
"'%s', '%s', "
"%d, '%s', %d, '%s', %d, %d, %d, %d,"
"%d, %d, %d, "
"$progress_size, $progress_percentage, "
- "%d, %d, %d, %d, "
+ "%d, %d, %d, %d, %d,"
"%d, %d, %d, %d, %d, %d)",
noti->type,
noti->layout,
noti->ongoing_duration,
noti->auto_remove,
noti->default_button_index,
- noti->timeout,
+ noti->hide_timeout,
+ noti->delete_timeout,
noti->text_input_max_length,
noti->event_flag,
noti->uid);
"display_applist = %d, "
"progress_size = $progress_size, progress_percentage = $progress_percentage, "
"ongoing_flag = %d, ongoing_value_type = %d, ongoing_current = %d, ongoing_duration = %d, "
- "auto_remove = %d, default_button_index = %d, timeout = %d, text_input_max_length = %d, event_flag = %d "
+ "auto_remove = %d, default_button_index = %d, hide_timeout = %d, "
+ "delete_timeout = %d, text_input_max_length = %d, event_flag = %d "
"where priv_id = %d ",
noti->type,
noti->layout,
noti->flags_for_property, flag_simmode, noti->display_applist,
noti->ongoing_flag, noti->ongoing_value_type,
noti->ongoing_current, noti->ongoing_duration,
- noti->auto_remove, noti->default_button_index, noti->timeout,
- noti->text_input_max_length, noti->event_flag, noti->priv_id);
+ noti->auto_remove, noti->default_button_index, noti->hide_timeout,
+ noti->delete_timeout, noti->text_input_max_length, noti->event_flag,
+ noti->priv_id);
/* Free decoded data */
if (args)
noti->ongoing_duration = sqlite3_column_int(stmt, col++);
noti->auto_remove = sqlite3_column_int(stmt, col++);
noti->default_button_index = sqlite3_column_int(stmt, col++);
- noti->timeout = sqlite3_column_int(stmt, col++);
+ noti->hide_timeout = sqlite3_column_int(stmt, col++);
+ noti->delete_timeout = sqlite3_column_int(stmt, col++);
noti->text_input_max_length = sqlite3_column_int(stmt, col++);
noti->event_flag = sqlite3_column_int(stmt, col++);
noti->uid = sqlite3_column_int(stmt, col++);
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_list ";
if (pkgname != NULL && strlen(pkgname) != 0)
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_list where caller_pkgname = ? and tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_list where tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_list where 1 > 0 ");
if (status == VCONFKEY_TELEPHONY_SIM_INSERTED) {
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_list ");
if (priv_id == NOTIFICATION_PRIV_ID_NONE && group_id == NOTIFICATION_GROUP_ID_NONE) {
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, flag_simmode, display_applist, progress_size, progress_percentage, "
"ongoing_flag, ongoing_value_type, ongoing_current, ongoing_duration, "
- "auto_remove, default_button_index, timeout, text_input_max_length, "
+ "auto_remove, default_button_index, hide_timeout, delete_timeout, text_input_max_length, "
"event_flag, uid, template_name) values ("
"%d, "
"%d, "
"%d, '%s', %d, '%s', %d, %d, %d, %d, "
"%d, %d, %d, $progress_size, $progress_percentage, "
"%d, %d, %d, %d, "
- "%d, %d, %d, %d, "
+ "%d, %d, %d, %d, %d, "
"%d, %d, '%s')",
noti->type,
noti->layout,
noti->ongoing_duration,
noti->auto_remove,
noti->default_button_index,
- noti->timeout,
+ noti->hide_timeout,
+ noti->delete_timeout,
noti->text_input_max_length,
noti->event_flag,
noti->uid,
"b_event_handler_click_on_icon, b_event_handler_click_on_thumbnail, b_event_handler_click_on_text_input_button, "
"sound_type, sound_path, vibration_type, vibration_path, led_operation, led_argb, led_on_ms, led_off_ms, "
"flags_for_property, display_applist, progress_size, progress_percentage, ongoing_flag, ongoing_value_type, "
- "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, hide_timeout, delete_timeout, "
+ "text_input_max_length, event_flag, uid "
"from noti_template where caller_pkgname = ? and template_name = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));