diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2016-03-29 10:12:52 +0900 |
---|---|---|
committer | Myungki Lee <mk5004.lee@samsung.com> | 2016-04-04 10:55:28 +0900 |
commit | 5bb3cd950915749ef72f6c4221c446abd8e64aec (patch) | |
tree | 5c56aa16570af1d52ef405cde7cd5339615ab9ec /src | |
parent | 785eee0f4394d2fd34fa71f54411bcda135bcda7 (diff) | |
download | notification-5bb3cd950915749ef72f6c4221c446abd8e64aec.tar.gz notification-5bb3cd950915749ef72f6c4221c446abd8e64aec.tar.bz2 notification-5bb3cd950915749ef72f6c4221c446abd8e64aec.zip |
Adjust coding rulessubmit/tizen/20160405.001024accepted/tizen/wearable/20160406.012004accepted/tizen/tv/20160406.011943accepted/tizen/mobile/20160406.011851accepted/tizen/ivi/20160406.012024accepted/tizen/common/20160406.143402
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')
-rwxr-xr-x | src/notification.c | 26 | ||||
-rwxr-xr-x | src/notification_db.c | 14 | ||||
-rw-r--r-- | src/notification_error.c | 12 | ||||
-rwxr-xr-x | src/notification_group.c | 10 | ||||
-rwxr-xr-x | src/notification_internal.c | 27 | ||||
-rwxr-xr-x | src/notification_ipc.c | 55 | ||||
-rwxr-xr-x | src/notification_list.c | 8 | ||||
-rwxr-xr-x | src/notification_noti.c | 70 | ||||
-rwxr-xr-x | src/notification_ongoing.c | 7 | ||||
-rwxr-xr-x | src/notification_permission.c | 7 | ||||
-rwxr-xr-x | src/notification_setting.c | 7 | ||||
-rw-r--r-- | src/notification_setting_service.c | 22 | ||||
-rwxr-xr-x | src/notification_status.c | 7 |
13 files changed, 105 insertions, 167 deletions
diff --git a/src/notification.c b/src/notification.c index 7eb7606..e6d91a9 100755 --- a/src/notification.c +++ b/src/notification.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> @@ -196,8 +191,7 @@ EXPORT_API int notification_get_image(notification_h noti, return NOTIFICATION_ERROR_NONE; } -EXPORT_API int notification_set_time(notification_h noti, - time_t input_time) +EXPORT_API int notification_set_time(notification_h noti, time_t input_time) { /* Check noti is valid data */ if (noti == NULL) @@ -213,8 +207,7 @@ EXPORT_API int notification_set_time(notification_h noti, return NOTIFICATION_ERROR_NONE; } -EXPORT_API int notification_get_time(notification_h noti, - time_t * ret_time) +EXPORT_API int notification_get_time(notification_h noti, time_t *ret_time) { /* Check noti and time is valid data */ if (noti == NULL || ret_time == NULL) @@ -227,7 +220,7 @@ EXPORT_API int notification_get_time(notification_h noti, } EXPORT_API int notification_get_insert_time(notification_h noti, - time_t * ret_time) + time_t *ret_time) { /* Check noti and ret_time is valid data */ if (noti == NULL || ret_time == NULL) @@ -240,10 +233,8 @@ EXPORT_API int notification_get_insert_time(notification_h noti, } EXPORT_API int notification_set_text(notification_h noti, - notification_text_type_e type, - const char *text, - const char *key, - int args_type, ...) + notification_text_type_e type, const char *text, + const char *key, int args_type, ...) { bundle *b = NULL; char buf_key[32] = { 0, }; @@ -1695,7 +1686,7 @@ EXPORT_API notification_h notification_load_by_tag(const char *tag) return NULL; } - ret = notification_ipc_request_load_noti_by_tag(noti, caller_pkgname, (char*)tag); + ret = notification_ipc_request_load_noti_by_tag(noti, caller_pkgname, (char *)tag); free(caller_pkgname); set_last_result(ret); @@ -1959,7 +1950,7 @@ EXPORT_API int notification_get_tag(notification_h noti, const char **tag) void notification_call_posted_toast_cb(const char *message) { if (posted_toast_message_cb != NULL) - posted_toast_message_cb((void*)message); + posted_toast_message_cb((void *)message); } EXPORT_API int notification_set_ongoing_flag(notification_h noti, bool ongoing_flag) @@ -2023,3 +2014,4 @@ EXPORT_API int notification_get_auto_remove(notification_h noti, bool *auto_remo return NOTIFICATION_ERROR_NONE; } + diff --git a/src/notification_db.c b/src/notification_db.c index a89188b..e74c75b 100755 --- a/src/notification_db.c +++ b/src/notification_db.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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> @@ -32,7 +27,7 @@ #include <notification_debug.h> #include <notification_db.h> -sqlite3 * notification_db_open(const char *dbfile) +sqlite3 *notification_db_open(const char *dbfile) { int ret = 0; sqlite3 *db = 0; @@ -50,7 +45,7 @@ sqlite3 * notification_db_open(const char *dbfile) return db; } -int notification_db_close(sqlite3 ** db) +int notification_db_close(sqlite3 **db) { int ret = 0; @@ -68,7 +63,7 @@ int notification_db_close(sqlite3 ** db) return NOTIFICATION_ERROR_NONE; } -int notification_db_exec(sqlite3 * db, const char *query, int *num_changes) +int notification_db_exec(sqlite3 *db, const char *query, int *num_changes) { int ret = 0; sqlite3_stmt *stmt = NULL; @@ -127,3 +122,4 @@ bundle *notification_db_column_bundle(sqlite3_stmt * stmt, int col) return bundle_decode(col_bundle, strlen((char *)col_bundle)); } + diff --git a/src/notification_error.c b/src/notification_error.c index 1ed2317..deceec5 100644 --- a/src/notification_error.c +++ b/src/notification_error.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,14 +12,12 @@ * 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 <gio/gio.h> #include "notification_error.h" -static const GDBusErrorEntry dbus_error_entries[] = -{ +static const GDBusErrorEntry dbus_error_entries[] = { {NOTIFICATION_ERROR_INVALID_PARAMETER, "org.freedesktop.Notification.Error.INVALID_PARAMETER"}, {NOTIFICATION_ERROR_OUT_OF_MEMORY, "org.freedesktop.Notification.Error.OUT_OF_MEMORY"}, {NOTIFICATION_ERROR_IO_ERROR, "org.freedesktop.Notification.Error.IO_ERROR"}, @@ -34,13 +30,13 @@ static const GDBusErrorEntry dbus_error_entries[] = {NOTIFICATION_ERROR_INVALID_OPERATION, "org.freedesktop.Notification.Error.INVALID_OPERATION"}, }; -EXPORT_API GQuark notification_error_quark (void) +EXPORT_API GQuark notification_error_quark(void) { static volatile gsize quark_volatile = 0; - g_dbus_error_register_error_domain ("notification-error-quark", + g_dbus_error_register_error_domain("notification-error-quark", &quark_volatile, dbus_error_entries, G_N_ELEMENTS(dbus_error_entries)); - return (GQuark) quark_volatile; + return (GQuark)quark_volatile; } diff --git a/src/notification_group.c b/src/notification_group.c index 21927ea..455545a 100755 --- a/src/notification_group.c +++ b/src/notification_group.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> @@ -28,7 +23,7 @@ #include <notification_db.h> static int _notification_group_check_data_inserted(const char *pkgname, - int group_id, sqlite3 * db) + int group_id, sqlite3 *db) { sqlite3_stmt *stmt = NULL; char query[NOTIFICATION_QUERY_MAX] = { 0, }; @@ -191,3 +186,4 @@ int notification_group_get_badge(const char *pkgname, return NOTIFICATION_ERROR_NONE; } + diff --git a/src/notification_internal.c b/src/notification_internal.c index 1ef0dac..466e9c9 100755 --- a/src/notification_internal.c +++ b/src/notification_internal.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> @@ -460,9 +455,8 @@ EXPORT_API int notification_get_application(notification_h noti, return NOTIFICATION_ERROR_NONE; } -EXPORT_API int notification_set_args(notification_h noti, - bundle * args, - bundle * group_args) +EXPORT_API int notification_set_args(notification_h noti, bundle *args, + bundle *group_args) { if (noti == NULL || args == NULL) return NOTIFICATION_ERROR_INVALID_PARAMETER; @@ -484,8 +478,8 @@ EXPORT_API int notification_set_args(notification_h noti, } EXPORT_API int notification_get_args(notification_h noti, - bundle ** args, - bundle ** group_args) + bundle **args, + bundle **group_args) { if (noti == NULL || args == NULL) return NOTIFICATION_ERROR_INVALID_PARAMETER; @@ -502,7 +496,7 @@ EXPORT_API int notification_get_args(notification_h noti, } EXPORT_API int notification_get_grouping_list(notification_type_e type, int count, - notification_list_h * list) + notification_list_h *list) { notification_list_h get_list = NULL; int ret = 0; @@ -608,19 +602,19 @@ EXPORT_API int notification_op_get_data(notification_op *noti_op, notification_o switch (type) { case NOTIFICATION_OP_DATA_TYPE: - *((int*)data) = noti_op->type; + *((int *)data) = noti_op->type; break; case NOTIFICATION_OP_DATA_PRIV_ID: - *((int*)data) = noti_op->priv_id; + *((int *)data) = noti_op->priv_id; break; case NOTIFICATION_OP_DATA_NOTI: *((notification_h *)data) = noti_op->noti; break; case NOTIFICATION_OP_DATA_EXTRA_INFO_1: - *((int*)data) = noti_op->extra_info_1; + *((int *)data) = noti_op->extra_info_1; break; case NOTIFICATION_OP_DATA_EXTRA_INFO_2: - *((int*)data) = noti_op->extra_info_2; + *((int *)data) = noti_op->extra_info_2; break; default: return NOTIFICATION_ERROR_INVALID_PARAMETER; @@ -1075,3 +1069,4 @@ EXPORT_API int notification_is_service_ready(void) { return notification_ipc_is_master_ready(); } + diff --git a/src/notification_ipc.c b/src/notification_ipc.c index 9213bc7..4ce6465 100755 --- a/src/notification_ipc.c +++ b/src/notification_ipc.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> @@ -72,7 +67,8 @@ static int _ipc_monitor_register(void); static int _ipc_monitor_deregister(void); static void _do_deffered_task(void); -static void _print_noti(notification_h noti) { +static void _print_noti(notification_h noti) +{ char *pkgname = NULL; char *text = NULL; char *content = NULL; @@ -85,10 +81,10 @@ static void _print_noti(notification_h noti) { notification_get_tag(noti, &tag); notification_get_vibration(noti, &vib_type, NULL); - NOTIFICATION_DBG("client print_noti pkgname = %s ", pkgname ); - NOTIFICATION_DBG("client print_noti title = %s ", text ); - NOTIFICATION_DBG("client print_noti content = %s ", content ); - NOTIFICATION_DBG("client print_noti tag = %s ", tag ); + NOTIFICATION_DBG("client print_noti pkgname = %s ", pkgname); + NOTIFICATION_DBG("client print_noti title = %s ", text); + NOTIFICATION_DBG("client print_noti content = %s ", content); + NOTIFICATION_DBG("client print_noti tag = %s ", tag); NOTIFICATION_DBG("client print_noti priv_id = %d ", noti->priv_id); NOTIFICATION_DBG("client print_noti vibration_path = %s ", noti->vibration_path); NOTIFICATION_DBG("client print_noti vibration_type = %d ", vib_type); @@ -144,7 +140,7 @@ int notification_ipc_is_master_ready(void) } } - if(result) + if (result) g_variant_unref(result); return is_master_started; @@ -683,7 +679,7 @@ int notification_ipc_request_insert(notification_h noti, int *priv_id) *priv_id = id; } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_insert done [priv_id : %d, result: %d]", id, result); @@ -717,7 +713,7 @@ int notification_ipc_request_update(notification_h noti) g_variant_get(reply_body, "(i)", &priv_id); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_update done [result: %d, priv_id :%d]", result, priv_id); @@ -779,7 +775,7 @@ int notification_ipc_request_refresh(void) body = g_variant_new("(i)", NOTIFICATION_OP_REFRESH); result = _send_sync_noti(body, &reply, "refresh_noti"); - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_ERR("notification_ipc_request_refresh done [result: %d]", result); @@ -808,7 +804,7 @@ int notification_ipc_request_delete_single(notification_type_e type, char *pkgna g_variant_get(reply_body, "(i)", &id); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_ERR("notification_ipc_request_delete_single done [result: %d]", result); @@ -841,7 +837,7 @@ int notification_ipc_request_delete_multiple(notification_type_e type, char *pkg NOTIFICATION_ERR("num deleted:%d", num_deleted); } - if(reply) + if (reply) g_object_unref(reply); return result; @@ -877,7 +873,7 @@ int notification_ipc_request_load_noti_by_tag(notification_h noti, const char *p } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_load_noti_by_tag done [result: %d]", result); @@ -913,7 +909,7 @@ int notification_ipc_request_load_noti_by_priv_id(notification_h noti, const cha _print_noti(noti); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_load_noti_by_priv_id done [result: %d]", result); @@ -949,7 +945,7 @@ int notification_ipc_request_get_count(notification_type_e type, NOTIFICATION_DBG("noti count [%d]", re_count); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_get_count done [result: %d]", result); @@ -991,7 +987,7 @@ int notification_ipc_request_load_noti_grouping_list(notification_type_e type, i g_variant_iter_free(iter); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_load_noti_grouping_list done [result: %d]", result); @@ -1036,7 +1032,7 @@ int notification_ipc_request_load_noti_detail_list(const char *pkgname, g_variant_iter_free(iter); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_load_noti_detail_list done [result: %d]", result); @@ -1090,7 +1086,7 @@ int notification_ipc_request_get_setting_array( g_variant_iter_free(iter); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_get_setting_array done [result: %d]", result); @@ -1133,7 +1129,7 @@ int notification_ipc_request_get_setting_by_package_name( g_variant_unref(setting_body); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_get_setting_by_package_name done [result: %d]", result); @@ -1172,7 +1168,7 @@ int notification_ipc_request_load_system_setting(notification_system_setting_h * g_variant_unref(setting_body); } - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_request_load_system_setting done [result: %d]", result); @@ -1199,7 +1195,7 @@ int notification_ipc_update_setting(notification_setting_h setting) result = _send_sync_noti(body, &reply, "update_noti_setting"); - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_DBG("notification_ipc_update_setting done [result: %d]", result); @@ -1430,8 +1426,8 @@ EXPORT_API GVariant *notification_ipc_make_gvariant_from_noti(notification_h not return body; } -static gboolean _variant_to_int_dict(GHashTable **dict, GVariant *variant) { - +static gboolean _variant_to_int_dict(GHashTable **dict, GVariant *variant) +{ GVariantIter iter; int key; int *hash_key; @@ -1694,7 +1690,7 @@ static int _send_service_register() result = _send_sync_noti(NULL, &reply, "noti_service_register"); - if(reply) + if (reply) g_object_unref(reply); NOTIFICATION_ERR("_send_service_register done = %s, result = %d", _bus_name, result); @@ -1791,3 +1787,4 @@ int notification_ipc_monitor_fini(void) { return _ipc_monitor_deregister(); } + diff --git a/src/notification_list.c b/src/notification_list.c index 078dc29..1012732 100755 --- a/src/notification_list.c +++ b/src/notification_list.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdlib.h> @@ -288,3 +283,4 @@ EXPORT_API int notification_free_list(notification_list_h list) return NOTIFICATION_ERROR_NONE; } + diff --git a/src/notification_noti.c b/src/notification_noti.c index d0510c4..1ca42eb 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> @@ -53,7 +48,7 @@ static void __free_and_set(void **target_ptr, void *new_ptr) } } -static int _notification_noti_bind_query_text(sqlite3_stmt * stmt, const char *name, +static int _notification_noti_bind_query_text(sqlite3_stmt *stmt, const char *name, const char *str) { int ret = 0; @@ -77,7 +72,7 @@ static int _notification_noti_bind_query_text(sqlite3_stmt * stmt, const char *n return NOTIFICATION_ERROR_NONE; } -static int _notification_noti_bind_query_double(sqlite3_stmt * stmt, const char *name, +static int _notification_noti_bind_query_double(sqlite3_stmt *stmt, const char *name, double val) { int ret = 0; @@ -98,7 +93,7 @@ static int _notification_noti_bind_query_double(sqlite3_stmt * stmt, const char return NOTIFICATION_ERROR_NONE; } -static int _notification_noti_check_priv_id(notification_h noti, sqlite3 * db) +static int _notification_noti_check_priv_id(notification_h noti, sqlite3 *db) { int result = 0; int ret = NOTIFICATION_ERROR_NONE; @@ -142,7 +137,7 @@ err: static int _notification_noti_get_internal_group_id_by_priv_id(const char *pkgname, int priv_id, - sqlite3 * db) + sqlite3 *db) { char *query = NULL; sqlite3_stmt *stmt = NULL; @@ -204,48 +199,48 @@ static int _insertion_query_create(notification_h noti, char **query) /* Decode bundle to insert DB */ if (noti->args) - bundle_encode(noti->args, (bundle_raw **) & args, &b_encode_len); + bundle_encode(noti->args, (bundle_raw **)&args, &b_encode_len); if (noti->group_args) - bundle_encode(noti->group_args, (bundle_raw **) & group_args, + bundle_encode(noti->group_args, (bundle_raw **)&group_args, &b_encode_len); if (noti->b_execute_option) bundle_encode(noti->b_execute_option, - (bundle_raw **) & b_execute_option, &b_encode_len); + (bundle_raw **)&b_execute_option, &b_encode_len); if (noti->b_service_responding) bundle_encode(noti->b_service_responding, - (bundle_raw **) & b_service_responding, &b_encode_len); + (bundle_raw **)&b_service_responding, &b_encode_len); if (noti->b_service_single_launch) bundle_encode(noti->b_service_single_launch, - (bundle_raw **) & b_service_single_launch, &b_encode_len); + (bundle_raw **)&b_service_single_launch, &b_encode_len); if (noti->b_service_multi_launch) bundle_encode(noti->b_service_multi_launch, - (bundle_raw **) & b_service_multi_launch, &b_encode_len); + (bundle_raw **)&b_service_multi_launch, &b_encode_len); for (i = 0; i < NOTIFICATION_EVENT_TYPE_MAX; i++) { if (noti->b_event_handler[i]) bundle_encode(noti->b_event_handler[i], - (bundle_raw **) & b_event_handler[i], &b_encode_len); + (bundle_raw **)&b_event_handler[i], &b_encode_len); } if (noti->b_text) - bundle_encode(noti->b_text, (bundle_raw **) & b_text, &b_encode_len); + bundle_encode(noti->b_text, (bundle_raw **)&b_text, &b_encode_len); if (noti->b_key) - bundle_encode(noti->b_key, (bundle_raw **) & b_key, &b_encode_len); + bundle_encode(noti->b_key, (bundle_raw **)&b_key, &b_encode_len); if (noti->b_format_args) bundle_encode(noti->b_format_args, - (bundle_raw **) & b_format_args, &b_encode_len); + (bundle_raw **)&b_format_args, &b_encode_len); if (noti->b_image_path) bundle_encode(noti->b_image_path, - (bundle_raw **) & b_image_path, &b_encode_len); + (bundle_raw **)&b_image_path, &b_encode_len); /* Check only simmode property is enable */ if (noti->flags_for_property & NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE) @@ -383,47 +378,47 @@ static int _update_query_create(notification_h noti, char **query) /* Decode bundle to update DB */ if (noti->args) - bundle_encode(noti->args, (bundle_raw **) & args, &b_encode_len); + bundle_encode(noti->args, (bundle_raw **)&args, &b_encode_len); if (noti->group_args) - bundle_encode(noti->group_args, (bundle_raw **) & group_args, + bundle_encode(noti->group_args, (bundle_raw **)&group_args, &b_encode_len); if (noti->b_execute_option) bundle_encode(noti->b_execute_option, - (bundle_raw **) & b_execute_option, &b_encode_len); + (bundle_raw **)&b_execute_option, &b_encode_len); if (noti->b_service_responding) bundle_encode(noti->b_service_responding, - (bundle_raw **) & b_service_responding, &b_encode_len); + (bundle_raw **)&b_service_responding, &b_encode_len); if (noti->b_service_single_launch) bundle_encode(noti->b_service_single_launch, - (bundle_raw **) & b_service_single_launch, &b_encode_len); + (bundle_raw **)&b_service_single_launch, &b_encode_len); if (noti->b_service_multi_launch) bundle_encode(noti->b_service_multi_launch, - (bundle_raw **) & b_service_multi_launch, &b_encode_len); + (bundle_raw **)&b_service_multi_launch, &b_encode_len); for (i = 0; i < NOTIFICATION_EVENT_TYPE_MAX; i++) { if (noti->b_event_handler[i]) bundle_encode(noti->b_event_handler[i], - (bundle_raw **) & b_event_handler[i], &b_encode_len); + (bundle_raw **)&b_event_handler[i], &b_encode_len); } if (noti->b_text) - bundle_encode(noti->b_text, (bundle_raw **) & b_text, &b_encode_len); + bundle_encode(noti->b_text, (bundle_raw **)&b_text, &b_encode_len); if (noti->b_key) - bundle_encode(noti->b_key, (bundle_raw **) & b_key, &b_encode_len); + bundle_encode(noti->b_key, (bundle_raw **)&b_key, &b_encode_len); if (noti->b_format_args) bundle_encode(noti->b_format_args, - (bundle_raw **) & b_format_args, &b_encode_len); + (bundle_raw **)&b_format_args, &b_encode_len); if (noti->b_image_path) bundle_encode(noti->b_image_path, - (bundle_raw **) & b_image_path, &b_encode_len); + (bundle_raw **)&b_image_path, &b_encode_len); /* Check only simmode property is enable */ if (noti->flags_for_property & NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE) @@ -531,7 +526,7 @@ static int _update_query_create(notification_h noti, char **query) return NOTIFICATION_ERROR_NONE; } -static void _notification_noti_populate_from_stmt(sqlite3_stmt * stmt, notification_h noti) +static void _notification_noti_populate_from_stmt(sqlite3_stmt *stmt, notification_h noti) { int col = 0; int i = 0; @@ -596,7 +591,7 @@ static void _notification_noti_populate_from_stmt(sqlite3_stmt * stmt, notificat noti->temp_content = NULL; } -static notification_h _notification_noti_get_item(sqlite3_stmt * stmt) +static notification_h _notification_noti_get_item(sqlite3_stmt *stmt) { notification_h noti = NULL; @@ -665,7 +660,7 @@ int notification_noti_get_tag_type(const char *tagged_str) return TAG_TYPE_INVALID; } -static int _notification_noti_update_priv_id(sqlite3 * db, int rowid) +static int _notification_noti_update_priv_id(sqlite3 *db, int rowid) { int ret = NOTIFICATION_ERROR_NONE; char *query = NULL; @@ -876,7 +871,7 @@ EXPORT_API int notification_noti_insert(notification_h noti) return NOTIFICATION_ERROR_INVALID_PARAMETER; } - if (_is_allowed_to_notify((const char*)noti->caller_pkgname) == false) { + if (_is_allowed_to_notify((const char *)noti->caller_pkgname) == false) { NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_pkgname); return NOTIFICATION_ERROR_PERMISSION_DENIED; } @@ -1146,7 +1141,7 @@ EXPORT_API int notification_noti_update(notification_h noti) if (!db) return get_last_result(); - if (_is_allowed_to_notify((const char*)noti->caller_pkgname) == false) { + if (_is_allowed_to_notify((const char *)noti->caller_pkgname) == false) { NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_pkgname); return NOTIFICATION_ERROR_PERMISSION_DENIED; } @@ -1952,3 +1947,4 @@ err: return ret; } + diff --git a/src/notification_ongoing.c b/src/notification_ongoing.c index 565496e..699338a 100755 --- a/src/notification_ongoing.c +++ b/src/notification_ongoing.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> diff --git a/src/notification_permission.c b/src/notification_permission.c index ef472c6..73d2d8b 100755 --- a/src/notification_permission.c +++ b/src/notification_permission.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> diff --git a/src/notification_setting.c b/src/notification_setting.c index a2d6fd1..0b34177 100755 --- a/src/notification_setting.c +++ b/src/notification_setting.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <stdio.h> 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; } - - - diff --git a/src/notification_status.c b/src/notification_status.c index 6ca7275..377162a 100755 --- a/src/notification_status.c +++ b/src/notification_status.c @@ -1,9 +1,5 @@ /* - * libnotification - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com> + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,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 <sys/types.h> |