summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2017-01-25 16:39:42 +0900
committerseungha.son <seungha.son@samsung.com>2017-01-25 16:40:43 +0900
commit3f50d6575b51c01b7cc20ee19e1a55da512d6f30 (patch)
treea5a4b32300f5dcce77d4dcc7711e84bda6bdc40e /src
parent2e261e710c04cc8466350ecd5e136a6a19d30233 (diff)
downloadnotification-3f50d6575b51c01b7cc20ee19e1a55da512d6f30.tar.gz
notification-3f50d6575b51c01b7cc20ee19e1a55da512d6f30.tar.bz2
notification-3f50d6575b51c01b7cc20ee19e1a55da512d6f30.zip
Revert "Adds new API for get/set delete timeout"
This reverts commit a5558e2f17ae3e49445a4e7b80710aa2a57b3ba5. Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: Ied1429f2f8cca26ea4d0dc68e343d5737505acf1
Diffstat (limited to 'src')
-rwxr-xr-xsrc/notification.c6
-rwxr-xr-xsrc/notification_db.c6
-rwxr-xr-xsrc/notification_internal.c24
-rwxr-xr-xsrc/notification_ipc.c6
-rwxr-xr-xsrc/notification_noti.c44
5 files changed, 24 insertions, 62 deletions
diff --git a/src/notification.c b/src/notification.c
index a696ddb..41dce20 100755
--- a/src/notification.c
+++ b/src/notification.c
@@ -1441,8 +1441,7 @@ static notification_h _notification_create(notification_type_e type)
noti->ongoing_flag = false;
noti->default_button_index = 0;
noti->ongoing_value_type = NOTIFICATION_ONGOING_VALUE_TYPE_PERCENT;
- noti->hide_timeout = 0;
- noti->delete_timeout = 0;
+ noti->timeout = 0;
noti->event_flag = false;
noti->is_translation = false;
@@ -1653,8 +1652,7 @@ EXPORT_API int notification_clone(notification_h noti, notification_h *clone)
new_noti->ongoing_duration = noti->ongoing_duration;
new_noti->auto_remove = noti->auto_remove;
new_noti->default_button_index = noti->default_button_index;
- new_noti->hide_timeout = noti->hide_timeout;
- new_noti->delete_timeout = noti->delete_timeout;
+ new_noti->timeout = noti->timeout;
new_noti->text_input_max_length = noti->text_input_max_length;
new_noti->event_flag = noti->event_flag;
new_noti->uid = noti->uid;
diff --git a/src/notification_db.c b/src/notification_db.c
index efe7d15..d9c0791 100755
--- a/src/notification_db.c
+++ b/src/notification_db.c
@@ -85,8 +85,7 @@ create table if not exists noti_list ( \
ongoing_duration INTEGER default 0, \
auto_remove INTEGER default 1, \
default_button_index INTEGER default 0, \
- hide_timeout INTEGER default 0, \
- delete_timeout INTEGER default 0, \
+ timeout INTEGER default 0, \
text_input_max_length INTEGER default 0, \
event_flag INTEGER default 0, \
uid INTEGER \
@@ -211,8 +210,7 @@ create table if not exists noti_list ( \
ongoing_duration INTEGER default 0, \
auto_remove INTEGER default 1, \
default_button_index INTEGER default 0, \
- hide_timeout INTEGER default 0, \
- delete_timeout INTEGER default 0, \
+ timeout INTEGER default 0, \
text_input_max_length INTEGER default 0, \
event_flag INTEGER default 0, \
uid INTEGER, \
diff --git a/src/notification_internal.c b/src/notification_internal.c
index b61b657..67e93ee 100755
--- a/src/notification_internal.c
+++ b/src/notification_internal.c
@@ -1512,7 +1512,7 @@ EXPORT_API int notification_get_hide_timeout(notification_h noti, int *timeout)
if (noti == NULL || timeout == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- *timeout = noti->hide_timeout;
+ *timeout = noti->timeout;
return NOTIFICATION_ERROR_NONE;
}
@@ -1522,27 +1522,7 @@ EXPORT_API int notification_set_hide_timeout(notification_h noti, int timeout)
if (noti == NULL || timeout < 0)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- noti->hide_timeout = timeout;
-
- return NOTIFICATION_ERROR_NONE;
-}
-
-EXPORT_API int notification_get_delete_timeout(notification_h noti, int *timeout)
-{
- if (noti == NULL || timeout == NULL)
- return NOTIFICATION_ERROR_INVALID_PARAMETER;
-
- *timeout = noti->delete_timeout;
-
- return NOTIFICATION_ERROR_NONE;
-}
-
-EXPORT_API int notification_set_delete_timeout(notification_h noti, int timeout)
-{
- if (noti == NULL || timeout < 0)
- return NOTIFICATION_ERROR_INVALID_PARAMETER;
-
- noti->delete_timeout = timeout;
+ noti->timeout = timeout;
return NOTIFICATION_ERROR_NONE;
}
diff --git a/src/notification_ipc.c b/src/notification_ipc.c
index 4bc5363..540b3b6 100755
--- a/src/notification_ipc.c
+++ b/src/notification_ipc.c
@@ -1900,8 +1900,7 @@ EXPORT_API GVariant *notification_ipc_make_gvariant_from_noti(notification_h not
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_ONGOING_DURATION, g_variant_new_int32(noti->ongoing_duration));
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_AUTO_REMOVE, g_variant_new_int32(noti->auto_remove));
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_DEFAULT_BUTTON, g_variant_new_int32(noti->default_button_index));
- g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_HIDE_TIMEOUT, g_variant_new_int32(noti->hide_timeout));
- g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_DELETE_TIMEOUT, g_variant_new_int32(noti->delete_timeout));
+ g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_TIMEOUT, g_variant_new_int32(noti->timeout));
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_TEXT_INPUT_MAX_LENGTH, g_variant_new_int32(noti->text_input_max_length));
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_EVENT_FLAG, g_variant_new_int32(noti->event_flag));
g_variant_builder_add(&builder, "{iv}", NOTIFICATION_DATA_TYPE_TRANSLATION, g_variant_new_int32(noti->is_translation));
@@ -2057,8 +2056,7 @@ EXPORT_API int notification_ipc_make_noti_from_gvariant(notification_h noti,
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_ONGOING_DURATION, "i", &noti->ongoing_duration);
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_AUTO_REMOVE, "i", &noti->auto_remove);
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_DEFAULT_BUTTON, "i", &noti->default_button_index);
- _variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_HIDE_TIMEOUT, "i", &noti->hide_timeout);
- _variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_DELETE_TIMEOUT, "i", &noti->delete_timeout);
+ _variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_TIMEOUT, "i", &noti->timeout);
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_TEXT_INPUT_MAX_LENGTH, "i", &noti->text_input_max_length);
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_EVENT_FLAG, "i", &noti->event_flag);
_variant_dict_lookup(dict, NOTIFICATION_DATA_TYPE_TRANSLATION, "i", &noti->is_translation);
diff --git a/src/notification_noti.c b/src/notification_noti.c
index e2a0481..07b6b62 100755
--- a/src/notification_noti.c
+++ b/src/notification_noti.c
@@ -264,8 +264,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid) values ("
+ "auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid) values ("
"%d, "
"%d, "
"'%s', '%s', "
@@ -284,7 +283,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,
@@ -325,8 +324,7 @@ static int _insertion_query_create(notification_h noti, char **query)
noti->ongoing_duration,
noti->auto_remove,
noti->default_button_index,
- noti->hide_timeout,
- noti->delete_timeout,
+ noti->timeout,
noti->text_input_max_length,
noti->event_flag,
noti->uid);
@@ -467,8 +465,7 @@ 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, hide_timeout = %d, "
- "delete_timeout = %d, text_input_max_length = %d, event_flag = %d "
+ "auto_remove = %d, default_button_index = %d, timeout = %d, text_input_max_length = %d, event_flag = %d "
"where priv_id = %d ",
noti->type,
noti->layout,
@@ -503,9 +500,8 @@ 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->hide_timeout,
- noti->delete_timeout, noti->text_input_max_length, noti->event_flag,
- noti->priv_id);
+ noti->auto_remove, noti->default_button_index, noti->timeout,
+ noti->text_input_max_length, noti->event_flag, noti->priv_id);
/* Free decoded data */
if (args)
@@ -605,8 +601,7 @@ 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->hide_timeout = sqlite3_column_int(stmt, col++);
- noti->delete_timeout = sqlite3_column_int(stmt, col++);
+ noti->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++);
@@ -1062,8 +1057,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
"from noti_list ";
if (pkgname != NULL && strlen(pkgname) != 0)
@@ -1134,8 +1128,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag "
"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));
@@ -1171,8 +1164,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, 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));
@@ -1632,8 +1624,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
"from noti_list where 1 > 0 ");
if (status == VCONFKEY_TELEPHONY_SIM_INSERTED) {
@@ -1735,8 +1726,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, timeout, text_input_max_length, event_flag, uid "
"from noti_list ");
if (priv_id == NOTIFICATION_PRIV_ID_NONE && group_id == NOTIFICATION_GROUP_ID_NONE) {
@@ -1997,7 +1987,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, hide_timeout, delete_timeout, text_input_max_length, "
+ "auto_remove, default_button_index, timeout, text_input_max_length, "
"event_flag, uid, template_name) values ("
"%d, "
"%d, "
@@ -2017,7 +2007,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,
@@ -2058,8 +2048,7 @@ static int _template_query_create(notification_h noti, char *template_name, char
noti->ongoing_duration,
noti->auto_remove,
noti->default_button_index,
- noti->hide_timeout,
- noti->delete_timeout,
+ noti->timeout,
noti->text_input_max_length,
noti->event_flag,
noti->uid,
@@ -2227,8 +2216,7 @@ 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, hide_timeout, delete_timeout, "
- "text_input_max_length, event_flag, uid "
+ "ongoing_current, ongoing_duration, auto_remove, default_button_index, 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));