summaryrefslogtreecommitdiff
path: root/src/notification_setting_service.c
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2016-03-29 10:12:52 +0900
committerMyungki Lee <mk5004.lee@samsung.com>2016-04-04 10:55:28 +0900
commit5bb3cd950915749ef72f6c4221c446abd8e64aec (patch)
tree5c56aa16570af1d52ef405cde7cd5339615ab9ec /src/notification_setting_service.c
parent785eee0f4394d2fd34fa71f54411bcda135bcda7 (diff)
downloadnotification-5bb3cd950915749ef72f6c4221c446abd8e64aec.tar.gz
notification-5bb3cd950915749ef72f6c4221c446abd8e64aec.tar.bz2
notification-5bb3cd950915749ef72f6c4221c446abd8e64aec.zip
Change-Id: Ia98ac4748d523bd190a0689fccb132d8ea3f7091 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com> Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
Diffstat (limited to 'src/notification_setting_service.c')
-rw-r--r--src/notification_setting_service.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c
index b9bfbab..478ca28 100644
--- a/src/notification_setting_service.c
+++ b/src/notification_setting_service.c
@@ -1,6 +1,4 @@
/*
- * libnotification
- *
* Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <errno.h>
@@ -141,7 +138,7 @@ EXPORT_API int noti_setting_service_get_setting_by_package_name(const char *pack
row_count = 1;
- if (!(result_setting_array = (struct notification_setting*)malloc(sizeof(struct notification_setting) * row_count))) {
+ if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
@@ -150,8 +147,8 @@ EXPORT_API int noti_setting_service_get_setting_by_package_name(const char *pack
col_index = column_count;
_get_table_field_data_string(query_result, &(result_setting_array[i].package_name), 1, col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].allow_to_notify), col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].do_not_disturb_except), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].allow_to_notify), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].do_not_disturb_except), col_index++);
_get_table_field_data_int(query_result, &(result_setting_array[i].visibility_class), col_index++);
*setting = result_setting_array;
@@ -226,7 +223,7 @@ EXPORT_API int noti_setting_get_setting_array(notification_setting_h *setting_ar
}
NOTIFICATION_DBG("row_count [%d] column_count [%d]", row_count, column_count);
- if (!(result_setting_array = (struct notification_setting*)malloc(sizeof(struct notification_setting) * row_count))) {
+ if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
@@ -236,8 +233,8 @@ EXPORT_API int noti_setting_get_setting_array(notification_setting_h *setting_ar
for (i = 0; i < row_count; i++) {
_get_table_field_data_string(query_result, &(result_setting_array[i].package_name), 1, col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].allow_to_notify), col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].do_not_disturb_except), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].allow_to_notify), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].do_not_disturb_except), col_index++);
_get_table_field_data_int(query_result, &(result_setting_array[i].visibility_class), col_index++);
}
@@ -314,7 +311,7 @@ EXPORT_API int noti_system_setting_load_system_setting(notification_system_setti
row_count = 1;
- if (!(result_system_setting = (struct notification_system_setting*)malloc(sizeof(struct notification_system_setting)))) {
+ if (!(result_system_setting = (struct notification_system_setting *)malloc(sizeof(struct notification_system_setting)))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
@@ -322,7 +319,7 @@ EXPORT_API int noti_system_setting_load_system_setting(notification_system_setti
col_index = column_count;
- _get_table_field_data_int(query_result, (int*)&(result_system_setting->do_not_disturb), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_system_setting->do_not_disturb), col_index++);
_get_table_field_data_int(query_result, &(result_system_setting->visibility_class), col_index++);
*system_setting = result_system_setting;
@@ -343,6 +340,3 @@ out:
return err;
}
-
-
-