diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-02-20 13:36:18 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:28:15 +0100 |
commit | 5bee67c032df8d9127c8c0aeb88cbd3c0c844b4b (patch) | |
tree | 096d63dda3141626692eddf313c56070df06fc43 /src/mm-auth-request-polkit.c | |
parent | 5f167fd199ce7cc359aa1d884df9b332aa669a79 (diff) |
core: use GDBusMethodInvocation in the auth API
Diffstat (limited to 'src/mm-auth-request-polkit.c')
-rw-r--r-- | src/mm-auth-request-polkit.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mm-auth-request-polkit.c b/src/mm-auth-request-polkit.c index 2a96bfec..b637ac94 100644 --- a/src/mm-auth-request-polkit.c +++ b/src/mm-auth-request-polkit.c @@ -34,14 +34,13 @@ GObject * mm_auth_request_polkit_new (PolkitAuthority *authority, const char *authorization, GObject *owner, - DBusGMethodInvocation *context, + GDBusMethodInvocation *context, MMAuthRequestCb callback, gpointer callback_data, GDestroyNotify notify) { GObject *obj; MMAuthRequestPolkitPrivate *priv; - char *sender; g_return_val_if_fail (authorization != NULL, NULL); g_return_val_if_fail (owner != NULL, NULL); @@ -56,13 +55,14 @@ mm_auth_request_polkit_new (PolkitAuthority *authority, callback_data, notify); if (obj) { + const gchar *sender; + priv = MM_AUTH_REQUEST_POLKIT_GET_PRIVATE (obj); priv->authority = authority; priv->cancellable = g_cancellable_new (); - sender = dbus_g_method_get_sender (context); + sender = g_dbus_method_invocation_get_sender (context); priv->subject = polkit_system_bus_name_new (sender); - g_free (sender); } return obj; @@ -101,7 +101,7 @@ pk_auth_cb (GObject *object, GAsyncResult *result, gpointer user_data) g_signal_emit_by_name (self, "result"); } - + g_object_unref (self); } @@ -172,4 +172,3 @@ mm_auth_request_polkit_class_init (MMAuthRequestPolkitClass *class) ar_class->authenticate = real_authenticate; ar_class->dispose = real_dispose; } - |