2 * Generated by gdbus-codegen 2.32.4. DO NOT EDIT.
4 * The license of this code is the same as for the source it was derived from.
11 #include "gsignond-dbus-remote-plugin-gen.h"
15 # include <gio/gunixfdlist.h>
20 GDBusArgInfo parent_struct;
21 gboolean use_gvariant;
22 } _ExtendedGDBusArgInfo;
26 GDBusMethodInfo parent_struct;
27 const gchar *signal_name;
29 } _ExtendedGDBusMethodInfo;
33 GDBusSignalInfo parent_struct;
34 const gchar *signal_name;
35 } _ExtendedGDBusSignalInfo;
39 GDBusPropertyInfo parent_struct;
40 const gchar *hyphen_name;
41 gboolean use_gvariant;
42 } _ExtendedGDBusPropertyInfo;
46 GDBusInterfaceInfo parent_struct;
47 const gchar *hyphen_name;
48 } _ExtendedGDBusInterfaceInfo;
52 const _ExtendedGDBusPropertyInfo *info;
54 GValue orig_value; /* the value before the change */
58 _changed_property_free (ChangedProperty *data)
60 g_value_unset (&data->orig_value);
65 _g_strv_equal0 (gchar **a, gchar **b)
69 if (a == NULL && b == NULL)
74 if (a == NULL || b == NULL)
76 if (g_strv_length (a) != g_strv_length (b))
78 for (n = 0; a[n] != NULL; n++)
79 if (g_strcmp0 (a[n], b[n]) != 0)
87 _g_variant_equal0 (GVariant *a, GVariant *b)
90 if (a == NULL && b == NULL)
95 if (a == NULL || b == NULL)
97 ret = g_variant_equal (a, b);
102 G_GNUC_UNUSED static gboolean
103 _g_value_equal (const GValue *a, const GValue *b)
105 gboolean ret = FALSE;
106 g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
107 switch (G_VALUE_TYPE (a))
110 ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
113 ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
116 ret = (g_value_get_int (a) == g_value_get_int (b));
119 ret = (g_value_get_uint (a) == g_value_get_uint (b));
122 ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
125 ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
129 /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
130 gdouble da = g_value_get_double (a);
131 gdouble db = g_value_get_double (b);
132 ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
136 ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
139 ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
142 if (G_VALUE_TYPE (a) == G_TYPE_STRV)
143 ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
145 g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
151 /* ------------------------------------------------------------------------
152 * Code for interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1
153 * ------------------------------------------------------------------------
157 * SECTION:GSignondDbusRemotePluginV1
158 * @title: GSignondDbusRemotePluginV1
159 * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 D-Bus interface
161 * This section contains code for working with the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link> D-Bus interface in C.
164 /* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 ---- */
166 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_cancel =
179 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData =
190 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache =
194 "identityMethodCache",
201 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism =
212 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_pointers[] =
214 &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData,
215 &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache,
216 &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism,
220 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial =
225 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_pointers,
229 "handle-request-initial",
233 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_sessionData =
244 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_pointers[] =
246 &_gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_sessionData,
250 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request =
255 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_pointers,
263 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_uiData =
274 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_pointers[] =
276 &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_uiData,
280 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished =
284 "userActionFinished",
285 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_pointers,
289 "handle-user-action-finished",
293 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_uiData =
304 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers[] =
306 &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_uiData,
310 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_refresh =
315 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers,
323 static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_remote_plugin_v1_method_info_pointers[] =
325 &_gsignond_dbus_remote_plugin_v1_method_info_cancel,
326 &_gsignond_dbus_remote_plugin_v1_method_info_request_initial,
327 &_gsignond_dbus_remote_plugin_v1_method_info_request,
328 &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished,
329 &_gsignond_dbus_remote_plugin_v1_method_info_refresh,
333 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData =
344 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers[] =
346 &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData,
350 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response =
355 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers,
361 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData =
372 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers[] =
374 &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData,
378 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final =
383 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers,
389 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData =
400 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers[] =
402 &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData,
406 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_store =
411 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers,
417 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error =
428 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers[] =
430 &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error,
434 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_error =
439 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers,
445 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData =
456 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers[] =
458 &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData,
462 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required =
466 "userActionRequired",
467 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers,
470 "user-action-required"
473 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData =
484 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers[] =
486 &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData,
490 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed =
495 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers,
501 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state =
512 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message =
523 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers[] =
525 &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state,
526 &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message,
530 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed =
535 (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers,
541 static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_pointers[] =
543 &_gsignond_dbus_remote_plugin_v1_signal_info_response,
544 &_gsignond_dbus_remote_plugin_v1_signal_info_response_final,
545 &_gsignond_dbus_remote_plugin_v1_signal_info_store,
546 &_gsignond_dbus_remote_plugin_v1_signal_info_error,
547 &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required,
548 &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed,
549 &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed,
553 static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_method =
559 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
566 static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_mechanisms =
572 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
579 static const _ExtendedGDBusPropertyInfo * const _gsignond_dbus_remote_plugin_v1_property_info_pointers[] =
581 &_gsignond_dbus_remote_plugin_v1_property_info_method,
582 &_gsignond_dbus_remote_plugin_v1_property_info_mechanisms,
586 static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_v1_interface_info =
590 "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1",
591 (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_pointers,
592 (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_pointers,
593 (GDBusPropertyInfo **) &_gsignond_dbus_remote_plugin_v1_property_info_pointers,
601 * gsignond_dbus_remote_plugin_v1_interface_info:
603 * Gets a machine-readable description of the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link> D-Bus interface.
605 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
608 gsignond_dbus_remote_plugin_v1_interface_info (void)
610 return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info;
614 * gsignond_dbus_remote_plugin_v1_override_properties:
615 * @klass: The class structure for a #GObject<!-- -->-derived class.
616 * @property_id_begin: The property id to assign to the first overridden property.
618 * Overrides all #GObject properties in the #GSignondDbusRemotePluginV1 interface for a concrete class.
619 * The properties are overridden in the order they are defined.
621 * Returns: The last property id.
624 gsignond_dbus_remote_plugin_v1_override_properties (GObjectClass *klass, guint property_id_begin)
626 g_object_class_override_property (klass, property_id_begin++, "method");
627 g_object_class_override_property (klass, property_id_begin++, "mechanisms");
628 return property_id_begin - 1;
634 * GSignondDbusRemotePluginV1:
636 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
640 * GSignondDbusRemotePluginV1Iface:
641 * @parent_iface: The parent interface.
642 * @handle_cancel: Handler for the #GSignondDbusRemotePluginV1::handle-cancel signal.
643 * @handle_refresh: Handler for the #GSignondDbusRemotePluginV1::handle-refresh signal.
644 * @handle_request: Handler for the #GSignondDbusRemotePluginV1::handle-request signal.
645 * @handle_request_initial: Handler for the #GSignondDbusRemotePluginV1::handle-request-initial signal.
646 * @handle_user_action_finished: Handler for the #GSignondDbusRemotePluginV1::handle-user-action-finished signal.
647 * @get_mechanisms: Getter for the #GSignondDbusRemotePluginV1:mechanisms property.
648 * @get_method: Getter for the #GSignondDbusRemotePluginV1:method property.
649 * @error: Handler for the #GSignondDbusRemotePluginV1::error signal.
650 * @refreshed: Handler for the #GSignondDbusRemotePluginV1::refreshed signal.
651 * @response: Handler for the #GSignondDbusRemotePluginV1::response signal.
652 * @response_final: Handler for the #GSignondDbusRemotePluginV1::response-final signal.
653 * @status_changed: Handler for the #GSignondDbusRemotePluginV1::status-changed signal.
654 * @store: Handler for the #GSignondDbusRemotePluginV1::store signal.
655 * @user_action_required: Handler for the #GSignondDbusRemotePluginV1::user-action-required signal.
657 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
661 gsignond_dbus_remote_plugin_v1_default_init (GSignondDbusRemotePluginV1Iface *iface)
663 /* GObject signals for incoming D-Bus method calls: */
665 * GSignondDbusRemotePluginV1::handle-cancel:
666 * @object: A #GSignondDbusRemotePluginV1.
667 * @invocation: A #GDBusMethodInvocation.
669 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method.
671 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_cancel() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
673 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
675 g_signal_new ("handle-cancel",
676 G_TYPE_FROM_INTERFACE (iface),
678 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_cancel),
679 g_signal_accumulator_true_handled,
681 g_cclosure_marshal_generic,
684 G_TYPE_DBUS_METHOD_INVOCATION);
687 * GSignondDbusRemotePluginV1::handle-request-initial:
688 * @object: A #GSignondDbusRemotePluginV1.
689 * @invocation: A #GDBusMethodInvocation.
690 * @arg_sessionData: Argument passed by remote caller.
691 * @arg_identityMethodCache: Argument passed by remote caller.
692 * @arg_mechanism: Argument passed by remote caller.
694 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method.
696 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request_initial() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
698 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
700 g_signal_new ("handle-request-initial",
701 G_TYPE_FROM_INTERFACE (iface),
703 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request_initial),
704 g_signal_accumulator_true_handled,
706 g_cclosure_marshal_generic,
709 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRING);
712 * GSignondDbusRemotePluginV1::handle-request:
713 * @object: A #GSignondDbusRemotePluginV1.
714 * @invocation: A #GDBusMethodInvocation.
715 * @arg_sessionData: Argument passed by remote caller.
717 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method.
719 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
721 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
723 g_signal_new ("handle-request",
724 G_TYPE_FROM_INTERFACE (iface),
726 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request),
727 g_signal_accumulator_true_handled,
729 g_cclosure_marshal_generic,
732 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
735 * GSignondDbusRemotePluginV1::handle-user-action-finished:
736 * @object: A #GSignondDbusRemotePluginV1.
737 * @invocation: A #GDBusMethodInvocation.
738 * @arg_uiData: Argument passed by remote caller.
740 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method.
742 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_user_action_finished() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
744 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
746 g_signal_new ("handle-user-action-finished",
747 G_TYPE_FROM_INTERFACE (iface),
749 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_user_action_finished),
750 g_signal_accumulator_true_handled,
752 g_cclosure_marshal_generic,
755 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
758 * GSignondDbusRemotePluginV1::handle-refresh:
759 * @object: A #GSignondDbusRemotePluginV1.
760 * @invocation: A #GDBusMethodInvocation.
761 * @arg_uiData: Argument passed by remote caller.
763 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method.
765 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_refresh() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
767 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
769 g_signal_new ("handle-refresh",
770 G_TYPE_FROM_INTERFACE (iface),
772 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_refresh),
773 g_signal_accumulator_true_handled,
775 g_cclosure_marshal_generic,
778 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
780 /* GObject signals for received D-Bus signals: */
782 * GSignondDbusRemotePluginV1::response:
783 * @object: A #GSignondDbusRemotePluginV1.
784 * @arg_sessionData: Argument.
786 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.response">"response"</link> is received.
788 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
790 g_signal_new ("response",
791 G_TYPE_FROM_INTERFACE (iface),
793 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response),
796 g_cclosure_marshal_generic,
801 * GSignondDbusRemotePluginV1::response-final:
802 * @object: A #GSignondDbusRemotePluginV1.
803 * @arg_sessionData: Argument.
805 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.responseFinal">"responseFinal"</link> is received.
807 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
809 g_signal_new ("response-final",
810 G_TYPE_FROM_INTERFACE (iface),
812 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response_final),
815 g_cclosure_marshal_generic,
820 * GSignondDbusRemotePluginV1::store:
821 * @object: A #GSignondDbusRemotePluginV1.
822 * @arg_sessionData: Argument.
824 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.store">"store"</link> is received.
826 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
828 g_signal_new ("store",
829 G_TYPE_FROM_INTERFACE (iface),
831 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, store),
834 g_cclosure_marshal_generic,
839 * GSignondDbusRemotePluginV1::error:
840 * @object: A #GSignondDbusRemotePluginV1.
841 * @arg_error: Argument.
843 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.error">"error"</link> is received.
845 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
847 g_signal_new ("error",
848 G_TYPE_FROM_INTERFACE (iface),
850 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, error),
853 g_cclosure_marshal_generic,
858 * GSignondDbusRemotePluginV1::user-action-required:
859 * @object: A #GSignondDbusRemotePluginV1.
860 * @arg_uiData: Argument.
862 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionRequired">"userActionRequired"</link> is received.
864 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
866 g_signal_new ("user-action-required",
867 G_TYPE_FROM_INTERFACE (iface),
869 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, user_action_required),
872 g_cclosure_marshal_generic,
877 * GSignondDbusRemotePluginV1::refreshed:
878 * @object: A #GSignondDbusRemotePluginV1.
879 * @arg_uiData: Argument.
881 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refreshed">"refreshed"</link> is received.
883 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
885 g_signal_new ("refreshed",
886 G_TYPE_FROM_INTERFACE (iface),
888 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, refreshed),
891 g_cclosure_marshal_generic,
896 * GSignondDbusRemotePluginV1::status-changed:
897 * @object: A #GSignondDbusRemotePluginV1.
898 * @arg_state: Argument.
899 * @arg_message: Argument.
901 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.statusChanged">"statusChanged"</link> is received.
903 * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
905 g_signal_new ("status-changed",
906 G_TYPE_FROM_INTERFACE (iface),
908 G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, status_changed),
911 g_cclosure_marshal_generic,
913 2, G_TYPE_INT, G_TYPE_STRING);
915 /* GObject properties for D-Bus properties: */
917 * GSignondDbusRemotePluginV1:method:
919 * Represents the D-Bus property <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link>.
921 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
923 g_object_interface_install_property (iface,
924 g_param_spec_string ("method", "method", "method", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
926 * GSignondDbusRemotePluginV1:mechanisms:
928 * Represents the D-Bus property <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link>.
930 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
932 g_object_interface_install_property (iface,
933 g_param_spec_boxed ("mechanisms", "mechanisms", "mechanisms", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
936 typedef GSignondDbusRemotePluginV1Iface GSignondDbusRemotePluginV1Interface;
937 G_DEFINE_INTERFACE (GSignondDbusRemotePluginV1, gsignond_dbus_remote_plugin_v1, G_TYPE_OBJECT);
940 * gsignond_dbus_remote_plugin_v1_get_method: (skip)
941 * @object: A #GSignondDbusRemotePluginV1.
943 * Gets the value of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property.
945 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
947 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_method() if on another thread.</warning>
949 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
952 gsignond_dbus_remote_plugin_v1_get_method (GSignondDbusRemotePluginV1 *object)
954 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_method (object);
958 * gsignond_dbus_remote_plugin_v1_dup_method: (skip)
959 * @object: A #GSignondDbusRemotePluginV1.
961 * Gets a copy of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property.
963 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
965 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
968 gsignond_dbus_remote_plugin_v1_dup_method (GSignondDbusRemotePluginV1 *object)
971 g_object_get (G_OBJECT (object), "method", &value, NULL);
976 * gsignond_dbus_remote_plugin_v1_set_method: (skip)
977 * @object: A #GSignondDbusRemotePluginV1.
978 * @value: The value to set.
980 * Sets the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property to @value.
982 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
985 gsignond_dbus_remote_plugin_v1_set_method (GSignondDbusRemotePluginV1 *object, const gchar *value)
987 g_object_set (G_OBJECT (object), "method", value, NULL);
991 * gsignond_dbus_remote_plugin_v1_get_mechanisms: (skip)
992 * @object: A #GSignondDbusRemotePluginV1.
994 * Gets the value of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property.
996 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
998 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_mechanisms() if on another thread.</warning>
1000 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1002 const gchar *const *
1003 gsignond_dbus_remote_plugin_v1_get_mechanisms (GSignondDbusRemotePluginV1 *object)
1005 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_mechanisms (object);
1009 * gsignond_dbus_remote_plugin_v1_dup_mechanisms: (skip)
1010 * @object: A #GSignondDbusRemotePluginV1.
1012 * Gets a copy of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property.
1014 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1016 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
1019 gsignond_dbus_remote_plugin_v1_dup_mechanisms (GSignondDbusRemotePluginV1 *object)
1022 g_object_get (G_OBJECT (object), "mechanisms", &value, NULL);
1027 * gsignond_dbus_remote_plugin_v1_set_mechanisms: (skip)
1028 * @object: A #GSignondDbusRemotePluginV1.
1029 * @value: The value to set.
1031 * Sets the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property to @value.
1033 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1036 gsignond_dbus_remote_plugin_v1_set_mechanisms (GSignondDbusRemotePluginV1 *object, const gchar *const *value)
1038 g_object_set (G_OBJECT (object), "mechanisms", value, NULL);
1042 * gsignond_dbus_remote_plugin_v1_emit_response:
1043 * @object: A #GSignondDbusRemotePluginV1.
1044 * @arg_sessionData: Argument to pass with the signal.
1046 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.response">"response"</link> D-Bus signal.
1049 gsignond_dbus_remote_plugin_v1_emit_response (
1050 GSignondDbusRemotePluginV1 *object,
1051 GVariant *arg_sessionData)
1053 g_signal_emit_by_name (object, "response", arg_sessionData);
1057 * gsignond_dbus_remote_plugin_v1_emit_response_final:
1058 * @object: A #GSignondDbusRemotePluginV1.
1059 * @arg_sessionData: Argument to pass with the signal.
1061 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.responseFinal">"responseFinal"</link> D-Bus signal.
1064 gsignond_dbus_remote_plugin_v1_emit_response_final (
1065 GSignondDbusRemotePluginV1 *object,
1066 GVariant *arg_sessionData)
1068 g_signal_emit_by_name (object, "response-final", arg_sessionData);
1072 * gsignond_dbus_remote_plugin_v1_emit_store:
1073 * @object: A #GSignondDbusRemotePluginV1.
1074 * @arg_sessionData: Argument to pass with the signal.
1076 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.store">"store"</link> D-Bus signal.
1079 gsignond_dbus_remote_plugin_v1_emit_store (
1080 GSignondDbusRemotePluginV1 *object,
1081 GVariant *arg_sessionData)
1083 g_signal_emit_by_name (object, "store", arg_sessionData);
1087 * gsignond_dbus_remote_plugin_v1_emit_error:
1088 * @object: A #GSignondDbusRemotePluginV1.
1089 * @arg_error: Argument to pass with the signal.
1091 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.error">"error"</link> D-Bus signal.
1094 gsignond_dbus_remote_plugin_v1_emit_error (
1095 GSignondDbusRemotePluginV1 *object,
1096 GVariant *arg_error)
1098 g_signal_emit_by_name (object, "error", arg_error);
1102 * gsignond_dbus_remote_plugin_v1_emit_user_action_required:
1103 * @object: A #GSignondDbusRemotePluginV1.
1104 * @arg_uiData: Argument to pass with the signal.
1106 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionRequired">"userActionRequired"</link> D-Bus signal.
1109 gsignond_dbus_remote_plugin_v1_emit_user_action_required (
1110 GSignondDbusRemotePluginV1 *object,
1111 GVariant *arg_uiData)
1113 g_signal_emit_by_name (object, "user-action-required", arg_uiData);
1117 * gsignond_dbus_remote_plugin_v1_emit_refreshed:
1118 * @object: A #GSignondDbusRemotePluginV1.
1119 * @arg_uiData: Argument to pass with the signal.
1121 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refreshed">"refreshed"</link> D-Bus signal.
1124 gsignond_dbus_remote_plugin_v1_emit_refreshed (
1125 GSignondDbusRemotePluginV1 *object,
1126 GVariant *arg_uiData)
1128 g_signal_emit_by_name (object, "refreshed", arg_uiData);
1132 * gsignond_dbus_remote_plugin_v1_emit_status_changed:
1133 * @object: A #GSignondDbusRemotePluginV1.
1134 * @arg_state: Argument to pass with the signal.
1135 * @arg_message: Argument to pass with the signal.
1137 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.statusChanged">"statusChanged"</link> D-Bus signal.
1140 gsignond_dbus_remote_plugin_v1_emit_status_changed (
1141 GSignondDbusRemotePluginV1 *object,
1143 const gchar *arg_message)
1145 g_signal_emit_by_name (object, "status-changed", arg_state, arg_message);
1149 * gsignond_dbus_remote_plugin_v1_call_cancel:
1150 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1151 * @cancellable: (allow-none): A #GCancellable or %NULL.
1152 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1153 * @user_data: User data to pass to @callback.
1155 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method on @proxy.
1156 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1157 * You can then call gsignond_dbus_remote_plugin_v1_call_cancel_finish() to get the result of the operation.
1159 * See gsignond_dbus_remote_plugin_v1_call_cancel_sync() for the synchronous, blocking version of this method.
1162 gsignond_dbus_remote_plugin_v1_call_cancel (
1163 GSignondDbusRemotePluginV1 *proxy,
1164 GCancellable *cancellable,
1165 GAsyncReadyCallback callback,
1168 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1170 g_variant_new ("()"),
1171 G_DBUS_CALL_FLAGS_NONE,
1179 * gsignond_dbus_remote_plugin_v1_call_cancel_finish:
1180 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1181 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_cancel().
1182 * @error: Return location for error or %NULL.
1184 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_cancel().
1186 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1189 gsignond_dbus_remote_plugin_v1_call_cancel_finish (
1190 GSignondDbusRemotePluginV1 *proxy,
1195 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1198 g_variant_get (_ret,
1200 g_variant_unref (_ret);
1202 return _ret != NULL;
1206 * gsignond_dbus_remote_plugin_v1_call_cancel_sync:
1207 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1208 * @cancellable: (allow-none): A #GCancellable or %NULL.
1209 * @error: Return location for error or %NULL.
1211 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1213 * See gsignond_dbus_remote_plugin_v1_call_cancel() for the asynchronous version of this method.
1215 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1218 gsignond_dbus_remote_plugin_v1_call_cancel_sync (
1219 GSignondDbusRemotePluginV1 *proxy,
1220 GCancellable *cancellable,
1224 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1226 g_variant_new ("()"),
1227 G_DBUS_CALL_FLAGS_NONE,
1233 g_variant_get (_ret,
1235 g_variant_unref (_ret);
1237 return _ret != NULL;
1241 * gsignond_dbus_remote_plugin_v1_call_request_initial:
1242 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1243 * @arg_sessionData: Argument to pass with the method invocation.
1244 * @arg_identityMethodCache: Argument to pass with the method invocation.
1245 * @arg_mechanism: Argument to pass with the method invocation.
1246 * @cancellable: (allow-none): A #GCancellable or %NULL.
1247 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1248 * @user_data: User data to pass to @callback.
1250 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method on @proxy.
1251 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1252 * You can then call gsignond_dbus_remote_plugin_v1_call_request_initial_finish() to get the result of the operation.
1254 * See gsignond_dbus_remote_plugin_v1_call_request_initial_sync() for the synchronous, blocking version of this method.
1257 gsignond_dbus_remote_plugin_v1_call_request_initial (
1258 GSignondDbusRemotePluginV1 *proxy,
1259 GVariant *arg_sessionData,
1260 GVariant *arg_identityMethodCache,
1261 const gchar *arg_mechanism,
1262 GCancellable *cancellable,
1263 GAsyncReadyCallback callback,
1266 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1268 g_variant_new ("(@a{sv}@a{sv}s)",
1270 arg_identityMethodCache,
1272 G_DBUS_CALL_FLAGS_NONE,
1280 * gsignond_dbus_remote_plugin_v1_call_request_initial_finish:
1281 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1282 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request_initial().
1283 * @error: Return location for error or %NULL.
1285 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request_initial().
1287 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1290 gsignond_dbus_remote_plugin_v1_call_request_initial_finish (
1291 GSignondDbusRemotePluginV1 *proxy,
1296 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1299 g_variant_get (_ret,
1301 g_variant_unref (_ret);
1303 return _ret != NULL;
1307 * gsignond_dbus_remote_plugin_v1_call_request_initial_sync:
1308 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1309 * @arg_sessionData: Argument to pass with the method invocation.
1310 * @arg_identityMethodCache: Argument to pass with the method invocation.
1311 * @arg_mechanism: Argument to pass with the method invocation.
1312 * @cancellable: (allow-none): A #GCancellable or %NULL.
1313 * @error: Return location for error or %NULL.
1315 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1317 * See gsignond_dbus_remote_plugin_v1_call_request_initial() for the asynchronous version of this method.
1319 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1322 gsignond_dbus_remote_plugin_v1_call_request_initial_sync (
1323 GSignondDbusRemotePluginV1 *proxy,
1324 GVariant *arg_sessionData,
1325 GVariant *arg_identityMethodCache,
1326 const gchar *arg_mechanism,
1327 GCancellable *cancellable,
1331 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1333 g_variant_new ("(@a{sv}@a{sv}s)",
1335 arg_identityMethodCache,
1337 G_DBUS_CALL_FLAGS_NONE,
1343 g_variant_get (_ret,
1345 g_variant_unref (_ret);
1347 return _ret != NULL;
1351 * gsignond_dbus_remote_plugin_v1_call_request:
1352 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1353 * @arg_sessionData: Argument to pass with the method invocation.
1354 * @cancellable: (allow-none): A #GCancellable or %NULL.
1355 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1356 * @user_data: User data to pass to @callback.
1358 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method on @proxy.
1359 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1360 * You can then call gsignond_dbus_remote_plugin_v1_call_request_finish() to get the result of the operation.
1362 * See gsignond_dbus_remote_plugin_v1_call_request_sync() for the synchronous, blocking version of this method.
1365 gsignond_dbus_remote_plugin_v1_call_request (
1366 GSignondDbusRemotePluginV1 *proxy,
1367 GVariant *arg_sessionData,
1368 GCancellable *cancellable,
1369 GAsyncReadyCallback callback,
1372 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1374 g_variant_new ("(@a{sv})",
1376 G_DBUS_CALL_FLAGS_NONE,
1384 * gsignond_dbus_remote_plugin_v1_call_request_finish:
1385 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1386 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request().
1387 * @error: Return location for error or %NULL.
1389 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request().
1391 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1394 gsignond_dbus_remote_plugin_v1_call_request_finish (
1395 GSignondDbusRemotePluginV1 *proxy,
1400 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1403 g_variant_get (_ret,
1405 g_variant_unref (_ret);
1407 return _ret != NULL;
1411 * gsignond_dbus_remote_plugin_v1_call_request_sync:
1412 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1413 * @arg_sessionData: Argument to pass with the method invocation.
1414 * @cancellable: (allow-none): A #GCancellable or %NULL.
1415 * @error: Return location for error or %NULL.
1417 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1419 * See gsignond_dbus_remote_plugin_v1_call_request() for the asynchronous version of this method.
1421 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1424 gsignond_dbus_remote_plugin_v1_call_request_sync (
1425 GSignondDbusRemotePluginV1 *proxy,
1426 GVariant *arg_sessionData,
1427 GCancellable *cancellable,
1431 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1433 g_variant_new ("(@a{sv})",
1435 G_DBUS_CALL_FLAGS_NONE,
1441 g_variant_get (_ret,
1443 g_variant_unref (_ret);
1445 return _ret != NULL;
1449 * gsignond_dbus_remote_plugin_v1_call_user_action_finished:
1450 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1451 * @arg_uiData: Argument to pass with the method invocation.
1452 * @cancellable: (allow-none): A #GCancellable or %NULL.
1453 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1454 * @user_data: User data to pass to @callback.
1456 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method on @proxy.
1457 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1458 * You can then call gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish() to get the result of the operation.
1460 * See gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync() for the synchronous, blocking version of this method.
1463 gsignond_dbus_remote_plugin_v1_call_user_action_finished (
1464 GSignondDbusRemotePluginV1 *proxy,
1465 GVariant *arg_uiData,
1466 GCancellable *cancellable,
1467 GAsyncReadyCallback callback,
1470 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1471 "userActionFinished",
1472 g_variant_new ("(@a{sv})",
1474 G_DBUS_CALL_FLAGS_NONE,
1482 * gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish:
1483 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1484 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_user_action_finished().
1485 * @error: Return location for error or %NULL.
1487 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_user_action_finished().
1489 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1492 gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish (
1493 GSignondDbusRemotePluginV1 *proxy,
1498 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1501 g_variant_get (_ret,
1503 g_variant_unref (_ret);
1505 return _ret != NULL;
1509 * gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync:
1510 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1511 * @arg_uiData: Argument to pass with the method invocation.
1512 * @cancellable: (allow-none): A #GCancellable or %NULL.
1513 * @error: Return location for error or %NULL.
1515 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1517 * See gsignond_dbus_remote_plugin_v1_call_user_action_finished() for the asynchronous version of this method.
1519 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1522 gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync (
1523 GSignondDbusRemotePluginV1 *proxy,
1524 GVariant *arg_uiData,
1525 GCancellable *cancellable,
1529 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1530 "userActionFinished",
1531 g_variant_new ("(@a{sv})",
1533 G_DBUS_CALL_FLAGS_NONE,
1539 g_variant_get (_ret,
1541 g_variant_unref (_ret);
1543 return _ret != NULL;
1547 * gsignond_dbus_remote_plugin_v1_call_refresh:
1548 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1549 * @arg_uiData: Argument to pass with the method invocation.
1550 * @cancellable: (allow-none): A #GCancellable or %NULL.
1551 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1552 * @user_data: User data to pass to @callback.
1554 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method on @proxy.
1555 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1556 * You can then call gsignond_dbus_remote_plugin_v1_call_refresh_finish() to get the result of the operation.
1558 * See gsignond_dbus_remote_plugin_v1_call_refresh_sync() for the synchronous, blocking version of this method.
1561 gsignond_dbus_remote_plugin_v1_call_refresh (
1562 GSignondDbusRemotePluginV1 *proxy,
1563 GVariant *arg_uiData,
1564 GCancellable *cancellable,
1565 GAsyncReadyCallback callback,
1568 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1570 g_variant_new ("(@a{sv})",
1572 G_DBUS_CALL_FLAGS_NONE,
1580 * gsignond_dbus_remote_plugin_v1_call_refresh_finish:
1581 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1582 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_refresh().
1583 * @error: Return location for error or %NULL.
1585 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_refresh().
1587 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1590 gsignond_dbus_remote_plugin_v1_call_refresh_finish (
1591 GSignondDbusRemotePluginV1 *proxy,
1596 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1599 g_variant_get (_ret,
1601 g_variant_unref (_ret);
1603 return _ret != NULL;
1607 * gsignond_dbus_remote_plugin_v1_call_refresh_sync:
1608 * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1609 * @arg_uiData: Argument to pass with the method invocation.
1610 * @cancellable: (allow-none): A #GCancellable or %NULL.
1611 * @error: Return location for error or %NULL.
1613 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1615 * See gsignond_dbus_remote_plugin_v1_call_refresh() for the asynchronous version of this method.
1617 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1620 gsignond_dbus_remote_plugin_v1_call_refresh_sync (
1621 GSignondDbusRemotePluginV1 *proxy,
1622 GVariant *arg_uiData,
1623 GCancellable *cancellable,
1627 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1629 g_variant_new ("(@a{sv})",
1631 G_DBUS_CALL_FLAGS_NONE,
1637 g_variant_get (_ret,
1639 g_variant_unref (_ret);
1641 return _ret != NULL;
1645 * gsignond_dbus_remote_plugin_v1_complete_cancel:
1646 * @object: A #GSignondDbusRemotePluginV1.
1647 * @invocation: (transfer full): A #GDBusMethodInvocation.
1649 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1651 * This method will free @invocation, you cannot use it afterwards.
1654 gsignond_dbus_remote_plugin_v1_complete_cancel (
1655 GSignondDbusRemotePluginV1 *object,
1656 GDBusMethodInvocation *invocation)
1658 g_dbus_method_invocation_return_value (invocation,
1659 g_variant_new ("()"));
1663 * gsignond_dbus_remote_plugin_v1_complete_request_initial:
1664 * @object: A #GSignondDbusRemotePluginV1.
1665 * @invocation: (transfer full): A #GDBusMethodInvocation.
1667 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1669 * This method will free @invocation, you cannot use it afterwards.
1672 gsignond_dbus_remote_plugin_v1_complete_request_initial (
1673 GSignondDbusRemotePluginV1 *object,
1674 GDBusMethodInvocation *invocation)
1676 g_dbus_method_invocation_return_value (invocation,
1677 g_variant_new ("()"));
1681 * gsignond_dbus_remote_plugin_v1_complete_request:
1682 * @object: A #GSignondDbusRemotePluginV1.
1683 * @invocation: (transfer full): A #GDBusMethodInvocation.
1685 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1687 * This method will free @invocation, you cannot use it afterwards.
1690 gsignond_dbus_remote_plugin_v1_complete_request (
1691 GSignondDbusRemotePluginV1 *object,
1692 GDBusMethodInvocation *invocation)
1694 g_dbus_method_invocation_return_value (invocation,
1695 g_variant_new ("()"));
1699 * gsignond_dbus_remote_plugin_v1_complete_user_action_finished:
1700 * @object: A #GSignondDbusRemotePluginV1.
1701 * @invocation: (transfer full): A #GDBusMethodInvocation.
1703 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1705 * This method will free @invocation, you cannot use it afterwards.
1708 gsignond_dbus_remote_plugin_v1_complete_user_action_finished (
1709 GSignondDbusRemotePluginV1 *object,
1710 GDBusMethodInvocation *invocation)
1712 g_dbus_method_invocation_return_value (invocation,
1713 g_variant_new ("()"));
1717 * gsignond_dbus_remote_plugin_v1_complete_refresh:
1718 * @object: A #GSignondDbusRemotePluginV1.
1719 * @invocation: (transfer full): A #GDBusMethodInvocation.
1721 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1723 * This method will free @invocation, you cannot use it afterwards.
1726 gsignond_dbus_remote_plugin_v1_complete_refresh (
1727 GSignondDbusRemotePluginV1 *object,
1728 GDBusMethodInvocation *invocation)
1730 g_dbus_method_invocation_return_value (invocation,
1731 g_variant_new ("()"));
1734 /* ------------------------------------------------------------------------ */
1737 * GSignondDbusRemotePluginV1Proxy:
1739 * The #GSignondDbusRemotePluginV1Proxy structure contains only private data and should only be accessed using the provided API.
1743 * GSignondDbusRemotePluginV1ProxyClass:
1744 * @parent_class: The parent class.
1746 * Class structure for #GSignondDbusRemotePluginV1Proxy.
1749 struct _GSignondDbusRemotePluginV1ProxyPrivate
1754 static void gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface);
1756 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Proxy, gsignond_dbus_remote_plugin_v1_proxy, G_TYPE_DBUS_PROXY,
1757 G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_proxy_iface_init));
1760 gsignond_dbus_remote_plugin_v1_proxy_finalize (GObject *object)
1762 GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1763 g_datalist_clear (&proxy->priv->qdata);
1764 G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_proxy_parent_class)->finalize (object);
1768 gsignond_dbus_remote_plugin_v1_proxy_get_property (GObject *object,
1773 const _ExtendedGDBusPropertyInfo *info;
1775 g_assert (prop_id != 0 && prop_id - 1 < 2);
1776 info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1];
1777 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
1778 if (info->use_gvariant)
1780 g_value_set_variant (value, variant);
1784 if (variant != NULL)
1785 g_dbus_gvariant_to_gvalue (variant, value);
1787 if (variant != NULL)
1788 g_variant_unref (variant);
1792 gsignond_dbus_remote_plugin_v1_proxy_set_property_cb (GDBusProxy *proxy,
1796 const _ExtendedGDBusPropertyInfo *info = user_data;
1799 if (!g_dbus_proxy_call_finish (proxy, res, &error))
1801 g_warning ("Error setting property `%s' on interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1: %s (%s, %d)",
1802 info->parent_struct.name,
1803 error->message, g_quark_to_string (error->domain), error->code);
1804 g_error_free (error);
1809 gsignond_dbus_remote_plugin_v1_proxy_set_property (GObject *object,
1811 const GValue *value,
1814 const _ExtendedGDBusPropertyInfo *info;
1816 g_assert (prop_id != 0 && prop_id - 1 < 2);
1817 info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1];
1818 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
1819 g_dbus_proxy_call (G_DBUS_PROXY (object),
1820 "org.freedesktop.DBus.Properties.Set",
1821 g_variant_new ("(ssv)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->parent_struct.name, variant),
1822 G_DBUS_CALL_FLAGS_NONE,
1824 NULL, (GAsyncReadyCallback) gsignond_dbus_remote_plugin_v1_proxy_set_property_cb, (gpointer) info);
1825 g_variant_unref (variant);
1829 gsignond_dbus_remote_plugin_v1_proxy_g_signal (GDBusProxy *proxy,
1830 const gchar *sender_name,
1831 const gchar *signal_name,
1832 GVariant *parameters)
1834 _ExtendedGDBusSignalInfo *info;
1841 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, signal_name);
1844 num_params = g_variant_n_children (parameters);
1845 paramv = g_new0 (GValue, num_params + 1);
1846 g_value_init (¶mv[0], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
1847 g_value_set_object (¶mv[0], proxy);
1848 g_variant_iter_init (&iter, parameters);
1850 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1852 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1853 if (arg_info->use_gvariant)
1855 g_value_init (¶mv[n], G_TYPE_VARIANT);
1856 g_value_set_variant (¶mv[n], child);
1860 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1861 g_variant_unref (child);
1863 signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
1864 g_signal_emitv (paramv, signal_id, 0, NULL);
1865 for (n = 0; n < num_params + 1; n++)
1866 g_value_unset (¶mv[n]);
1871 gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed (GDBusProxy *_proxy,
1872 GVariant *changed_properties,
1873 const gchar *const *invalidated_properties)
1875 GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (_proxy);
1879 _ExtendedGDBusPropertyInfo *info;
1880 g_variant_get (changed_properties, "a{sv}", &iter);
1881 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1883 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, key);
1884 g_datalist_remove_data (&proxy->priv->qdata, key);
1886 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1888 g_variant_iter_free (iter);
1889 for (n = 0; invalidated_properties[n] != NULL; n++)
1891 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, invalidated_properties[n]);
1892 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1894 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1898 static const gchar *
1899 gsignond_dbus_remote_plugin_v1_proxy_get_method (GSignondDbusRemotePluginV1 *object)
1901 GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1903 const gchar *value = NULL;
1904 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "method");
1905 if (variant != NULL)
1907 value = g_variant_get_string (variant, NULL);
1908 g_variant_unref (variant);
1913 static const gchar *const *
1914 gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms (GSignondDbusRemotePluginV1 *object)
1916 GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1918 const gchar *const *value = NULL;
1919 value = g_datalist_get_data (&proxy->priv->qdata, "mechanisms");
1922 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "mechanisms");
1923 if (variant != NULL)
1925 value = g_variant_get_strv (variant, NULL);
1926 g_datalist_set_data_full (&proxy->priv->qdata, "mechanisms", (gpointer) value, g_free);
1927 g_variant_unref (variant);
1933 gsignond_dbus_remote_plugin_v1_proxy_init (GSignondDbusRemotePluginV1Proxy *proxy)
1935 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1ProxyPrivate);
1936 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_remote_plugin_v1_interface_info ());
1940 gsignond_dbus_remote_plugin_v1_proxy_class_init (GSignondDbusRemotePluginV1ProxyClass *klass)
1942 GObjectClass *gobject_class;
1943 GDBusProxyClass *proxy_class;
1945 g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1ProxyPrivate));
1947 gobject_class = G_OBJECT_CLASS (klass);
1948 gobject_class->finalize = gsignond_dbus_remote_plugin_v1_proxy_finalize;
1949 gobject_class->get_property = gsignond_dbus_remote_plugin_v1_proxy_get_property;
1950 gobject_class->set_property = gsignond_dbus_remote_plugin_v1_proxy_set_property;
1952 proxy_class = G_DBUS_PROXY_CLASS (klass);
1953 proxy_class->g_signal = gsignond_dbus_remote_plugin_v1_proxy_g_signal;
1954 proxy_class->g_properties_changed = gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed;
1957 gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1);
1961 gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface)
1963 iface->get_method = gsignond_dbus_remote_plugin_v1_proxy_get_method;
1964 iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms;
1968 * gsignond_dbus_remote_plugin_v1_proxy_new:
1969 * @connection: A #GDBusConnection.
1970 * @flags: Flags from the #GDBusProxyFlags enumeration.
1971 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1972 * @object_path: An object path.
1973 * @cancellable: (allow-none): A #GCancellable or %NULL.
1974 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1975 * @user_data: User data to pass to @callback.
1977 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>. See g_dbus_proxy_new() for more details.
1979 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1980 * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_finish() to get the result of the operation.
1982 * See gsignond_dbus_remote_plugin_v1_proxy_new_sync() for the synchronous, blocking version of this constructor.
1985 gsignond_dbus_remote_plugin_v1_proxy_new (
1986 GDBusConnection *connection,
1987 GDBusProxyFlags flags,
1989 const gchar *object_path,
1990 GCancellable *cancellable,
1991 GAsyncReadyCallback callback,
1994 g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
1998 * gsignond_dbus_remote_plugin_v1_proxy_new_finish:
1999 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new().
2000 * @error: Return location for error or %NULL
2002 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new().
2004 * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2006 GSignondDbusRemotePluginV1 *
2007 gsignond_dbus_remote_plugin_v1_proxy_new_finish (
2012 GObject *source_object;
2013 source_object = g_async_result_get_source_object (res);
2014 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
2015 g_object_unref (source_object);
2017 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2023 * gsignond_dbus_remote_plugin_v1_proxy_new_sync:
2024 * @connection: A #GDBusConnection.
2025 * @flags: Flags from the #GDBusProxyFlags enumeration.
2026 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
2027 * @object_path: An object path.
2028 * @cancellable: (allow-none): A #GCancellable or %NULL.
2029 * @error: Return location for error or %NULL
2031 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>. See g_dbus_proxy_new_sync() for more details.
2033 * The calling thread is blocked until a reply is received.
2035 * See gsignond_dbus_remote_plugin_v1_proxy_new() for the asynchronous version of this constructor.
2037 * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2039 GSignondDbusRemotePluginV1 *
2040 gsignond_dbus_remote_plugin_v1_proxy_new_sync (
2041 GDBusConnection *connection,
2042 GDBusProxyFlags flags,
2044 const gchar *object_path,
2045 GCancellable *cancellable,
2049 ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2051 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2058 * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus:
2059 * @bus_type: A #GBusType.
2060 * @flags: Flags from the #GDBusProxyFlags enumeration.
2061 * @name: A bus name (well-known or unique).
2062 * @object_path: An object path.
2063 * @cancellable: (allow-none): A #GCancellable or %NULL.
2064 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
2065 * @user_data: User data to pass to @callback.
2067 * Like gsignond_dbus_remote_plugin_v1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
2069 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
2070 * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish() to get the result of the operation.
2072 * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
2075 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus (
2077 GDBusProxyFlags flags,
2079 const gchar *object_path,
2080 GCancellable *cancellable,
2081 GAsyncReadyCallback callback,
2084 g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2088 * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish:
2089 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new_for_bus().
2090 * @error: Return location for error or %NULL
2092 * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new_for_bus().
2094 * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2096 GSignondDbusRemotePluginV1 *
2097 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish (
2102 GObject *source_object;
2103 source_object = g_async_result_get_source_object (res);
2104 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
2105 g_object_unref (source_object);
2107 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2113 * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync:
2114 * @bus_type: A #GBusType.
2115 * @flags: Flags from the #GDBusProxyFlags enumeration.
2116 * @name: A bus name (well-known or unique).
2117 * @object_path: An object path.
2118 * @cancellable: (allow-none): A #GCancellable or %NULL.
2119 * @error: Return location for error or %NULL
2121 * Like gsignond_dbus_remote_plugin_v1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
2123 * The calling thread is blocked until a reply is received.
2125 * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus() for the asynchronous version of this constructor.
2127 * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2129 GSignondDbusRemotePluginV1 *
2130 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync (
2132 GDBusProxyFlags flags,
2134 const gchar *object_path,
2135 GCancellable *cancellable,
2139 ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2141 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2147 /* ------------------------------------------------------------------------ */
2150 * GSignondDbusRemotePluginV1Skeleton:
2152 * The #GSignondDbusRemotePluginV1Skeleton structure contains only private data and should only be accessed using the provided API.
2156 * GSignondDbusRemotePluginV1SkeletonClass:
2157 * @parent_class: The parent class.
2159 * Class structure for #GSignondDbusRemotePluginV1Skeleton.
2162 struct _GSignondDbusRemotePluginV1SkeletonPrivate
2165 GList *changed_properties;
2166 GSource *changed_properties_idle_source;
2167 GMainContext *context;
2172 _gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call (
2173 GDBusConnection *connection,
2174 const gchar *sender,
2175 const gchar *object_path,
2176 const gchar *interface_name,
2177 const gchar *method_name,
2178 GVariant *parameters,
2179 GDBusMethodInvocation *invocation,
2182 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2183 _ExtendedGDBusMethodInfo *info;
2191 GValue return_value = G_VALUE_INIT;
2192 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
2193 g_assert (info != NULL);
2194 num_params = g_variant_n_children (parameters);
2195 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
2197 g_value_init (¶mv[n], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
2198 g_value_set_object (¶mv[n++], skeleton);
2199 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
2200 g_value_set_object (¶mv[n++], invocation);
2201 if (info->pass_fdlist)
2204 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
2205 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
2207 g_assert_not_reached ();
2210 g_variant_iter_init (&iter, parameters);
2211 while ((child = g_variant_iter_next_value (&iter)) != NULL)
2213 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
2214 if (arg_info->use_gvariant)
2216 g_value_init (¶mv[n], G_TYPE_VARIANT);
2217 g_value_set_variant (¶mv[n], child);
2221 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
2222 g_variant_unref (child);
2224 signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
2225 g_value_init (&return_value, G_TYPE_BOOLEAN);
2226 g_signal_emitv (paramv, signal_id, 0, &return_value);
2227 if (!g_value_get_boolean (&return_value))
2228 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
2229 g_value_unset (&return_value);
2230 for (n = 0; n < num_params + num_extra; n++)
2231 g_value_unset (¶mv[n]);
2236 _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property (
2237 GDBusConnection *connection,
2238 const gchar *sender,
2239 const gchar *object_path,
2240 const gchar *interface_name,
2241 const gchar *property_name,
2245 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2246 GValue value = G_VALUE_INIT;
2248 _ExtendedGDBusPropertyInfo *info;
2251 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name);
2252 g_assert (info != NULL);
2253 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2256 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2260 g_value_init (&value, pspec->value_type);
2261 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2262 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
2263 g_value_unset (&value);
2269 _gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property (
2270 GDBusConnection *connection,
2271 const gchar *sender,
2272 const gchar *object_path,
2273 const gchar *interface_name,
2274 const gchar *property_name,
2279 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2280 GValue value = G_VALUE_INIT;
2282 _ExtendedGDBusPropertyInfo *info;
2285 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name);
2286 g_assert (info != NULL);
2287 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2290 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2294 if (info->use_gvariant)
2295 g_value_set_variant (&value, variant);
2297 g_dbus_gvariant_to_gvalue (variant, &value);
2298 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2299 g_value_unset (&value);
2305 static const GDBusInterfaceVTable _gsignond_dbus_remote_plugin_v1_skeleton_vtable =
2307 _gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call,
2308 _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property,
2309 _gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property
2312 static GDBusInterfaceInfo *
2313 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
2315 return gsignond_dbus_remote_plugin_v1_interface_info ();
2318 static GDBusInterfaceVTable *
2319 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
2321 return (GDBusInterfaceVTable *) &_gsignond_dbus_remote_plugin_v1_skeleton_vtable;
2325 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
2327 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton);
2329 GVariantBuilder builder;
2331 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2332 if (_gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties == NULL)
2334 for (n = 0; _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n] != NULL; n++)
2336 GDBusPropertyInfo *info = _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n];
2337 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
2340 value = _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->name, NULL, skeleton);
2343 g_variant_take_ref (value);
2344 g_variant_builder_add (&builder, "{sv}", info->name, value);
2345 g_variant_unref (value);
2350 return g_variant_builder_end (&builder);
2353 static gboolean _gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data);
2356 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
2358 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton);
2359 gboolean emit_changed = FALSE;
2361 g_mutex_lock (&skeleton->priv->lock);
2362 if (skeleton->priv->changed_properties_idle_source != NULL)
2364 g_source_destroy (skeleton->priv->changed_properties_idle_source);
2365 skeleton->priv->changed_properties_idle_source = NULL;
2366 emit_changed = TRUE;
2368 g_mutex_unlock (&skeleton->priv->lock);
2371 _gsignond_dbus_remote_plugin_v1_emit_changed (skeleton);
2375 _gsignond_dbus_remote_plugin_v1_on_signal_response (
2376 GSignondDbusRemotePluginV1 *object,
2377 GVariant *arg_sessionData)
2379 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2381 GList *connections, *l;
2382 GVariant *signal_variant;
2383 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2385 signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2387 for (l = connections; l != NULL; l = l->next)
2389 GDBusConnection *connection = l->data;
2390 g_dbus_connection_emit_signal (connection,
2391 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "response",
2392 signal_variant, NULL);
2394 g_variant_unref (signal_variant);
2395 g_list_free_full (connections, g_object_unref);
2399 _gsignond_dbus_remote_plugin_v1_on_signal_response_final (
2400 GSignondDbusRemotePluginV1 *object,
2401 GVariant *arg_sessionData)
2403 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2405 GList *connections, *l;
2406 GVariant *signal_variant;
2407 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2409 signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2411 for (l = connections; l != NULL; l = l->next)
2413 GDBusConnection *connection = l->data;
2414 g_dbus_connection_emit_signal (connection,
2415 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "responseFinal",
2416 signal_variant, NULL);
2418 g_variant_unref (signal_variant);
2419 g_list_free_full (connections, g_object_unref);
2423 _gsignond_dbus_remote_plugin_v1_on_signal_store (
2424 GSignondDbusRemotePluginV1 *object,
2425 GVariant *arg_sessionData)
2427 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2429 GList *connections, *l;
2430 GVariant *signal_variant;
2431 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2433 signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2435 for (l = connections; l != NULL; l = l->next)
2437 GDBusConnection *connection = l->data;
2438 g_dbus_connection_emit_signal (connection,
2439 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "store",
2440 signal_variant, NULL);
2442 g_variant_unref (signal_variant);
2443 g_list_free_full (connections, g_object_unref);
2447 _gsignond_dbus_remote_plugin_v1_on_signal_error (
2448 GSignondDbusRemotePluginV1 *object,
2449 GVariant *arg_error)
2451 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2453 GList *connections, *l;
2454 GVariant *signal_variant;
2455 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2457 signal_variant = g_variant_ref_sink (g_variant_new ("(@(uis))",
2459 for (l = connections; l != NULL; l = l->next)
2461 GDBusConnection *connection = l->data;
2462 g_dbus_connection_emit_signal (connection,
2463 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "error",
2464 signal_variant, NULL);
2466 g_variant_unref (signal_variant);
2467 g_list_free_full (connections, g_object_unref);
2471 _gsignond_dbus_remote_plugin_v1_on_signal_user_action_required (
2472 GSignondDbusRemotePluginV1 *object,
2473 GVariant *arg_uiData)
2475 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2477 GList *connections, *l;
2478 GVariant *signal_variant;
2479 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2481 signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2483 for (l = connections; l != NULL; l = l->next)
2485 GDBusConnection *connection = l->data;
2486 g_dbus_connection_emit_signal (connection,
2487 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "userActionRequired",
2488 signal_variant, NULL);
2490 g_variant_unref (signal_variant);
2491 g_list_free_full (connections, g_object_unref);
2495 _gsignond_dbus_remote_plugin_v1_on_signal_refreshed (
2496 GSignondDbusRemotePluginV1 *object,
2497 GVariant *arg_uiData)
2499 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2501 GList *connections, *l;
2502 GVariant *signal_variant;
2503 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2505 signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2507 for (l = connections; l != NULL; l = l->next)
2509 GDBusConnection *connection = l->data;
2510 g_dbus_connection_emit_signal (connection,
2511 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "refreshed",
2512 signal_variant, NULL);
2514 g_variant_unref (signal_variant);
2515 g_list_free_full (connections, g_object_unref);
2519 _gsignond_dbus_remote_plugin_v1_on_signal_status_changed (
2520 GSignondDbusRemotePluginV1 *object,
2522 const gchar *arg_message)
2524 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2526 GList *connections, *l;
2527 GVariant *signal_variant;
2528 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2530 signal_variant = g_variant_ref_sink (g_variant_new ("(is)",
2533 for (l = connections; l != NULL; l = l->next)
2535 GDBusConnection *connection = l->data;
2536 g_dbus_connection_emit_signal (connection,
2537 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "statusChanged",
2538 signal_variant, NULL);
2540 g_variant_unref (signal_variant);
2541 g_list_free_full (connections, g_object_unref);
2544 static void gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface);
2545 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Skeleton, gsignond_dbus_remote_plugin_v1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2546 G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_skeleton_iface_init));
2549 gsignond_dbus_remote_plugin_v1_skeleton_finalize (GObject *object)
2551 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2553 for (n = 0; n < 2; n++)
2554 g_value_unset (&skeleton->priv->properties[n]);
2555 g_free (skeleton->priv->properties);
2556 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2557 if (skeleton->priv->changed_properties_idle_source != NULL)
2558 g_source_destroy (skeleton->priv->changed_properties_idle_source);
2559 g_main_context_unref (skeleton->priv->context);
2560 g_mutex_clear (&skeleton->priv->lock);
2561 G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_skeleton_parent_class)->finalize (object);
2565 gsignond_dbus_remote_plugin_v1_skeleton_get_property (GObject *object,
2570 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2571 g_assert (prop_id != 0 && prop_id - 1 < 2);
2572 g_mutex_lock (&skeleton->priv->lock);
2573 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
2574 g_mutex_unlock (&skeleton->priv->lock);
2578 _gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data)
2580 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2582 GVariantBuilder builder;
2583 GVariantBuilder invalidated_builder;
2586 g_mutex_lock (&skeleton->priv->lock);
2587 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2588 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
2589 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
2591 ChangedProperty *cp = l->data;
2593 const GValue *cur_value;
2595 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
2596 if (!_g_value_equal (cur_value, &cp->orig_value))
2598 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
2599 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
2600 g_variant_unref (variant);
2604 if (num_changes > 0)
2606 GList *connections, *l;
2607 GVariant *signal_variant;
2608 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1",
2609 &builder, &invalidated_builder));
2610 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2611 for (l = connections; l != NULL; l = l->next)
2613 GDBusConnection *connection = l->data;
2615 g_dbus_connection_emit_signal (connection,
2616 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
2617 "org.freedesktop.DBus.Properties",
2618 "PropertiesChanged",
2622 g_variant_unref (signal_variant);
2623 g_list_free_full (connections, g_object_unref);
2627 g_variant_builder_clear (&builder);
2628 g_variant_builder_clear (&invalidated_builder);
2630 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2631 skeleton->priv->changed_properties = NULL;
2632 skeleton->priv->changed_properties_idle_source = NULL;
2633 g_mutex_unlock (&skeleton->priv->lock);
2638 _gsignond_dbus_remote_plugin_v1_schedule_emit_changed (GSignondDbusRemotePluginV1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
2640 ChangedProperty *cp;
2643 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
2645 ChangedProperty *i_cp = l->data;
2646 if (i_cp->info == info)
2654 cp = g_new0 (ChangedProperty, 1);
2655 cp->prop_id = prop_id;
2657 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
2658 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
2659 g_value_copy (orig_value, &cp->orig_value);
2664 gsignond_dbus_remote_plugin_v1_skeleton_notify (GObject *object,
2667 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2668 g_mutex_lock (&skeleton->priv->lock);
2669 if (skeleton->priv->changed_properties != NULL &&
2670 skeleton->priv->changed_properties_idle_source == NULL)
2672 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
2673 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
2674 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _gsignond_dbus_remote_plugin_v1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
2675 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
2676 g_source_unref (skeleton->priv->changed_properties_idle_source);
2678 g_mutex_unlock (&skeleton->priv->lock);
2682 gsignond_dbus_remote_plugin_v1_skeleton_set_property (GObject *object,
2684 const GValue *value,
2687 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2688 g_assert (prop_id != 0 && prop_id - 1 < 2);
2689 g_mutex_lock (&skeleton->priv->lock);
2690 g_object_freeze_notify (object);
2691 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
2693 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
2694 _gsignond_dbus_remote_plugin_v1_schedule_emit_changed (skeleton, _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
2695 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
2696 g_object_notify_by_pspec (object, pspec);
2698 g_mutex_unlock (&skeleton->priv->lock);
2699 g_object_thaw_notify (object);
2703 gsignond_dbus_remote_plugin_v1_skeleton_init (GSignondDbusRemotePluginV1Skeleton *skeleton)
2705 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1SkeletonPrivate);
2706 g_mutex_init (&skeleton->priv->lock);
2707 skeleton->priv->context = g_main_context_ref_thread_default ();
2708 skeleton->priv->properties = g_new0 (GValue, 2);
2709 g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
2710 g_value_init (&skeleton->priv->properties[1], G_TYPE_STRV);
2713 static const gchar *
2714 gsignond_dbus_remote_plugin_v1_skeleton_get_method (GSignondDbusRemotePluginV1 *object)
2716 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2718 g_mutex_lock (&skeleton->priv->lock);
2719 value = g_value_get_string (&(skeleton->priv->properties[0]));
2720 g_mutex_unlock (&skeleton->priv->lock);
2724 static const gchar *const *
2725 gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms (GSignondDbusRemotePluginV1 *object)
2727 GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2728 const gchar *const *value;
2729 g_mutex_lock (&skeleton->priv->lock);
2730 value = g_value_get_boxed (&(skeleton->priv->properties[1]));
2731 g_mutex_unlock (&skeleton->priv->lock);
2736 gsignond_dbus_remote_plugin_v1_skeleton_class_init (GSignondDbusRemotePluginV1SkeletonClass *klass)
2738 GObjectClass *gobject_class;
2739 GDBusInterfaceSkeletonClass *skeleton_class;
2741 g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1SkeletonPrivate));
2743 gobject_class = G_OBJECT_CLASS (klass);
2744 gobject_class->finalize = gsignond_dbus_remote_plugin_v1_skeleton_finalize;
2745 gobject_class->get_property = gsignond_dbus_remote_plugin_v1_skeleton_get_property;
2746 gobject_class->set_property = gsignond_dbus_remote_plugin_v1_skeleton_set_property;
2747 gobject_class->notify = gsignond_dbus_remote_plugin_v1_skeleton_notify;
2750 gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1);
2752 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
2753 skeleton_class->get_info = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info;
2754 skeleton_class->get_properties = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties;
2755 skeleton_class->flush = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush;
2756 skeleton_class->get_vtable = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable;
2760 gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface)
2762 iface->response = _gsignond_dbus_remote_plugin_v1_on_signal_response;
2763 iface->response_final = _gsignond_dbus_remote_plugin_v1_on_signal_response_final;
2764 iface->store = _gsignond_dbus_remote_plugin_v1_on_signal_store;
2765 iface->error = _gsignond_dbus_remote_plugin_v1_on_signal_error;
2766 iface->user_action_required = _gsignond_dbus_remote_plugin_v1_on_signal_user_action_required;
2767 iface->refreshed = _gsignond_dbus_remote_plugin_v1_on_signal_refreshed;
2768 iface->status_changed = _gsignond_dbus_remote_plugin_v1_on_signal_status_changed;
2769 iface->get_method = gsignond_dbus_remote_plugin_v1_skeleton_get_method;
2770 iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms;
2774 * gsignond_dbus_remote_plugin_v1_skeleton_new:
2776 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
2778 * Returns: (transfer full) (type GSignondDbusRemotePluginV1Skeleton): The skeleton object.
2780 GSignondDbusRemotePluginV1 *
2781 gsignond_dbus_remote_plugin_v1_skeleton_new (void)
2783 return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (g_object_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, NULL));