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-auth-session-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.AuthSession
153 * ------------------------------------------------------------------------
157 * SECTION:GSignondDbusAuthSession
158 * @title: GSignondDbusAuthSession
159 * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.AuthSession D-Bus interface
161 * This section contains code for working with the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link> D-Bus interface in C.
164 /* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.AuthSession ---- */
166 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_wantedMechanisms =
177 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_pointers[] =
179 &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_wantedMechanisms,
183 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_unnamed_arg1 =
194 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_pointers[] =
196 &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_unnamed_arg1,
200 static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_query_available_mechanisms =
204 "queryAvailableMechanisms",
205 (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_IN_ARG_pointers,
206 (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_query_available_mechanisms_OUT_ARG_pointers,
209 "handle-query-available-mechanisms",
213 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_process_IN_ARG_sessionDataVa =
224 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_process_IN_ARG_mechanism =
235 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_auth_session_method_info_process_IN_ARG_pointers[] =
237 &_gsignond_dbus_auth_session_method_info_process_IN_ARG_sessionDataVa,
238 &_gsignond_dbus_auth_session_method_info_process_IN_ARG_mechanism,
242 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_method_info_process_OUT_ARG_unnamed_arg2 =
253 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_auth_session_method_info_process_OUT_ARG_pointers[] =
255 &_gsignond_dbus_auth_session_method_info_process_OUT_ARG_unnamed_arg2,
259 static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_process =
264 (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_IN_ARG_pointers,
265 (GDBusArgInfo **) &_gsignond_dbus_auth_session_method_info_process_OUT_ARG_pointers,
272 static const GDBusAnnotationInfo _gsignond_dbus_auth_session_method_cancel_annotation_info_0 =
275 "org.freedesktop.DBus.Method.NoReply",
280 static const GDBusAnnotationInfo * const _gsignond_dbus_auth_session_method_cancel_annotation_info_pointers[] =
282 &_gsignond_dbus_auth_session_method_cancel_annotation_info_0,
286 static const _ExtendedGDBusMethodInfo _gsignond_dbus_auth_session_method_info_cancel =
293 (GDBusAnnotationInfo **) &_gsignond_dbus_auth_session_method_cancel_annotation_info_pointers
299 static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_auth_session_method_info_pointers[] =
301 &_gsignond_dbus_auth_session_method_info_query_available_mechanisms,
302 &_gsignond_dbus_auth_session_method_info_process,
303 &_gsignond_dbus_auth_session_method_info_cancel,
307 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state_changed_ARG_state =
318 static const _ExtendedGDBusArgInfo _gsignond_dbus_auth_session_signal_info_state_changed_ARG_message =
329 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_auth_session_signal_info_state_changed_ARG_pointers[] =
331 &_gsignond_dbus_auth_session_signal_info_state_changed_ARG_state,
332 &_gsignond_dbus_auth_session_signal_info_state_changed_ARG_message,
336 static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_state_changed =
341 (GDBusArgInfo **) &_gsignond_dbus_auth_session_signal_info_state_changed_ARG_pointers,
347 static const _ExtendedGDBusSignalInfo _gsignond_dbus_auth_session_signal_info_unregistered =
358 static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_auth_session_signal_info_pointers[] =
360 &_gsignond_dbus_auth_session_signal_info_state_changed,
361 &_gsignond_dbus_auth_session_signal_info_unregistered,
365 static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_auth_session_interface_info =
369 "com.google.code.AccountsSSO.gSingleSignOn.AuthSession",
370 (GDBusMethodInfo **) &_gsignond_dbus_auth_session_method_info_pointers,
371 (GDBusSignalInfo **) &_gsignond_dbus_auth_session_signal_info_pointers,
380 * gsignond_dbus_auth_session_interface_info:
382 * Gets a machine-readable description of the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link> D-Bus interface.
384 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
387 gsignond_dbus_auth_session_interface_info (void)
389 return (GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info;
393 * gsignond_dbus_auth_session_override_properties:
394 * @klass: The class structure for a #GObject<!-- -->-derived class.
395 * @property_id_begin: The property id to assign to the first overridden property.
397 * Overrides all #GObject properties in the #GSignondDbusAuthSession interface for a concrete class.
398 * The properties are overridden in the order they are defined.
400 * Returns: The last property id.
403 gsignond_dbus_auth_session_override_properties (GObjectClass *klass, guint property_id_begin)
405 return property_id_begin - 1;
411 * GSignondDbusAuthSession:
413 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link>.
417 * GSignondDbusAuthSessionIface:
418 * @parent_iface: The parent interface.
419 * @handle_cancel: Handler for the #GSignondDbusAuthSession::handle-cancel signal.
420 * @handle_process: Handler for the #GSignondDbusAuthSession::handle-process signal.
421 * @handle_query_available_mechanisms: Handler for the #GSignondDbusAuthSession::handle-query-available-mechanisms signal.
422 * @state_changed: Handler for the #GSignondDbusAuthSession::state-changed signal.
423 * @unregistered: Handler for the #GSignondDbusAuthSession::unregistered signal.
425 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link>.
429 gsignond_dbus_auth_session_default_init (GSignondDbusAuthSessionIface *iface)
431 /* GObject signals for incoming D-Bus method calls: */
433 * GSignondDbusAuthSession::handle-query-available-mechanisms:
434 * @object: A #GSignondDbusAuthSession.
435 * @invocation: A #GDBusMethodInvocation.
436 * @arg_wantedMechanisms: Argument passed by remote caller.
438 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.queryAvailableMechanisms">queryAvailableMechanisms()</link> D-Bus method.
440 * 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_auth_session_complete_query_available_mechanisms() 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.
442 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
444 g_signal_new ("handle-query-available-mechanisms",
445 G_TYPE_FROM_INTERFACE (iface),
447 G_STRUCT_OFFSET (GSignondDbusAuthSessionIface, handle_query_available_mechanisms),
448 g_signal_accumulator_true_handled,
450 g_cclosure_marshal_generic,
453 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);
456 * GSignondDbusAuthSession::handle-process:
457 * @object: A #GSignondDbusAuthSession.
458 * @invocation: A #GDBusMethodInvocation.
459 * @arg_sessionDataVa: Argument passed by remote caller.
460 * @arg_mechanism: Argument passed by remote caller.
462 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.process">process()</link> D-Bus method.
464 * 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_auth_session_complete_process() 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.
466 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
468 g_signal_new ("handle-process",
469 G_TYPE_FROM_INTERFACE (iface),
471 G_STRUCT_OFFSET (GSignondDbusAuthSessionIface, handle_process),
472 g_signal_accumulator_true_handled,
474 g_cclosure_marshal_generic,
477 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_STRING);
480 * GSignondDbusAuthSession::handle-cancel:
481 * @object: A #GSignondDbusAuthSession.
482 * @invocation: A #GDBusMethodInvocation.
484 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.cancel">cancel()</link> D-Bus method.
486 * 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_auth_session_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.
488 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
490 g_signal_new ("handle-cancel",
491 G_TYPE_FROM_INTERFACE (iface),
493 G_STRUCT_OFFSET (GSignondDbusAuthSessionIface, handle_cancel),
494 g_signal_accumulator_true_handled,
496 g_cclosure_marshal_generic,
499 G_TYPE_DBUS_METHOD_INVOCATION);
501 /* GObject signals for received D-Bus signals: */
503 * GSignondDbusAuthSession::state-changed:
504 * @object: A #GSignondDbusAuthSession.
505 * @arg_state: Argument.
506 * @arg_message: Argument.
508 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.stateChanged">"stateChanged"</link> is received.
510 * 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.
512 g_signal_new ("state-changed",
513 G_TYPE_FROM_INTERFACE (iface),
515 G_STRUCT_OFFSET (GSignondDbusAuthSessionIface, state_changed),
518 g_cclosure_marshal_generic,
520 2, G_TYPE_INT, G_TYPE_STRING);
523 * GSignondDbusAuthSession::unregistered:
524 * @object: A #GSignondDbusAuthSession.
526 * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.unregistered">"unregistered"</link> is received.
528 * 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.
530 g_signal_new ("unregistered",
531 G_TYPE_FROM_INTERFACE (iface),
533 G_STRUCT_OFFSET (GSignondDbusAuthSessionIface, unregistered),
536 g_cclosure_marshal_generic,
542 typedef GSignondDbusAuthSessionIface GSignondDbusAuthSessionInterface;
543 G_DEFINE_INTERFACE (GSignondDbusAuthSession, gsignond_dbus_auth_session, G_TYPE_OBJECT);
546 * gsignond_dbus_auth_session_emit_state_changed:
547 * @object: A #GSignondDbusAuthSession.
548 * @arg_state: Argument to pass with the signal.
549 * @arg_message: Argument to pass with the signal.
551 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.stateChanged">"stateChanged"</link> D-Bus signal.
554 gsignond_dbus_auth_session_emit_state_changed (
555 GSignondDbusAuthSession *object,
557 const gchar *arg_message)
559 g_signal_emit_by_name (object, "state-changed", arg_state, arg_message);
563 * gsignond_dbus_auth_session_emit_unregistered:
564 * @object: A #GSignondDbusAuthSession.
566 * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.unregistered">"unregistered"</link> D-Bus signal.
569 gsignond_dbus_auth_session_emit_unregistered (
570 GSignondDbusAuthSession *object)
572 g_signal_emit_by_name (object, "unregistered");
576 * gsignond_dbus_auth_session_call_query_available_mechanisms:
577 * @proxy: A #GSignondDbusAuthSessionProxy.
578 * @arg_wantedMechanisms: Argument to pass with the method invocation.
579 * @cancellable: (allow-none): A #GCancellable or %NULL.
580 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
581 * @user_data: User data to pass to @callback.
583 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.queryAvailableMechanisms">queryAvailableMechanisms()</link> D-Bus method on @proxy.
584 * 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.
585 * You can then call gsignond_dbus_auth_session_call_query_available_mechanisms_finish() to get the result of the operation.
587 * See gsignond_dbus_auth_session_call_query_available_mechanisms_sync() for the synchronous, blocking version of this method.
590 gsignond_dbus_auth_session_call_query_available_mechanisms (
591 GSignondDbusAuthSession *proxy,
592 const gchar *const *arg_wantedMechanisms,
593 GCancellable *cancellable,
594 GAsyncReadyCallback callback,
597 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
598 "queryAvailableMechanisms",
599 g_variant_new ("(^as)",
600 arg_wantedMechanisms),
601 G_DBUS_CALL_FLAGS_NONE,
609 * gsignond_dbus_auth_session_call_query_available_mechanisms_finish:
610 * @proxy: A #GSignondDbusAuthSessionProxy.
611 * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore.
612 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_auth_session_call_query_available_mechanisms().
613 * @error: Return location for error or %NULL.
615 * Finishes an operation started with gsignond_dbus_auth_session_call_query_available_mechanisms().
617 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
620 gsignond_dbus_auth_session_call_query_available_mechanisms_finish (
621 GSignondDbusAuthSession *proxy,
622 gchar ***out_unnamed_arg1,
627 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
633 g_variant_unref (_ret);
639 * gsignond_dbus_auth_session_call_query_available_mechanisms_sync:
640 * @proxy: A #GSignondDbusAuthSessionProxy.
641 * @arg_wantedMechanisms: Argument to pass with the method invocation.
642 * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore.
643 * @cancellable: (allow-none): A #GCancellable or %NULL.
644 * @error: Return location for error or %NULL.
646 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.queryAvailableMechanisms">queryAvailableMechanisms()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
648 * See gsignond_dbus_auth_session_call_query_available_mechanisms() for the asynchronous version of this method.
650 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
653 gsignond_dbus_auth_session_call_query_available_mechanisms_sync (
654 GSignondDbusAuthSession *proxy,
655 const gchar *const *arg_wantedMechanisms,
656 gchar ***out_unnamed_arg1,
657 GCancellable *cancellable,
661 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
662 "queryAvailableMechanisms",
663 g_variant_new ("(^as)",
664 arg_wantedMechanisms),
665 G_DBUS_CALL_FLAGS_NONE,
674 g_variant_unref (_ret);
680 * gsignond_dbus_auth_session_call_process:
681 * @proxy: A #GSignondDbusAuthSessionProxy.
682 * @arg_sessionDataVa: Argument to pass with the method invocation.
683 * @arg_mechanism: Argument to pass with the method invocation.
684 * @cancellable: (allow-none): A #GCancellable or %NULL.
685 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
686 * @user_data: User data to pass to @callback.
688 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.process">process()</link> D-Bus method on @proxy.
689 * 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.
690 * You can then call gsignond_dbus_auth_session_call_process_finish() to get the result of the operation.
692 * See gsignond_dbus_auth_session_call_process_sync() for the synchronous, blocking version of this method.
695 gsignond_dbus_auth_session_call_process (
696 GSignondDbusAuthSession *proxy,
697 GVariant *arg_sessionDataVa,
698 const gchar *arg_mechanism,
699 GCancellable *cancellable,
700 GAsyncReadyCallback callback,
703 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
705 g_variant_new ("(@a{sv}s)",
708 G_DBUS_CALL_FLAGS_NONE,
716 * gsignond_dbus_auth_session_call_process_finish:
717 * @proxy: A #GSignondDbusAuthSessionProxy.
718 * @out_unnamed_arg2: (out): Return location for return parameter or %NULL to ignore.
719 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_auth_session_call_process().
720 * @error: Return location for error or %NULL.
722 * Finishes an operation started with gsignond_dbus_auth_session_call_process().
724 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
727 gsignond_dbus_auth_session_call_process_finish (
728 GSignondDbusAuthSession *proxy,
729 GVariant **out_unnamed_arg2,
734 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
740 g_variant_unref (_ret);
746 * gsignond_dbus_auth_session_call_process_sync:
747 * @proxy: A #GSignondDbusAuthSessionProxy.
748 * @arg_sessionDataVa: Argument to pass with the method invocation.
749 * @arg_mechanism: Argument to pass with the method invocation.
750 * @out_unnamed_arg2: (out): Return location for return parameter or %NULL to ignore.
751 * @cancellable: (allow-none): A #GCancellable or %NULL.
752 * @error: Return location for error or %NULL.
754 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.process">process()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
756 * See gsignond_dbus_auth_session_call_process() for the asynchronous version of this method.
758 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
761 gsignond_dbus_auth_session_call_process_sync (
762 GSignondDbusAuthSession *proxy,
763 GVariant *arg_sessionDataVa,
764 const gchar *arg_mechanism,
765 GVariant **out_unnamed_arg2,
766 GCancellable *cancellable,
770 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
772 g_variant_new ("(@a{sv}s)",
775 G_DBUS_CALL_FLAGS_NONE,
784 g_variant_unref (_ret);
790 * gsignond_dbus_auth_session_call_cancel:
791 * @proxy: A #GSignondDbusAuthSessionProxy.
792 * @cancellable: (allow-none): A #GCancellable or %NULL.
793 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
794 * @user_data: User data to pass to @callback.
796 * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.cancel">cancel()</link> D-Bus method on @proxy.
797 * 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.
798 * You can then call gsignond_dbus_auth_session_call_cancel_finish() to get the result of the operation.
800 * See gsignond_dbus_auth_session_call_cancel_sync() for the synchronous, blocking version of this method.
803 gsignond_dbus_auth_session_call_cancel (
804 GSignondDbusAuthSession *proxy,
805 GCancellable *cancellable,
806 GAsyncReadyCallback callback,
809 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
811 g_variant_new ("()"),
812 G_DBUS_CALL_FLAGS_NONE,
820 * gsignond_dbus_auth_session_call_cancel_finish:
821 * @proxy: A #GSignondDbusAuthSessionProxy.
822 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_auth_session_call_cancel().
823 * @error: Return location for error or %NULL.
825 * Finishes an operation started with gsignond_dbus_auth_session_call_cancel().
827 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
830 gsignond_dbus_auth_session_call_cancel_finish (
831 GSignondDbusAuthSession *proxy,
836 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
841 g_variant_unref (_ret);
847 * gsignond_dbus_auth_session_call_cancel_sync:
848 * @proxy: A #GSignondDbusAuthSessionProxy.
849 * @cancellable: (allow-none): A #GCancellable or %NULL.
850 * @error: Return location for error or %NULL.
852 * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.cancel">cancel()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
854 * See gsignond_dbus_auth_session_call_cancel() for the asynchronous version of this method.
856 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
859 gsignond_dbus_auth_session_call_cancel_sync (
860 GSignondDbusAuthSession *proxy,
861 GCancellable *cancellable,
865 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
867 g_variant_new ("()"),
868 G_DBUS_CALL_FLAGS_NONE,
876 g_variant_unref (_ret);
882 * gsignond_dbus_auth_session_complete_query_available_mechanisms:
883 * @object: A #GSignondDbusAuthSession.
884 * @invocation: (transfer full): A #GDBusMethodInvocation.
885 * @unnamed_arg1: Parameter to return.
887 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.queryAvailableMechanisms">queryAvailableMechanisms()</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.
889 * This method will free @invocation, you cannot use it afterwards.
892 gsignond_dbus_auth_session_complete_query_available_mechanisms (
893 GSignondDbusAuthSession *object,
894 GDBusMethodInvocation *invocation,
895 const gchar *const *unnamed_arg1)
897 g_dbus_method_invocation_return_value (invocation,
898 g_variant_new ("(^as)",
903 * gsignond_dbus_auth_session_complete_process:
904 * @object: A #GSignondDbusAuthSession.
905 * @invocation: (transfer full): A #GDBusMethodInvocation.
906 * @unnamed_arg2: Parameter to return.
908 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.process">process()</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.
910 * This method will free @invocation, you cannot use it afterwards.
913 gsignond_dbus_auth_session_complete_process (
914 GSignondDbusAuthSession *object,
915 GDBusMethodInvocation *invocation,
916 GVariant *unnamed_arg2)
918 g_dbus_method_invocation_return_value (invocation,
919 g_variant_new ("(@a{sv})",
924 * gsignond_dbus_auth_session_complete_cancel:
925 * @object: A #GSignondDbusAuthSession.
926 * @invocation: (transfer full): A #GDBusMethodInvocation.
928 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.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.
930 * This method will free @invocation, you cannot use it afterwards.
933 gsignond_dbus_auth_session_complete_cancel (
934 GSignondDbusAuthSession *object,
935 GDBusMethodInvocation *invocation)
937 g_dbus_method_invocation_return_value (invocation,
938 g_variant_new ("()"));
941 /* ------------------------------------------------------------------------ */
944 * GSignondDbusAuthSessionProxy:
946 * The #GSignondDbusAuthSessionProxy structure contains only private data and should only be accessed using the provided API.
950 * GSignondDbusAuthSessionProxyClass:
951 * @parent_class: The parent class.
953 * Class structure for #GSignondDbusAuthSessionProxy.
956 struct _GSignondDbusAuthSessionProxyPrivate
961 static void gsignond_dbus_auth_session_proxy_iface_init (GSignondDbusAuthSessionIface *iface);
963 G_DEFINE_TYPE_WITH_CODE (GSignondDbusAuthSessionProxy, gsignond_dbus_auth_session_proxy, G_TYPE_DBUS_PROXY,
964 G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_AUTH_SESSION, gsignond_dbus_auth_session_proxy_iface_init));
967 gsignond_dbus_auth_session_proxy_finalize (GObject *object)
969 GSignondDbusAuthSessionProxy *proxy = GSIGNOND_DBUS_AUTH_SESSION_PROXY (object);
970 g_datalist_clear (&proxy->priv->qdata);
971 G_OBJECT_CLASS (gsignond_dbus_auth_session_proxy_parent_class)->finalize (object);
975 gsignond_dbus_auth_session_proxy_get_property (GObject *object,
983 gsignond_dbus_auth_session_proxy_set_property (GObject *object,
991 gsignond_dbus_auth_session_proxy_g_signal (GDBusProxy *proxy,
992 const gchar *sender_name,
993 const gchar *signal_name,
994 GVariant *parameters)
996 _ExtendedGDBusSignalInfo *info;
1003 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, signal_name);
1006 num_params = g_variant_n_children (parameters);
1007 paramv = g_new0 (GValue, num_params + 1);
1008 g_value_init (¶mv[0], GSIGNOND_DBUS_TYPE_AUTH_SESSION);
1009 g_value_set_object (¶mv[0], proxy);
1010 g_variant_iter_init (&iter, parameters);
1012 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1014 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1015 if (arg_info->use_gvariant)
1017 g_value_init (¶mv[n], G_TYPE_VARIANT);
1018 g_value_set_variant (¶mv[n], child);
1022 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1023 g_variant_unref (child);
1025 signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_AUTH_SESSION);
1026 g_signal_emitv (paramv, signal_id, 0, NULL);
1027 for (n = 0; n < num_params + 1; n++)
1028 g_value_unset (¶mv[n]);
1033 gsignond_dbus_auth_session_proxy_g_properties_changed (GDBusProxy *_proxy,
1034 GVariant *changed_properties,
1035 const gchar *const *invalidated_properties)
1037 GSignondDbusAuthSessionProxy *proxy = GSIGNOND_DBUS_AUTH_SESSION_PROXY (_proxy);
1041 _ExtendedGDBusPropertyInfo *info;
1042 g_variant_get (changed_properties, "a{sv}", &iter);
1043 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1045 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, key);
1046 g_datalist_remove_data (&proxy->priv->qdata, key);
1048 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1050 g_variant_iter_free (iter);
1051 for (n = 0; invalidated_properties[n] != NULL; n++)
1053 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, invalidated_properties[n]);
1054 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1056 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1061 gsignond_dbus_auth_session_proxy_init (GSignondDbusAuthSessionProxy *proxy)
1063 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_AUTH_SESSION_PROXY, GSignondDbusAuthSessionProxyPrivate);
1064 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_auth_session_interface_info ());
1068 gsignond_dbus_auth_session_proxy_class_init (GSignondDbusAuthSessionProxyClass *klass)
1070 GObjectClass *gobject_class;
1071 GDBusProxyClass *proxy_class;
1073 g_type_class_add_private (klass, sizeof (GSignondDbusAuthSessionProxyPrivate));
1075 gobject_class = G_OBJECT_CLASS (klass);
1076 gobject_class->finalize = gsignond_dbus_auth_session_proxy_finalize;
1077 gobject_class->get_property = gsignond_dbus_auth_session_proxy_get_property;
1078 gobject_class->set_property = gsignond_dbus_auth_session_proxy_set_property;
1080 proxy_class = G_DBUS_PROXY_CLASS (klass);
1081 proxy_class->g_signal = gsignond_dbus_auth_session_proxy_g_signal;
1082 proxy_class->g_properties_changed = gsignond_dbus_auth_session_proxy_g_properties_changed;
1087 gsignond_dbus_auth_session_proxy_iface_init (GSignondDbusAuthSessionIface *iface)
1092 * gsignond_dbus_auth_session_proxy_new:
1093 * @connection: A #GDBusConnection.
1094 * @flags: Flags from the #GDBusProxyFlags enumeration.
1095 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1096 * @object_path: An object path.
1097 * @cancellable: (allow-none): A #GCancellable or %NULL.
1098 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1099 * @user_data: User data to pass to @callback.
1101 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link>. See g_dbus_proxy_new() for more details.
1103 * 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.
1104 * You can then call gsignond_dbus_auth_session_proxy_new_finish() to get the result of the operation.
1106 * See gsignond_dbus_auth_session_proxy_new_sync() for the synchronous, blocking version of this constructor.
1109 gsignond_dbus_auth_session_proxy_new (
1110 GDBusConnection *connection,
1111 GDBusProxyFlags flags,
1113 const gchar *object_path,
1114 GCancellable *cancellable,
1115 GAsyncReadyCallback callback,
1118 g_async_initable_new_async (GSIGNOND_DBUS_TYPE_AUTH_SESSION_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.AuthSession", NULL);
1122 * gsignond_dbus_auth_session_proxy_new_finish:
1123 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_auth_session_proxy_new().
1124 * @error: Return location for error or %NULL
1126 * Finishes an operation started with gsignond_dbus_auth_session_proxy_new().
1128 * Returns: (transfer full) (type GSignondDbusAuthSessionProxy): The constructed proxy object or %NULL if @error is set.
1130 GSignondDbusAuthSession *
1131 gsignond_dbus_auth_session_proxy_new_finish (
1136 GObject *source_object;
1137 source_object = g_async_result_get_source_object (res);
1138 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1139 g_object_unref (source_object);
1141 return GSIGNOND_DBUS_AUTH_SESSION (ret);
1147 * gsignond_dbus_auth_session_proxy_new_sync:
1148 * @connection: A #GDBusConnection.
1149 * @flags: Flags from the #GDBusProxyFlags enumeration.
1150 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1151 * @object_path: An object path.
1152 * @cancellable: (allow-none): A #GCancellable or %NULL.
1153 * @error: Return location for error or %NULL
1155 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link>. See g_dbus_proxy_new_sync() for more details.
1157 * The calling thread is blocked until a reply is received.
1159 * See gsignond_dbus_auth_session_proxy_new() for the asynchronous version of this constructor.
1161 * Returns: (transfer full) (type GSignondDbusAuthSessionProxy): The constructed proxy object or %NULL if @error is set.
1163 GSignondDbusAuthSession *
1164 gsignond_dbus_auth_session_proxy_new_sync (
1165 GDBusConnection *connection,
1166 GDBusProxyFlags flags,
1168 const gchar *object_path,
1169 GCancellable *cancellable,
1173 ret = g_initable_new (GSIGNOND_DBUS_TYPE_AUTH_SESSION_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.AuthSession", NULL);
1175 return GSIGNOND_DBUS_AUTH_SESSION (ret);
1182 * gsignond_dbus_auth_session_proxy_new_for_bus:
1183 * @bus_type: A #GBusType.
1184 * @flags: Flags from the #GDBusProxyFlags enumeration.
1185 * @name: A bus name (well-known or unique).
1186 * @object_path: An object path.
1187 * @cancellable: (allow-none): A #GCancellable or %NULL.
1188 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1189 * @user_data: User data to pass to @callback.
1191 * Like gsignond_dbus_auth_session_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
1193 * 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.
1194 * You can then call gsignond_dbus_auth_session_proxy_new_for_bus_finish() to get the result of the operation.
1196 * See gsignond_dbus_auth_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1199 gsignond_dbus_auth_session_proxy_new_for_bus (
1201 GDBusProxyFlags flags,
1203 const gchar *object_path,
1204 GCancellable *cancellable,
1205 GAsyncReadyCallback callback,
1208 g_async_initable_new_async (GSIGNOND_DBUS_TYPE_AUTH_SESSION_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.AuthSession", NULL);
1212 * gsignond_dbus_auth_session_proxy_new_for_bus_finish:
1213 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_auth_session_proxy_new_for_bus().
1214 * @error: Return location for error or %NULL
1216 * Finishes an operation started with gsignond_dbus_auth_session_proxy_new_for_bus().
1218 * Returns: (transfer full) (type GSignondDbusAuthSessionProxy): The constructed proxy object or %NULL if @error is set.
1220 GSignondDbusAuthSession *
1221 gsignond_dbus_auth_session_proxy_new_for_bus_finish (
1226 GObject *source_object;
1227 source_object = g_async_result_get_source_object (res);
1228 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1229 g_object_unref (source_object);
1231 return GSIGNOND_DBUS_AUTH_SESSION (ret);
1237 * gsignond_dbus_auth_session_proxy_new_for_bus_sync:
1238 * @bus_type: A #GBusType.
1239 * @flags: Flags from the #GDBusProxyFlags enumeration.
1240 * @name: A bus name (well-known or unique).
1241 * @object_path: An object path.
1242 * @cancellable: (allow-none): A #GCancellable or %NULL.
1243 * @error: Return location for error or %NULL
1245 * Like gsignond_dbus_auth_session_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1247 * The calling thread is blocked until a reply is received.
1249 * See gsignond_dbus_auth_session_proxy_new_for_bus() for the asynchronous version of this constructor.
1251 * Returns: (transfer full) (type GSignondDbusAuthSessionProxy): The constructed proxy object or %NULL if @error is set.
1253 GSignondDbusAuthSession *
1254 gsignond_dbus_auth_session_proxy_new_for_bus_sync (
1256 GDBusProxyFlags flags,
1258 const gchar *object_path,
1259 GCancellable *cancellable,
1263 ret = g_initable_new (GSIGNOND_DBUS_TYPE_AUTH_SESSION_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.AuthSession", NULL);
1265 return GSIGNOND_DBUS_AUTH_SESSION (ret);
1271 /* ------------------------------------------------------------------------ */
1274 * GSignondDbusAuthSessionSkeleton:
1276 * The #GSignondDbusAuthSessionSkeleton structure contains only private data and should only be accessed using the provided API.
1280 * GSignondDbusAuthSessionSkeletonClass:
1281 * @parent_class: The parent class.
1283 * Class structure for #GSignondDbusAuthSessionSkeleton.
1286 struct _GSignondDbusAuthSessionSkeletonPrivate
1289 GList *changed_properties;
1290 GSource *changed_properties_idle_source;
1291 GMainContext *context;
1296 _gsignond_dbus_auth_session_skeleton_handle_method_call (
1297 GDBusConnection *connection,
1298 const gchar *sender,
1299 const gchar *object_path,
1300 const gchar *interface_name,
1301 const gchar *method_name,
1302 GVariant *parameters,
1303 GDBusMethodInvocation *invocation,
1306 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (user_data);
1307 _ExtendedGDBusMethodInfo *info;
1315 GValue return_value = G_VALUE_INIT;
1316 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
1317 g_assert (info != NULL);
1318 num_params = g_variant_n_children (parameters);
1319 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
1321 g_value_init (¶mv[n], GSIGNOND_DBUS_TYPE_AUTH_SESSION);
1322 g_value_set_object (¶mv[n++], skeleton);
1323 g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1324 g_value_set_object (¶mv[n++], invocation);
1325 if (info->pass_fdlist)
1328 g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
1329 g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1331 g_assert_not_reached ();
1334 g_variant_iter_init (&iter, parameters);
1335 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1337 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1338 if (arg_info->use_gvariant)
1340 g_value_init (¶mv[n], G_TYPE_VARIANT);
1341 g_value_set_variant (¶mv[n], child);
1345 g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1346 g_variant_unref (child);
1348 signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_AUTH_SESSION);
1349 g_value_init (&return_value, G_TYPE_BOOLEAN);
1350 g_signal_emitv (paramv, signal_id, 0, &return_value);
1351 if (!g_value_get_boolean (&return_value))
1352 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);
1353 g_value_unset (&return_value);
1354 for (n = 0; n < num_params + num_extra; n++)
1355 g_value_unset (¶mv[n]);
1360 _gsignond_dbus_auth_session_skeleton_handle_get_property (
1361 GDBusConnection *connection,
1362 const gchar *sender,
1363 const gchar *object_path,
1364 const gchar *interface_name,
1365 const gchar *property_name,
1369 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (user_data);
1370 GValue value = G_VALUE_INIT;
1372 _ExtendedGDBusPropertyInfo *info;
1375 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name);
1376 g_assert (info != NULL);
1377 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1380 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1384 g_value_init (&value, pspec->value_type);
1385 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1386 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
1387 g_value_unset (&value);
1393 _gsignond_dbus_auth_session_skeleton_handle_set_property (
1394 GDBusConnection *connection,
1395 const gchar *sender,
1396 const gchar *object_path,
1397 const gchar *interface_name,
1398 const gchar *property_name,
1403 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (user_data);
1404 GValue value = G_VALUE_INIT;
1406 _ExtendedGDBusPropertyInfo *info;
1409 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_auth_session_interface_info, property_name);
1410 g_assert (info != NULL);
1411 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1414 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1418 if (info->use_gvariant)
1419 g_value_set_variant (&value, variant);
1421 g_dbus_gvariant_to_gvalue (variant, &value);
1422 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1423 g_value_unset (&value);
1429 static const GDBusInterfaceVTable _gsignond_dbus_auth_session_skeleton_vtable =
1431 _gsignond_dbus_auth_session_skeleton_handle_method_call,
1432 _gsignond_dbus_auth_session_skeleton_handle_get_property,
1433 _gsignond_dbus_auth_session_skeleton_handle_set_property
1436 static GDBusInterfaceInfo *
1437 gsignond_dbus_auth_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
1439 return gsignond_dbus_auth_session_interface_info ();
1442 static GDBusInterfaceVTable *
1443 gsignond_dbus_auth_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
1445 return (GDBusInterfaceVTable *) &_gsignond_dbus_auth_session_skeleton_vtable;
1449 gsignond_dbus_auth_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
1451 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (_skeleton);
1453 GVariantBuilder builder;
1455 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1456 if (_gsignond_dbus_auth_session_interface_info.parent_struct.properties == NULL)
1458 for (n = 0; _gsignond_dbus_auth_session_interface_info.parent_struct.properties[n] != NULL; n++)
1460 GDBusPropertyInfo *info = _gsignond_dbus_auth_session_interface_info.parent_struct.properties[n];
1461 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
1464 value = _gsignond_dbus_auth_session_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.AuthSession", info->name, NULL, skeleton);
1467 g_variant_take_ref (value);
1468 g_variant_builder_add (&builder, "{sv}", info->name, value);
1469 g_variant_unref (value);
1474 return g_variant_builder_end (&builder);
1478 gsignond_dbus_auth_session_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
1483 _gsignond_dbus_auth_session_on_signal_state_changed (
1484 GSignondDbusAuthSession *object,
1486 const gchar *arg_message)
1488 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (object);
1490 GList *connections, *l;
1491 GVariant *signal_variant;
1492 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
1494 signal_variant = g_variant_ref_sink (g_variant_new ("(is)",
1497 for (l = connections; l != NULL; l = l->next)
1499 GDBusConnection *connection = l->data;
1500 g_dbus_connection_emit_signal (connection,
1501 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", "stateChanged",
1502 signal_variant, NULL);
1504 g_variant_unref (signal_variant);
1505 g_list_free_full (connections, g_object_unref);
1509 _gsignond_dbus_auth_session_on_signal_unregistered (
1510 GSignondDbusAuthSession *object)
1512 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (object);
1514 GList *connections, *l;
1515 GVariant *signal_variant;
1516 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
1518 signal_variant = g_variant_ref_sink (g_variant_new ("()"));
1519 for (l = connections; l != NULL; l = l->next)
1521 GDBusConnection *connection = l->data;
1522 g_dbus_connection_emit_signal (connection,
1523 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.AuthSession", "unregistered",
1524 signal_variant, NULL);
1526 g_variant_unref (signal_variant);
1527 g_list_free_full (connections, g_object_unref);
1530 static void gsignond_dbus_auth_session_skeleton_iface_init (GSignondDbusAuthSessionIface *iface);
1531 G_DEFINE_TYPE_WITH_CODE (GSignondDbusAuthSessionSkeleton, gsignond_dbus_auth_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1532 G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_AUTH_SESSION, gsignond_dbus_auth_session_skeleton_iface_init));
1535 gsignond_dbus_auth_session_skeleton_finalize (GObject *object)
1537 GSignondDbusAuthSessionSkeleton *skeleton = GSIGNOND_DBUS_AUTH_SESSION_SKELETON (object);
1538 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
1539 if (skeleton->priv->changed_properties_idle_source != NULL)
1540 g_source_destroy (skeleton->priv->changed_properties_idle_source);
1541 g_main_context_unref (skeleton->priv->context);
1542 g_mutex_clear (&skeleton->priv->lock);
1543 G_OBJECT_CLASS (gsignond_dbus_auth_session_skeleton_parent_class)->finalize (object);
1547 gsignond_dbus_auth_session_skeleton_init (GSignondDbusAuthSessionSkeleton *skeleton)
1549 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_AUTH_SESSION_SKELETON, GSignondDbusAuthSessionSkeletonPrivate);
1550 g_mutex_init (&skeleton->priv->lock);
1551 skeleton->priv->context = g_main_context_ref_thread_default ();
1555 gsignond_dbus_auth_session_skeleton_class_init (GSignondDbusAuthSessionSkeletonClass *klass)
1557 GObjectClass *gobject_class;
1558 GDBusInterfaceSkeletonClass *skeleton_class;
1560 g_type_class_add_private (klass, sizeof (GSignondDbusAuthSessionSkeletonPrivate));
1562 gobject_class = G_OBJECT_CLASS (klass);
1563 gobject_class->finalize = gsignond_dbus_auth_session_skeleton_finalize;
1565 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
1566 skeleton_class->get_info = gsignond_dbus_auth_session_skeleton_dbus_interface_get_info;
1567 skeleton_class->get_properties = gsignond_dbus_auth_session_skeleton_dbus_interface_get_properties;
1568 skeleton_class->flush = gsignond_dbus_auth_session_skeleton_dbus_interface_flush;
1569 skeleton_class->get_vtable = gsignond_dbus_auth_session_skeleton_dbus_interface_get_vtable;
1573 gsignond_dbus_auth_session_skeleton_iface_init (GSignondDbusAuthSessionIface *iface)
1575 iface->state_changed = _gsignond_dbus_auth_session_on_signal_state_changed;
1576 iface->unregistered = _gsignond_dbus_auth_session_on_signal_unregistered;
1580 * gsignond_dbus_auth_session_skeleton_new:
1582 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-AuthSession.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.AuthSession</link>.
1584 * Returns: (transfer full) (type GSignondDbusAuthSessionSkeleton): The skeleton object.
1586 GSignondDbusAuthSession *
1587 gsignond_dbus_auth_session_skeleton_new (void)
1589 return GSIGNOND_DBUS_AUTH_SESSION (g_object_new (GSIGNOND_DBUS_TYPE_AUTH_SESSION_SKELETON, NULL));