diff options
author | seungha.son <seungha.son@samsung.com> | 2017-01-17 11:23:34 +0900 |
---|---|---|
committer | Son seungha <seungha.son@samsung.com> | 2017-01-17 02:15:11 -0800 |
commit | a5558e2f17ae3e49445a4e7b80710aa2a57b3ba5 (patch) | |
tree | bbca96f37d8bd9ed06004b761a6640a7203cd916 /src/notification_noti.c | |
parent | 8c5d23815751f9b0c101fd89235f89f141ca8e2f (diff) | |
download | notification-a5558e2f17ae3e49445a4e7b80710aa2a57b3ba5.tar.gz notification-a5558e2f17ae3e49445a4e7b80710aa2a57b3ba5.tar.bz2 notification-a5558e2f17ae3e49445a4e7b80710aa2a57b3ba5.zip |
Adds new API for get/set delete timeoutsubmit/tizen_3.0/20170117.104748accepted/tizen/3.0/wearable/20170118.043459accepted/tizen/3.0/tv/20170118.043455accepted/tizen/3.0/mobile/20170118.043448accepted/tizen/3.0/ivi/20170118.043503accepted/tizen/3.0/common/20170118.131227
- Get/Set timeout value in second when the notification can be hidden
from the viewer.
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I2a013f58da6aa16bf153e2ca6eb5641a661e92c5
Diffstat (limited to 'src/notification_noti.c')
-rwxr-xr-x | src/notification_noti.c | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/notification_noti.c b/src/notification_noti.c index 07b6b62..e2a0481 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -264,7 +264,8 @@ static int _insertion_query_create(notification_h noti, char **query) "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', " @@ -283,7 +284,7 @@ static int _insertion_query_create(notification_h noti, char **query) "%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, @@ -324,7 +325,8 @@ static int _insertion_query_create(notification_h noti, char **query) 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); @@ -465,7 +467,8 @@ static int _update_query_create(notification_h noti, char **query) "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, @@ -500,8 +503,9 @@ static int _update_query_create(notification_h noti, char **query) 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) @@ -601,7 +605,8 @@ static void _notification_noti_populate_from_stmt(sqlite3_stmt *stmt, notificati 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++); @@ -1057,7 +1062,8 @@ EXPORT_API int notification_noti_get_by_priv_id(notification_h noti, char *pkgna "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) @@ -1128,7 +1134,8 @@ EXPORT_API int notification_noti_get_by_tag(notification_h noti, char *pkgname, "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)); @@ -1164,7 +1171,8 @@ EXPORT_API int notification_noti_get_by_tag(notification_h noti, char *pkgname, "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)); @@ -1624,7 +1632,8 @@ EXPORT_API int notification_noti_get_grouping_list(notification_type_e type, "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) { @@ -1726,7 +1735,8 @@ EXPORT_API int notification_noti_get_detail_list(const char *pkgname, "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) { @@ -1987,7 +1997,7 @@ static int _template_query_create(notification_h noti, char *template_name, char "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, " @@ -2007,7 +2017,7 @@ static int _template_query_create(notification_h noti, char *template_name, char "%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, @@ -2048,7 +2058,8 @@ static int _template_query_create(notification_h noti, char *template_name, char 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, @@ -2216,7 +2227,8 @@ EXPORT_API int notification_noti_get_package_template(notification_h noti, char "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)); |