diff options
author | Aleksander Morgado <aleksander@gnu.org> | 2011-09-02 20:28:12 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:19 +0100 |
commit | d47176a32c45da0f63ec5ab8024cf4e5f6467a7f (patch) | |
tree | 3914d9064c045e606d2da23eff392dbf9af43ea5 /src/mm-auth-request-polkit.c | |
parent | 1e79a2d292e7e68430043d9741bfbbe01cd3206f (diff) |
core: avoid using DBusGMethodInvocation in auth API
While porting to GDBus, use opaque pointers. This allows us to include either a
DBusGMethodInvocation or a GDBusMethodInvocation in the 'context' pointer.
Once fully ported to GDBus, we can safely change it back to make the context be
a GDBusMethodInvocation.
Diffstat (limited to 'src/mm-auth-request-polkit.c')
-rw-r--r-- | src/mm-auth-request-polkit.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mm-auth-request-polkit.c b/src/mm-auth-request-polkit.c index 2a96bfec..4e7a07ca 100644 --- a/src/mm-auth-request-polkit.c +++ b/src/mm-auth-request-polkit.c @@ -34,14 +34,14 @@ GObject * mm_auth_request_polkit_new (PolkitAuthority *authority, const char *authorization, GObject *owner, - DBusGMethodInvocation *context, + gpointer context, + const gchar *sender, 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); @@ -59,10 +59,7 @@ mm_auth_request_polkit_new (PolkitAuthority *authority, priv = MM_AUTH_REQUEST_POLKIT_GET_PRIVATE (obj); priv->authority = authority; priv->cancellable = g_cancellable_new (); - - sender = dbus_g_method_get_sender (context); priv->subject = polkit_system_bus_name_new (sender); - g_free (sender); } return obj; @@ -101,7 +98,7 @@ pk_auth_cb (GObject *object, GAsyncResult *result, gpointer user_data) g_signal_emit_by_name (self, "result"); } - + g_object_unref (self); } |