From 404d8977db7840ebf6c987f193ffa4aec575bd8d Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 22 Aug 2012 16:07:09 +0200 Subject: [PATCH 3/4] Pass Discover() options to the implementation vfuncs * Allow discover implementations to use the options passed in. https://bugs.freedesktop.org/show_bug.cgi?id=53934 --- service/realm-all-provider.c | 5 +++-- service/realm-provider.c | 5 +++-- service/realm-provider.h | 2 ++ service/realm-samba-provider.c | 1 + service/realm-sssd-ipa-provider.c | 1 + 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/service/realm-all-provider.c b/service/realm-all-provider.c index dfc7d36..06c24b7 100644 --- a/service/realm-all-provider.c +++ b/service/realm-all-provider.c @@ -249,6 +249,7 @@ on_discover_timeout (gpointer user_data) static void realm_all_provider_discover_async (RealmProvider *provider, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data) @@ -267,8 +268,8 @@ realm_all_provider_discover_async (RealmProvider *provider, g_simple_async_result_set_op_res_gpointer (res, discover, discover_closure_free); for (l = self->providers; l != NULL; l = g_list_next (l)) { - realm_provider_discover (l->data, string, invocation, on_provider_discover, - g_object_ref (res)); + realm_provider_discover (l->data, string, options, invocation, + on_provider_discover, g_object_ref (res)); discover->outstanding++; } diff --git a/service/realm-provider.c b/service/realm-provider.c index 697f098..2ad9f2c 100644 --- a/service/realm-provider.c +++ b/service/realm-provider.c @@ -104,7 +104,7 @@ realm_provider_handle_discover (RealmDbusProvider *provider, /* Make note of the current operation id, for diagnostics */ realm_diagnostics_setup_options (invocation, options); - realm_provider_discover (self, string, invocation, on_discover_complete, + realm_provider_discover (self, string, options, invocation, on_discover_complete, method_closure_new (self, invocation)); return TRUE; @@ -302,6 +302,7 @@ realm_provider_set_realms (RealmProvider *self, void realm_provider_discover (RealmProvider *self, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data) @@ -311,7 +312,7 @@ realm_provider_discover (RealmProvider *self, klass = REALM_PROVIDER_GET_CLASS (self); g_return_if_fail (klass->discover_async != NULL); - (klass->discover_async) (self, string, invocation, callback, user_data); + (klass->discover_async) (self, string, options, invocation, callback, user_data); } gint diff --git a/service/realm-provider.h b/service/realm-provider.h index ffe2bc0..556d4f4 100644 --- a/service/realm-provider.h +++ b/service/realm-provider.h @@ -45,6 +45,7 @@ struct _RealmProviderClass { void (* discover_async) (RealmProvider *provider, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data); @@ -72,6 +73,7 @@ gboolean realm_provider_is_default (const gchar *t void realm_provider_discover (RealmProvider *self, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data); diff --git a/service/realm-samba-provider.c b/service/realm-samba-provider.c index 4d0c8ad..d850931 100644 --- a/service/realm-samba-provider.c +++ b/service/realm-samba-provider.c @@ -97,6 +97,7 @@ on_ad_discover (GObject *source, static void realm_samba_provider_discover_async (RealmProvider *provider, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data) diff --git a/service/realm-sssd-ipa-provider.c b/service/realm-sssd-ipa-provider.c index 8892169..62e4ee8 100644 --- a/service/realm-sssd-ipa-provider.c +++ b/service/realm-sssd-ipa-provider.c @@ -104,6 +104,7 @@ on_ipa_discover (GObject *source, static void realm_sssd_ipa_provider_discover_async (RealmProvider *provider, const gchar *string, + GVariant *options, GDBusMethodInvocation *invocation, GAsyncReadyCallback callback, gpointer user_data) -- 1.7.11.5