Change function position 02/170702/1
authorSeungha Son <seungha.son@samsung.com>
Wed, 21 Feb 2018 14:19:51 +0000 (23:19 +0900)
committerSeungha Son <seungha.son@samsung.com>
Wed, 21 Feb 2018 14:20:37 +0000 (23:20 +0900)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I3a5b07a71a47d953d42d0c2207bdd2251fa6f90b

include/service_common.h
src/notification_service.c
src/service_common.c

index b24a1a6..b5394ce 100755 (executable)
@@ -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);
index d5a3365..cbea06c 100755 (executable)
@@ -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");
index 4edc640..30547bb 100755 (executable)
 
 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;