diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-01-14 18:34:59 +0000 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-01-14 18:34:59 +0000 |
commit | 656898e80394724b3e7cd340df994b6bb1b9d230 (patch) | |
tree | 827f7af979876c33844a270e3261ee1e9b9abfbe /demo/gclue-service-agent.c | |
parent | e66ffbfa2278b1fe79d1316c01ff259551efdd96 (diff) | |
download | geoclue-656898e80394724b3e7cd340df994b6bb1b9d230.tar.gz |
agent: No need to pass bus_name to agents
Agents can gather all needed info about the app from the desktop_id so
bus_name becomes redundant.
Diffstat (limited to 'demo/gclue-service-agent.c')
-rw-r--r-- | demo/gclue-service-agent.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/demo/gclue-service-agent.c b/demo/gclue-service-agent.c index 8351fb4..3f3b7eb 100644 --- a/demo/gclue-service-agent.c +++ b/demo/gclue-service-agent.c @@ -229,7 +229,6 @@ typedef struct GClueAgent *agent; GDBusMethodInvocation *invocation; NotifyNotification *notification; - char *bus_name; char *desktop_id; gboolean authorized; } NotificationData; @@ -237,7 +236,6 @@ typedef struct static void notification_data_free (NotificationData *data) { - g_free (data->bus_name); g_free (data->desktop_id); g_object_unref (data->notification); g_slice_free (NotificationData, data); @@ -269,9 +267,9 @@ on_notify_closed (NotifyNotification *notification, NotificationData *data = (NotificationData *) user_data; if (data->authorized) - g_debug ("Authorized %s (%s)", data->desktop_id, data->bus_name); + g_debug ("Authorized %s", data->desktop_id); else - g_debug ("%s (%s) not authorized", data->desktop_id, data->bus_name); + g_debug ("%s not authorized", data->desktop_id); gclue_agent_complete_authorize_app (data->agent, data->invocation, data->authorized); @@ -281,7 +279,6 @@ on_notify_closed (NotifyNotification *notification, static gboolean gclue_service_agent_handle_authorize_app (GClueAgent *agent, GDBusMethodInvocation *invocation, - const char *bus_name, const char *desktop_id) { NotifyNotification *notification; @@ -297,7 +294,6 @@ gclue_service_agent_handle_authorize_app (GClueAgent *agent, data = g_slice_new0 (NotificationData); data->invocation = invocation; data->notification = notification; - data->bus_name = g_strdup (bus_name); data->desktop_id = g_strdup (desktop_id); notify_notification_add_action (notification, |