From d351d22c9e10432b6ea5db912821d4f4995a0179 Mon Sep 17 00:00:00 2001 From: Seungha Son Date: Wed, 21 Feb 2018 23:19:51 +0900 Subject: [PATCH] Change function position Signed-off-by: Seungha Son Change-Id: I3a5b07a71a47d953d42d0c2207bdd2251fa6f90b --- include/service_common.h | 1 - src/notification_service.c | 21 ++++++++++++++++++--- src/service_common.c | 16 ---------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/include/service_common.h b/include/service_common.h index b24a1a6..b5394ce 100755 --- a/include/service_common.h +++ b/include/service_common.h @@ -46,7 +46,6 @@ typedef struct monitoring_info { uid_t uid; } monitoring_info_s; -void print_noti(notification_h noti); int send_notify(GVariant *body, char *cmd, GHashTable **monitoring_hash, char *interface_name, uid_t uid); bool is_existed_busname(const char *sender_name); int send_event_notify_by_busname(GVariant *body, char *cmd, char *busname, char *interface_name); diff --git a/src/notification_service.c b/src/notification_service.c index d5a3365..cbea06c 100755 --- a/src/notification_service.c +++ b/src/notification_service.c @@ -77,6 +77,21 @@ static int _delete_noti(const char *app_id, int priv_id, uid_t uid); /*! * NOTIFICATION SERVICE INITIALIZATION */ +static void __print_noti(notification_h noti) +{ + char *pkgname = NULL; + char *text = NULL; + char *content = NULL; + const char *tag = NULL; + + notification_get_pkgname(noti, &pkgname); + notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text); + notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content); + notification_get_tag(noti, &tag); + + DBG("Noti-info : pkgname[%s] title[%s] content[%s] tag[%s]", + pkgname, text, content, tag); +} static void _on_name_appeared(GDBusConnection *connection, const gchar *name, @@ -453,7 +468,7 @@ static int _add_noti(GVariant **reply_body, notification_h noti, uid_t uid) int priv_id = NOTIFICATION_PRIV_ID_NONE; GVariant *body = NULL; - print_noti(noti); + __print_noti(noti); ret = notification_noti_insert(noti); if (ret != NOTIFICATION_ERROR_NONE) { ERR("Failed to update a notification [%d]", ret); @@ -718,7 +733,7 @@ static int _update_noti(GVariant **reply_body, notification_h noti, uid_t uid) int priv_id = NOTIFICATION_PRIV_ID_NONE; notification_h source_noti; - print_noti(noti); + __print_noti(noti); if (notification_validate_private_sharing(noti) == false) { source_noti = notification_create(NOTIFICATION_TYPE_NOTI); @@ -827,7 +842,7 @@ int notification_load_noti_by_tag(GVariant *parameters, GVariant **reply_body, u goto out; } - print_noti(noti); + __print_noti(noti); *reply_body = notification_ipc_make_gvariant_from_noti(noti, true); if (*reply_body == NULL) { ERR("Failed to make reply_body"); diff --git a/src/service_common.c b/src/service_common.c index 4edc640..30547bb 100755 --- a/src/service_common.c +++ b/src/service_common.c @@ -44,22 +44,6 @@ static GDBusConnection *_gdbus_conn = NULL; -void print_noti(notification_h noti) -{ - char *pkgname = NULL; - char *text = NULL; - char *content = NULL; - const char *tag = NULL; - - notification_get_pkgname(noti, &pkgname); - notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text); - notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content); - notification_get_tag(noti, &tag); - - DBG("Noti-info : pkgname[%s] title[%s] content[%s] tag[%s]", - pkgname, text, content, tag); -} - uid_t get_sender_uid(const char *sender_name) { GDBusMessage *msg = NULL; -- 2.7.4