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);
/*!
* 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,
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);
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);
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");
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;