b0c19e9524c2805484b8a578687646fe4a8301bf
[profile/ivi/gsignond.git] / src / daemon / dbus / gsignond-dbus-remote-plugin-gen.c
1 /*
2  * Generated by gdbus-codegen 2.34.1. DO NOT EDIT.
3  *
4  * The license of this code is the same as for the source it was derived from.
5  */
6
7 #ifdef HAVE_CONFIG_H
8 #  include "config.h"
9 #endif
10
11 #include "gsignond-dbus-remote-plugin-gen.h"
12
13 #include <string.h>
14 #ifdef G_OS_UNIX
15 #  include <gio/gunixfdlist.h>
16 #endif
17
18 typedef struct
19 {
20   GDBusArgInfo parent_struct;
21   gboolean use_gvariant;
22 } _ExtendedGDBusArgInfo;
23
24 typedef struct
25 {
26   GDBusMethodInfo parent_struct;
27   const gchar *signal_name;
28   gboolean pass_fdlist;
29 } _ExtendedGDBusMethodInfo;
30
31 typedef struct
32 {
33   GDBusSignalInfo parent_struct;
34   const gchar *signal_name;
35 } _ExtendedGDBusSignalInfo;
36
37 typedef struct
38 {
39   GDBusPropertyInfo parent_struct;
40   const gchar *hyphen_name;
41   gboolean use_gvariant;
42 } _ExtendedGDBusPropertyInfo;
43
44 typedef struct
45 {
46   GDBusInterfaceInfo parent_struct;
47   const gchar *hyphen_name;
48 } _ExtendedGDBusInterfaceInfo;
49
50 typedef struct
51 {
52   const _ExtendedGDBusPropertyInfo *info;
53   guint prop_id;
54   GValue orig_value; /* the value before the change */
55 } ChangedProperty;
56
57 static void
58 _changed_property_free (ChangedProperty *data)
59 {
60   g_value_unset (&data->orig_value);
61   g_free (data);
62 }
63
64 static gboolean
65 _g_strv_equal0 (gchar **a, gchar **b)
66 {
67   gboolean ret = FALSE;
68   guint n;
69   if (a == NULL && b == NULL)
70     {
71       ret = TRUE;
72       goto out;
73     }
74   if (a == NULL || b == NULL)
75     goto out;
76   if (g_strv_length (a) != g_strv_length (b))
77     goto out;
78   for (n = 0; a[n] != NULL; n++)
79     if (g_strcmp0 (a[n], b[n]) != 0)
80       goto out;
81   ret = TRUE;
82 out:
83   return ret;
84 }
85
86 static gboolean
87 _g_variant_equal0 (GVariant *a, GVariant *b)
88 {
89   gboolean ret = FALSE;
90   if (a == NULL && b == NULL)
91     {
92       ret = TRUE;
93       goto out;
94     }
95   if (a == NULL || b == NULL)
96     goto out;
97   ret = g_variant_equal (a, b);
98 out:
99   return ret;
100 }
101
102 G_GNUC_UNUSED static gboolean
103 _g_value_equal (const GValue *a, const GValue *b)
104 {
105   gboolean ret = FALSE;
106   g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
107   switch (G_VALUE_TYPE (a))
108     {
109       case G_TYPE_BOOLEAN:
110         ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
111         break;
112       case G_TYPE_UCHAR:
113         ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
114         break;
115       case G_TYPE_INT:
116         ret = (g_value_get_int (a) == g_value_get_int (b));
117         break;
118       case G_TYPE_UINT:
119         ret = (g_value_get_uint (a) == g_value_get_uint (b));
120         break;
121       case G_TYPE_INT64:
122         ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
123         break;
124       case G_TYPE_UINT64:
125         ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
126         break;
127       case G_TYPE_DOUBLE:
128         {
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;
133         }
134         break;
135       case G_TYPE_STRING:
136         ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
137         break;
138       case G_TYPE_VARIANT:
139         ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
140         break;
141       default:
142         if (G_VALUE_TYPE (a) == G_TYPE_STRV)
143           ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
144         else
145           g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
146         break;
147     }
148   return ret;
149 }
150
151 /* ------------------------------------------------------------------------
152  * Code for interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin
153  * ------------------------------------------------------------------------
154  */
155
156 /**
157  * SECTION:GSignondDbusRemotePlugin
158  * @title: GSignondDbusRemotePlugin
159  * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin D-Bus interface
160  *
161  * This section contains code for working with the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link> D-Bus interface in C.
162  */
163
164 /* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin ---- */
165
166 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_cancel =
167 {
168   {
169     -1,
170     (gchar *) "cancel",
171     NULL,
172     NULL,
173     NULL
174   },
175   "handle-cancel",
176   FALSE
177 };
178
179 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_sessionData =
180 {
181   {
182     -1,
183     (gchar *) "sessionData",
184     (gchar *) "a{sv}",
185     NULL
186   },
187   FALSE
188 };
189
190 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache =
191 {
192   {
193     -1,
194     (gchar *) "identityMethodCache",
195     (gchar *) "a{sv}",
196     NULL
197   },
198   FALSE
199 };
200
201 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_mechanism =
202 {
203   {
204     -1,
205     (gchar *) "mechanism",
206     (gchar *) "s",
207     NULL
208   },
209   FALSE
210 };
211
212 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers[] =
213 {
214   &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_sessionData,
215   &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_identityMethodCache,
216   &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_mechanism,
217   NULL
218 };
219
220 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_request_initial =
221 {
222   {
223     -1,
224     (gchar *) "requestInitial",
225     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_initial_IN_ARG_pointers,
226     NULL,
227     NULL
228   },
229   "handle-request-initial",
230   FALSE
231 };
232
233 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_request_IN_ARG_sessionData =
234 {
235   {
236     -1,
237     (gchar *) "sessionData",
238     (gchar *) "a{sv}",
239     NULL
240   },
241   FALSE
242 };
243
244 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_request_IN_ARG_pointers[] =
245 {
246   &_gsignond_dbus_remote_plugin_method_info_request_IN_ARG_sessionData,
247   NULL
248 };
249
250 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_request =
251 {
252   {
253     -1,
254     (gchar *) "request",
255     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_request_IN_ARG_pointers,
256     NULL,
257     NULL
258   },
259   "handle-request",
260   FALSE
261 };
262
263 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_uiData =
264 {
265   {
266     -1,
267     (gchar *) "uiData",
268     (gchar *) "a{sv}",
269     NULL
270   },
271   FALSE
272 };
273
274 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_pointers[] =
275 {
276   &_gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_uiData,
277   NULL
278 };
279
280 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_user_action_finished =
281 {
282   {
283     -1,
284     (gchar *) "userActionFinished",
285     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_user_action_finished_IN_ARG_pointers,
286     NULL,
287     NULL
288   },
289   "handle-user-action-finished",
290   FALSE
291 };
292
293 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_uiData =
294 {
295   {
296     -1,
297     (gchar *) "uiData",
298     (gchar *) "a{sv}",
299     NULL
300   },
301   FALSE
302 };
303
304 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_pointers[] =
305 {
306   &_gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_uiData,
307   NULL
308 };
309
310 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_refresh =
311 {
312   {
313     -1,
314     (gchar *) "refresh",
315     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_refresh_IN_ARG_pointers,
316     NULL,
317     NULL
318   },
319   "handle-refresh",
320   FALSE
321 };
322
323 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_type =
324 {
325   {
326     -1,
327     (gchar *) "type",
328     (gchar *) "s",
329     NULL
330   },
331   FALSE
332 };
333
334 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_mechanisms =
335 {
336   {
337     -1,
338     (gchar *) "mechanisms",
339     (gchar *) "as",
340     NULL
341   },
342   FALSE
343 };
344
345 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_pointers[] =
346 {
347   &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_type,
348   &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_mechanisms,
349   NULL
350 };
351
352 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_method_info_get_info =
353 {
354   {
355     -1,
356     (gchar *) "getInfo",
357     NULL,
358     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_method_info_get_info_OUT_ARG_pointers,
359     NULL
360   },
361   "handle-get-info",
362   FALSE
363 };
364
365 static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_remote_plugin_method_info_pointers[] =
366 {
367   &_gsignond_dbus_remote_plugin_method_info_cancel,
368   &_gsignond_dbus_remote_plugin_method_info_request_initial,
369   &_gsignond_dbus_remote_plugin_method_info_request,
370   &_gsignond_dbus_remote_plugin_method_info_user_action_finished,
371   &_gsignond_dbus_remote_plugin_method_info_refresh,
372   &_gsignond_dbus_remote_plugin_method_info_get_info,
373   NULL
374 };
375
376 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_response_ARG_sessionData =
377 {
378   {
379     -1,
380     (gchar *) "sessionData",
381     (gchar *) "a{sv}",
382     NULL
383   },
384   FALSE
385 };
386
387 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_response_ARG_pointers[] =
388 {
389   &_gsignond_dbus_remote_plugin_signal_info_response_ARG_sessionData,
390   NULL
391 };
392
393 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_response =
394 {
395   {
396     -1,
397     (gchar *) "response",
398     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_ARG_pointers,
399     NULL
400   },
401   "response"
402 };
403
404 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_response_final_ARG_sessionData =
405 {
406   {
407     -1,
408     (gchar *) "sessionData",
409     (gchar *) "a{sv}",
410     NULL
411   },
412   FALSE
413 };
414
415 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_response_final_ARG_pointers[] =
416 {
417   &_gsignond_dbus_remote_plugin_signal_info_response_final_ARG_sessionData,
418   NULL
419 };
420
421 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_response_final =
422 {
423   {
424     -1,
425     (gchar *) "responseFinal",
426     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_response_final_ARG_pointers,
427     NULL
428   },
429   "response-final"
430 };
431
432 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_store_ARG_sessionData =
433 {
434   {
435     -1,
436     (gchar *) "sessionData",
437     (gchar *) "a{sv}",
438     NULL
439   },
440   FALSE
441 };
442
443 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_store_ARG_pointers[] =
444 {
445   &_gsignond_dbus_remote_plugin_signal_info_store_ARG_sessionData,
446   NULL
447 };
448
449 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_store =
450 {
451   {
452     -1,
453     (gchar *) "store",
454     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_store_ARG_pointers,
455     NULL
456   },
457   "store"
458 };
459
460 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_error_ARG_error =
461 {
462   {
463     -1,
464     (gchar *) "error",
465     (gchar *) "(uis)",
466     NULL
467   },
468   FALSE
469 };
470
471 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_error_ARG_pointers[] =
472 {
473   &_gsignond_dbus_remote_plugin_signal_info_error_ARG_error,
474   NULL
475 };
476
477 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_error =
478 {
479   {
480     -1,
481     (gchar *) "error",
482     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_error_ARG_pointers,
483     NULL
484   },
485   "error"
486 };
487
488 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_uiData =
489 {
490   {
491     -1,
492     (gchar *) "uiData",
493     (gchar *) "a{sv}",
494     NULL
495   },
496   FALSE
497 };
498
499 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_pointers[] =
500 {
501   &_gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_uiData,
502   NULL
503 };
504
505 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_user_action_required =
506 {
507   {
508     -1,
509     (gchar *) "userActionRequired",
510     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_user_action_required_ARG_pointers,
511     NULL
512   },
513   "user-action-required"
514 };
515
516 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_uiData =
517 {
518   {
519     -1,
520     (gchar *) "uiData",
521     (gchar *) "a{sv}",
522     NULL
523   },
524   FALSE
525 };
526
527 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_pointers[] =
528 {
529   &_gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_uiData,
530   NULL
531 };
532
533 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_refreshed =
534 {
535   {
536     -1,
537     (gchar *) "refreshed",
538     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_refreshed_ARG_pointers,
539     NULL
540   },
541   "refreshed"
542 };
543
544 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_state =
545 {
546   {
547     -1,
548     (gchar *) "state",
549     (gchar *) "i",
550     NULL
551   },
552   FALSE
553 };
554
555 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_message =
556 {
557   {
558     -1,
559     (gchar *) "message",
560     (gchar *) "s",
561     NULL
562   },
563   FALSE
564 };
565
566 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_pointers[] =
567 {
568   &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_state,
569   &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_message,
570   NULL
571 };
572
573 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_signal_info_status_changed =
574 {
575   {
576     -1,
577     (gchar *) "statusChanged",
578     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_signal_info_status_changed_ARG_pointers,
579     NULL
580   },
581   "status-changed"
582 };
583
584 static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_remote_plugin_signal_info_pointers[] =
585 {
586   &_gsignond_dbus_remote_plugin_signal_info_response,
587   &_gsignond_dbus_remote_plugin_signal_info_response_final,
588   &_gsignond_dbus_remote_plugin_signal_info_store,
589   &_gsignond_dbus_remote_plugin_signal_info_error,
590   &_gsignond_dbus_remote_plugin_signal_info_user_action_required,
591   &_gsignond_dbus_remote_plugin_signal_info_refreshed,
592   &_gsignond_dbus_remote_plugin_signal_info_status_changed,
593   NULL
594 };
595
596 static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_interface_info =
597 {
598   {
599     -1,
600     (gchar *) "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin",
601     (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_method_info_pointers,
602     (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_signal_info_pointers,
603     NULL,
604     NULL
605   },
606   "remote-plugin",
607 };
608
609
610 /**
611  * gsignond_dbus_remote_plugin_interface_info:
612  *
613  * Gets a machine-readable description of the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link> D-Bus interface.
614  *
615  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
616  */
617 GDBusInterfaceInfo *
618 gsignond_dbus_remote_plugin_interface_info (void)
619 {
620   return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct;
621 }
622
623 /**
624  * gsignond_dbus_remote_plugin_override_properties:
625  * @klass: The class structure for a #GObject<!-- -->-derived class.
626  * @property_id_begin: The property id to assign to the first overridden property.
627  *
628  * Overrides all #GObject properties in the #GSignondDbusRemotePlugin interface for a concrete class.
629  * The properties are overridden in the order they are defined.
630  *
631  * Returns: The last property id.
632  */
633 guint
634 gsignond_dbus_remote_plugin_override_properties (GObjectClass *klass, guint property_id_begin)
635 {
636   return property_id_begin - 1;
637 }
638
639
640
641 /**
642  * GSignondDbusRemotePlugin:
643  *
644  * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link>.
645  */
646
647 /**
648  * GSignondDbusRemotePluginIface:
649  * @parent_iface: The parent interface.
650  * @handle_cancel: Handler for the #GSignondDbusRemotePlugin::handle-cancel signal.
651  * @handle_get_info: Handler for the #GSignondDbusRemotePlugin::handle-get-info signal.
652  * @handle_refresh: Handler for the #GSignondDbusRemotePlugin::handle-refresh signal.
653  * @handle_request: Handler for the #GSignondDbusRemotePlugin::handle-request signal.
654  * @handle_request_initial: Handler for the #GSignondDbusRemotePlugin::handle-request-initial signal.
655  * @handle_user_action_finished: Handler for the #GSignondDbusRemotePlugin::handle-user-action-finished signal.
656  * @error: Handler for the #GSignondDbusRemotePlugin::error signal.
657  * @refreshed: Handler for the #GSignondDbusRemotePlugin::refreshed signal.
658  * @response: Handler for the #GSignondDbusRemotePlugin::response signal.
659  * @response_final: Handler for the #GSignondDbusRemotePlugin::response-final signal.
660  * @status_changed: Handler for the #GSignondDbusRemotePlugin::status-changed signal.
661  * @store: Handler for the #GSignondDbusRemotePlugin::store signal.
662  * @user_action_required: Handler for the #GSignondDbusRemotePlugin::user-action-required signal.
663  *
664  * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link>.
665  */
666
667 static void
668 gsignond_dbus_remote_plugin_default_init (GSignondDbusRemotePluginIface *iface)
669 {
670   /* GObject signals for incoming D-Bus method calls: */
671   /**
672    * GSignondDbusRemotePlugin::handle-cancel:
673    * @object: A #GSignondDbusRemotePlugin.
674    * @invocation: A #GDBusMethodInvocation.
675    *
676    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.cancel">cancel()</link> D-Bus method.
677    *
678    * 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_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.
679    *
680    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
681    */
682   g_signal_new ("handle-cancel",
683     G_TYPE_FROM_INTERFACE (iface),
684     G_SIGNAL_RUN_LAST,
685     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_cancel),
686     g_signal_accumulator_true_handled,
687     NULL,
688     g_cclosure_marshal_generic,
689     G_TYPE_BOOLEAN,
690     1,
691     G_TYPE_DBUS_METHOD_INVOCATION);
692
693   /**
694    * GSignondDbusRemotePlugin::handle-request-initial:
695    * @object: A #GSignondDbusRemotePlugin.
696    * @invocation: A #GDBusMethodInvocation.
697    * @arg_sessionData: Argument passed by remote caller.
698    * @arg_identityMethodCache: Argument passed by remote caller.
699    * @arg_mechanism: Argument passed by remote caller.
700    *
701    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.requestInitial">requestInitial()</link> D-Bus method.
702    *
703    * 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_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.
704    *
705    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
706    */
707   g_signal_new ("handle-request-initial",
708     G_TYPE_FROM_INTERFACE (iface),
709     G_SIGNAL_RUN_LAST,
710     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_request_initial),
711     g_signal_accumulator_true_handled,
712     NULL,
713     g_cclosure_marshal_generic,
714     G_TYPE_BOOLEAN,
715     4,
716     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRING);
717
718   /**
719    * GSignondDbusRemotePlugin::handle-request:
720    * @object: A #GSignondDbusRemotePlugin.
721    * @invocation: A #GDBusMethodInvocation.
722    * @arg_sessionData: Argument passed by remote caller.
723    *
724    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.request">request()</link> D-Bus method.
725    *
726    * 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_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.
727    *
728    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
729    */
730   g_signal_new ("handle-request",
731     G_TYPE_FROM_INTERFACE (iface),
732     G_SIGNAL_RUN_LAST,
733     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_request),
734     g_signal_accumulator_true_handled,
735     NULL,
736     g_cclosure_marshal_generic,
737     G_TYPE_BOOLEAN,
738     2,
739     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
740
741   /**
742    * GSignondDbusRemotePlugin::handle-user-action-finished:
743    * @object: A #GSignondDbusRemotePlugin.
744    * @invocation: A #GDBusMethodInvocation.
745    * @arg_uiData: Argument passed by remote caller.
746    *
747    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.userActionFinished">userActionFinished()</link> D-Bus method.
748    *
749    * 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_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.
750    *
751    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
752    */
753   g_signal_new ("handle-user-action-finished",
754     G_TYPE_FROM_INTERFACE (iface),
755     G_SIGNAL_RUN_LAST,
756     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_user_action_finished),
757     g_signal_accumulator_true_handled,
758     NULL,
759     g_cclosure_marshal_generic,
760     G_TYPE_BOOLEAN,
761     2,
762     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
763
764   /**
765    * GSignondDbusRemotePlugin::handle-refresh:
766    * @object: A #GSignondDbusRemotePlugin.
767    * @invocation: A #GDBusMethodInvocation.
768    * @arg_uiData: Argument passed by remote caller.
769    *
770    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.refresh">refresh()</link> D-Bus method.
771    *
772    * 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_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.
773    *
774    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
775    */
776   g_signal_new ("handle-refresh",
777     G_TYPE_FROM_INTERFACE (iface),
778     G_SIGNAL_RUN_LAST,
779     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_refresh),
780     g_signal_accumulator_true_handled,
781     NULL,
782     g_cclosure_marshal_generic,
783     G_TYPE_BOOLEAN,
784     2,
785     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
786
787   /**
788    * GSignondDbusRemotePlugin::handle-get-info:
789    * @object: A #GSignondDbusRemotePlugin.
790    * @invocation: A #GDBusMethodInvocation.
791    *
792    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.getInfo">getInfo()</link> D-Bus method.
793    *
794    * 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_complete_get_info() 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.
795    *
796    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
797    */
798   g_signal_new ("handle-get-info",
799     G_TYPE_FROM_INTERFACE (iface),
800     G_SIGNAL_RUN_LAST,
801     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, handle_get_info),
802     g_signal_accumulator_true_handled,
803     NULL,
804     g_cclosure_marshal_generic,
805     G_TYPE_BOOLEAN,
806     1,
807     G_TYPE_DBUS_METHOD_INVOCATION);
808
809   /* GObject signals for received D-Bus signals: */
810   /**
811    * GSignondDbusRemotePlugin::response:
812    * @object: A #GSignondDbusRemotePlugin.
813    * @arg_sessionData: Argument.
814    *
815    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.response">"response"</link> is received.
816    *
817    * 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.
818    */
819   g_signal_new ("response",
820     G_TYPE_FROM_INTERFACE (iface),
821     G_SIGNAL_RUN_LAST,
822     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, response),
823     NULL,
824     NULL,
825     g_cclosure_marshal_generic,
826     G_TYPE_NONE,
827     1, G_TYPE_VARIANT);
828
829   /**
830    * GSignondDbusRemotePlugin::response-final:
831    * @object: A #GSignondDbusRemotePlugin.
832    * @arg_sessionData: Argument.
833    *
834    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.responseFinal">"responseFinal"</link> is received.
835    *
836    * 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.
837    */
838   g_signal_new ("response-final",
839     G_TYPE_FROM_INTERFACE (iface),
840     G_SIGNAL_RUN_LAST,
841     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, response_final),
842     NULL,
843     NULL,
844     g_cclosure_marshal_generic,
845     G_TYPE_NONE,
846     1, G_TYPE_VARIANT);
847
848   /**
849    * GSignondDbusRemotePlugin::store:
850    * @object: A #GSignondDbusRemotePlugin.
851    * @arg_sessionData: Argument.
852    *
853    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.store">"store"</link> is received.
854    *
855    * 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.
856    */
857   g_signal_new ("store",
858     G_TYPE_FROM_INTERFACE (iface),
859     G_SIGNAL_RUN_LAST,
860     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, store),
861     NULL,
862     NULL,
863     g_cclosure_marshal_generic,
864     G_TYPE_NONE,
865     1, G_TYPE_VARIANT);
866
867   /**
868    * GSignondDbusRemotePlugin::error:
869    * @object: A #GSignondDbusRemotePlugin.
870    * @arg_error: Argument.
871    *
872    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.error">"error"</link> is received.
873    *
874    * 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.
875    */
876   g_signal_new ("error",
877     G_TYPE_FROM_INTERFACE (iface),
878     G_SIGNAL_RUN_LAST,
879     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, error),
880     NULL,
881     NULL,
882     g_cclosure_marshal_generic,
883     G_TYPE_NONE,
884     1, G_TYPE_VARIANT);
885
886   /**
887    * GSignondDbusRemotePlugin::user-action-required:
888    * @object: A #GSignondDbusRemotePlugin.
889    * @arg_uiData: Argument.
890    *
891    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.userActionRequired">"userActionRequired"</link> is received.
892    *
893    * 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.
894    */
895   g_signal_new ("user-action-required",
896     G_TYPE_FROM_INTERFACE (iface),
897     G_SIGNAL_RUN_LAST,
898     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, user_action_required),
899     NULL,
900     NULL,
901     g_cclosure_marshal_generic,
902     G_TYPE_NONE,
903     1, G_TYPE_VARIANT);
904
905   /**
906    * GSignondDbusRemotePlugin::refreshed:
907    * @object: A #GSignondDbusRemotePlugin.
908    * @arg_uiData: Argument.
909    *
910    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.refreshed">"refreshed"</link> is received.
911    *
912    * 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.
913    */
914   g_signal_new ("refreshed",
915     G_TYPE_FROM_INTERFACE (iface),
916     G_SIGNAL_RUN_LAST,
917     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, refreshed),
918     NULL,
919     NULL,
920     g_cclosure_marshal_generic,
921     G_TYPE_NONE,
922     1, G_TYPE_VARIANT);
923
924   /**
925    * GSignondDbusRemotePlugin::status-changed:
926    * @object: A #GSignondDbusRemotePlugin.
927    * @arg_state: Argument.
928    * @arg_message: Argument.
929    *
930    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.statusChanged">"statusChanged"</link> is received.
931    *
932    * 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.
933    */
934   g_signal_new ("status-changed",
935     G_TYPE_FROM_INTERFACE (iface),
936     G_SIGNAL_RUN_LAST,
937     G_STRUCT_OFFSET (GSignondDbusRemotePluginIface, status_changed),
938     NULL,
939     NULL,
940     g_cclosure_marshal_generic,
941     G_TYPE_NONE,
942     2, G_TYPE_INT, G_TYPE_STRING);
943
944 }
945
946 typedef GSignondDbusRemotePluginIface GSignondDbusRemotePluginInterface;
947 G_DEFINE_INTERFACE (GSignondDbusRemotePlugin, gsignond_dbus_remote_plugin, G_TYPE_OBJECT);
948
949 /**
950  * gsignond_dbus_remote_plugin_emit_response:
951  * @object: A #GSignondDbusRemotePlugin.
952  * @arg_sessionData: Argument to pass with the signal.
953  *
954  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.response">"response"</link> D-Bus signal.
955  */
956 void
957 gsignond_dbus_remote_plugin_emit_response (
958     GSignondDbusRemotePlugin *object,
959     GVariant *arg_sessionData)
960 {
961   g_signal_emit_by_name (object, "response", arg_sessionData);
962 }
963
964 /**
965  * gsignond_dbus_remote_plugin_emit_response_final:
966  * @object: A #GSignondDbusRemotePlugin.
967  * @arg_sessionData: Argument to pass with the signal.
968  *
969  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.responseFinal">"responseFinal"</link> D-Bus signal.
970  */
971 void
972 gsignond_dbus_remote_plugin_emit_response_final (
973     GSignondDbusRemotePlugin *object,
974     GVariant *arg_sessionData)
975 {
976   g_signal_emit_by_name (object, "response-final", arg_sessionData);
977 }
978
979 /**
980  * gsignond_dbus_remote_plugin_emit_store:
981  * @object: A #GSignondDbusRemotePlugin.
982  * @arg_sessionData: Argument to pass with the signal.
983  *
984  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.store">"store"</link> D-Bus signal.
985  */
986 void
987 gsignond_dbus_remote_plugin_emit_store (
988     GSignondDbusRemotePlugin *object,
989     GVariant *arg_sessionData)
990 {
991   g_signal_emit_by_name (object, "store", arg_sessionData);
992 }
993
994 /**
995  * gsignond_dbus_remote_plugin_emit_error:
996  * @object: A #GSignondDbusRemotePlugin.
997  * @arg_error: Argument to pass with the signal.
998  *
999  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.error">"error"</link> D-Bus signal.
1000  */
1001 void
1002 gsignond_dbus_remote_plugin_emit_error (
1003     GSignondDbusRemotePlugin *object,
1004     GVariant *arg_error)
1005 {
1006   g_signal_emit_by_name (object, "error", arg_error);
1007 }
1008
1009 /**
1010  * gsignond_dbus_remote_plugin_emit_user_action_required:
1011  * @object: A #GSignondDbusRemotePlugin.
1012  * @arg_uiData: Argument to pass with the signal.
1013  *
1014  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.userActionRequired">"userActionRequired"</link> D-Bus signal.
1015  */
1016 void
1017 gsignond_dbus_remote_plugin_emit_user_action_required (
1018     GSignondDbusRemotePlugin *object,
1019     GVariant *arg_uiData)
1020 {
1021   g_signal_emit_by_name (object, "user-action-required", arg_uiData);
1022 }
1023
1024 /**
1025  * gsignond_dbus_remote_plugin_emit_refreshed:
1026  * @object: A #GSignondDbusRemotePlugin.
1027  * @arg_uiData: Argument to pass with the signal.
1028  *
1029  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.refreshed">"refreshed"</link> D-Bus signal.
1030  */
1031 void
1032 gsignond_dbus_remote_plugin_emit_refreshed (
1033     GSignondDbusRemotePlugin *object,
1034     GVariant *arg_uiData)
1035 {
1036   g_signal_emit_by_name (object, "refreshed", arg_uiData);
1037 }
1038
1039 /**
1040  * gsignond_dbus_remote_plugin_emit_status_changed:
1041  * @object: A #GSignondDbusRemotePlugin.
1042  * @arg_state: Argument to pass with the signal.
1043  * @arg_message: Argument to pass with the signal.
1044  *
1045  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.statusChanged">"statusChanged"</link> D-Bus signal.
1046  */
1047 void
1048 gsignond_dbus_remote_plugin_emit_status_changed (
1049     GSignondDbusRemotePlugin *object,
1050     gint arg_state,
1051     const gchar *arg_message)
1052 {
1053   g_signal_emit_by_name (object, "status-changed", arg_state, arg_message);
1054 }
1055
1056 /**
1057  * gsignond_dbus_remote_plugin_call_cancel:
1058  * @proxy: A #GSignondDbusRemotePluginProxy.
1059  * @cancellable: (allow-none): A #GCancellable or %NULL.
1060  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1061  * @user_data: User data to pass to @callback.
1062  *
1063  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.cancel">cancel()</link> D-Bus method on @proxy.
1064  * 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.
1065  * You can then call gsignond_dbus_remote_plugin_call_cancel_finish() to get the result of the operation.
1066  *
1067  * See gsignond_dbus_remote_plugin_call_cancel_sync() for the synchronous, blocking version of this method.
1068  */
1069 void
1070 gsignond_dbus_remote_plugin_call_cancel (
1071     GSignondDbusRemotePlugin *proxy,
1072     GCancellable *cancellable,
1073     GAsyncReadyCallback callback,
1074     gpointer user_data)
1075 {
1076   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1077     "cancel",
1078     g_variant_new ("()"),
1079     G_DBUS_CALL_FLAGS_NONE,
1080     -1,
1081     cancellable,
1082     callback,
1083     user_data);
1084 }
1085
1086 /**
1087  * gsignond_dbus_remote_plugin_call_cancel_finish:
1088  * @proxy: A #GSignondDbusRemotePluginProxy.
1089  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_cancel().
1090  * @error: Return location for error or %NULL.
1091  *
1092  * Finishes an operation started with gsignond_dbus_remote_plugin_call_cancel().
1093  *
1094  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1095  */
1096 gboolean
1097 gsignond_dbus_remote_plugin_call_cancel_finish (
1098     GSignondDbusRemotePlugin *proxy,
1099     GAsyncResult *res,
1100     GError **error)
1101 {
1102   GVariant *_ret;
1103   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1104   if (_ret == NULL)
1105     goto _out;
1106   g_variant_get (_ret,
1107                  "()");
1108   g_variant_unref (_ret);
1109 _out:
1110   return _ret != NULL;
1111 }
1112
1113 /**
1114  * gsignond_dbus_remote_plugin_call_cancel_sync:
1115  * @proxy: A #GSignondDbusRemotePluginProxy.
1116  * @cancellable: (allow-none): A #GCancellable or %NULL.
1117  * @error: Return location for error or %NULL.
1118  *
1119  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.cancel">cancel()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1120  *
1121  * See gsignond_dbus_remote_plugin_call_cancel() for the asynchronous version of this method.
1122  *
1123  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1124  */
1125 gboolean
1126 gsignond_dbus_remote_plugin_call_cancel_sync (
1127     GSignondDbusRemotePlugin *proxy,
1128     GCancellable *cancellable,
1129     GError **error)
1130 {
1131   GVariant *_ret;
1132   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1133     "cancel",
1134     g_variant_new ("()"),
1135     G_DBUS_CALL_FLAGS_NONE,
1136     -1,
1137     cancellable,
1138     error);
1139   if (_ret == NULL)
1140     goto _out;
1141   g_variant_get (_ret,
1142                  "()");
1143   g_variant_unref (_ret);
1144 _out:
1145   return _ret != NULL;
1146 }
1147
1148 /**
1149  * gsignond_dbus_remote_plugin_call_request_initial:
1150  * @proxy: A #GSignondDbusRemotePluginProxy.
1151  * @arg_sessionData: Argument to pass with the method invocation.
1152  * @arg_identityMethodCache: Argument to pass with the method invocation.
1153  * @arg_mechanism: Argument to pass with the method invocation.
1154  * @cancellable: (allow-none): A #GCancellable or %NULL.
1155  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1156  * @user_data: User data to pass to @callback.
1157  *
1158  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.requestInitial">requestInitial()</link> D-Bus method on @proxy.
1159  * 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.
1160  * You can then call gsignond_dbus_remote_plugin_call_request_initial_finish() to get the result of the operation.
1161  *
1162  * See gsignond_dbus_remote_plugin_call_request_initial_sync() for the synchronous, blocking version of this method.
1163  */
1164 void
1165 gsignond_dbus_remote_plugin_call_request_initial (
1166     GSignondDbusRemotePlugin *proxy,
1167     GVariant *arg_sessionData,
1168     GVariant *arg_identityMethodCache,
1169     const gchar *arg_mechanism,
1170     GCancellable *cancellable,
1171     GAsyncReadyCallback callback,
1172     gpointer user_data)
1173 {
1174   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1175     "requestInitial",
1176     g_variant_new ("(@a{sv}@a{sv}s)",
1177                    arg_sessionData,
1178                    arg_identityMethodCache,
1179                    arg_mechanism),
1180     G_DBUS_CALL_FLAGS_NONE,
1181     -1,
1182     cancellable,
1183     callback,
1184     user_data);
1185 }
1186
1187 /**
1188  * gsignond_dbus_remote_plugin_call_request_initial_finish:
1189  * @proxy: A #GSignondDbusRemotePluginProxy.
1190  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_request_initial().
1191  * @error: Return location for error or %NULL.
1192  *
1193  * Finishes an operation started with gsignond_dbus_remote_plugin_call_request_initial().
1194  *
1195  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1196  */
1197 gboolean
1198 gsignond_dbus_remote_plugin_call_request_initial_finish (
1199     GSignondDbusRemotePlugin *proxy,
1200     GAsyncResult *res,
1201     GError **error)
1202 {
1203   GVariant *_ret;
1204   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1205   if (_ret == NULL)
1206     goto _out;
1207   g_variant_get (_ret,
1208                  "()");
1209   g_variant_unref (_ret);
1210 _out:
1211   return _ret != NULL;
1212 }
1213
1214 /**
1215  * gsignond_dbus_remote_plugin_call_request_initial_sync:
1216  * @proxy: A #GSignondDbusRemotePluginProxy.
1217  * @arg_sessionData: Argument to pass with the method invocation.
1218  * @arg_identityMethodCache: Argument to pass with the method invocation.
1219  * @arg_mechanism: Argument to pass with the method invocation.
1220  * @cancellable: (allow-none): A #GCancellable or %NULL.
1221  * @error: Return location for error or %NULL.
1222  *
1223  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.requestInitial">requestInitial()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1224  *
1225  * See gsignond_dbus_remote_plugin_call_request_initial() for the asynchronous version of this method.
1226  *
1227  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1228  */
1229 gboolean
1230 gsignond_dbus_remote_plugin_call_request_initial_sync (
1231     GSignondDbusRemotePlugin *proxy,
1232     GVariant *arg_sessionData,
1233     GVariant *arg_identityMethodCache,
1234     const gchar *arg_mechanism,
1235     GCancellable *cancellable,
1236     GError **error)
1237 {
1238   GVariant *_ret;
1239   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1240     "requestInitial",
1241     g_variant_new ("(@a{sv}@a{sv}s)",
1242                    arg_sessionData,
1243                    arg_identityMethodCache,
1244                    arg_mechanism),
1245     G_DBUS_CALL_FLAGS_NONE,
1246     -1,
1247     cancellable,
1248     error);
1249   if (_ret == NULL)
1250     goto _out;
1251   g_variant_get (_ret,
1252                  "()");
1253   g_variant_unref (_ret);
1254 _out:
1255   return _ret != NULL;
1256 }
1257
1258 /**
1259  * gsignond_dbus_remote_plugin_call_request:
1260  * @proxy: A #GSignondDbusRemotePluginProxy.
1261  * @arg_sessionData: Argument to pass with the method invocation.
1262  * @cancellable: (allow-none): A #GCancellable or %NULL.
1263  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1264  * @user_data: User data to pass to @callback.
1265  *
1266  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.request">request()</link> D-Bus method on @proxy.
1267  * 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.
1268  * You can then call gsignond_dbus_remote_plugin_call_request_finish() to get the result of the operation.
1269  *
1270  * See gsignond_dbus_remote_plugin_call_request_sync() for the synchronous, blocking version of this method.
1271  */
1272 void
1273 gsignond_dbus_remote_plugin_call_request (
1274     GSignondDbusRemotePlugin *proxy,
1275     GVariant *arg_sessionData,
1276     GCancellable *cancellable,
1277     GAsyncReadyCallback callback,
1278     gpointer user_data)
1279 {
1280   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1281     "request",
1282     g_variant_new ("(@a{sv})",
1283                    arg_sessionData),
1284     G_DBUS_CALL_FLAGS_NONE,
1285     -1,
1286     cancellable,
1287     callback,
1288     user_data);
1289 }
1290
1291 /**
1292  * gsignond_dbus_remote_plugin_call_request_finish:
1293  * @proxy: A #GSignondDbusRemotePluginProxy.
1294  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_request().
1295  * @error: Return location for error or %NULL.
1296  *
1297  * Finishes an operation started with gsignond_dbus_remote_plugin_call_request().
1298  *
1299  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1300  */
1301 gboolean
1302 gsignond_dbus_remote_plugin_call_request_finish (
1303     GSignondDbusRemotePlugin *proxy,
1304     GAsyncResult *res,
1305     GError **error)
1306 {
1307   GVariant *_ret;
1308   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1309   if (_ret == NULL)
1310     goto _out;
1311   g_variant_get (_ret,
1312                  "()");
1313   g_variant_unref (_ret);
1314 _out:
1315   return _ret != NULL;
1316 }
1317
1318 /**
1319  * gsignond_dbus_remote_plugin_call_request_sync:
1320  * @proxy: A #GSignondDbusRemotePluginProxy.
1321  * @arg_sessionData: Argument to pass with the method invocation.
1322  * @cancellable: (allow-none): A #GCancellable or %NULL.
1323  * @error: Return location for error or %NULL.
1324  *
1325  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.request">request()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1326  *
1327  * See gsignond_dbus_remote_plugin_call_request() for the asynchronous version of this method.
1328  *
1329  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1330  */
1331 gboolean
1332 gsignond_dbus_remote_plugin_call_request_sync (
1333     GSignondDbusRemotePlugin *proxy,
1334     GVariant *arg_sessionData,
1335     GCancellable *cancellable,
1336     GError **error)
1337 {
1338   GVariant *_ret;
1339   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1340     "request",
1341     g_variant_new ("(@a{sv})",
1342                    arg_sessionData),
1343     G_DBUS_CALL_FLAGS_NONE,
1344     -1,
1345     cancellable,
1346     error);
1347   if (_ret == NULL)
1348     goto _out;
1349   g_variant_get (_ret,
1350                  "()");
1351   g_variant_unref (_ret);
1352 _out:
1353   return _ret != NULL;
1354 }
1355
1356 /**
1357  * gsignond_dbus_remote_plugin_call_user_action_finished:
1358  * @proxy: A #GSignondDbusRemotePluginProxy.
1359  * @arg_uiData: Argument to pass with the method invocation.
1360  * @cancellable: (allow-none): A #GCancellable or %NULL.
1361  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1362  * @user_data: User data to pass to @callback.
1363  *
1364  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.userActionFinished">userActionFinished()</link> D-Bus method on @proxy.
1365  * 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.
1366  * You can then call gsignond_dbus_remote_plugin_call_user_action_finished_finish() to get the result of the operation.
1367  *
1368  * See gsignond_dbus_remote_plugin_call_user_action_finished_sync() for the synchronous, blocking version of this method.
1369  */
1370 void
1371 gsignond_dbus_remote_plugin_call_user_action_finished (
1372     GSignondDbusRemotePlugin *proxy,
1373     GVariant *arg_uiData,
1374     GCancellable *cancellable,
1375     GAsyncReadyCallback callback,
1376     gpointer user_data)
1377 {
1378   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1379     "userActionFinished",
1380     g_variant_new ("(@a{sv})",
1381                    arg_uiData),
1382     G_DBUS_CALL_FLAGS_NONE,
1383     -1,
1384     cancellable,
1385     callback,
1386     user_data);
1387 }
1388
1389 /**
1390  * gsignond_dbus_remote_plugin_call_user_action_finished_finish:
1391  * @proxy: A #GSignondDbusRemotePluginProxy.
1392  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_user_action_finished().
1393  * @error: Return location for error or %NULL.
1394  *
1395  * Finishes an operation started with gsignond_dbus_remote_plugin_call_user_action_finished().
1396  *
1397  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1398  */
1399 gboolean
1400 gsignond_dbus_remote_plugin_call_user_action_finished_finish (
1401     GSignondDbusRemotePlugin *proxy,
1402     GAsyncResult *res,
1403     GError **error)
1404 {
1405   GVariant *_ret;
1406   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1407   if (_ret == NULL)
1408     goto _out;
1409   g_variant_get (_ret,
1410                  "()");
1411   g_variant_unref (_ret);
1412 _out:
1413   return _ret != NULL;
1414 }
1415
1416 /**
1417  * gsignond_dbus_remote_plugin_call_user_action_finished_sync:
1418  * @proxy: A #GSignondDbusRemotePluginProxy.
1419  * @arg_uiData: Argument to pass with the method invocation.
1420  * @cancellable: (allow-none): A #GCancellable or %NULL.
1421  * @error: Return location for error or %NULL.
1422  *
1423  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.userActionFinished">userActionFinished()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1424  *
1425  * See gsignond_dbus_remote_plugin_call_user_action_finished() for the asynchronous version of this method.
1426  *
1427  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1428  */
1429 gboolean
1430 gsignond_dbus_remote_plugin_call_user_action_finished_sync (
1431     GSignondDbusRemotePlugin *proxy,
1432     GVariant *arg_uiData,
1433     GCancellable *cancellable,
1434     GError **error)
1435 {
1436   GVariant *_ret;
1437   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1438     "userActionFinished",
1439     g_variant_new ("(@a{sv})",
1440                    arg_uiData),
1441     G_DBUS_CALL_FLAGS_NONE,
1442     -1,
1443     cancellable,
1444     error);
1445   if (_ret == NULL)
1446     goto _out;
1447   g_variant_get (_ret,
1448                  "()");
1449   g_variant_unref (_ret);
1450 _out:
1451   return _ret != NULL;
1452 }
1453
1454 /**
1455  * gsignond_dbus_remote_plugin_call_refresh:
1456  * @proxy: A #GSignondDbusRemotePluginProxy.
1457  * @arg_uiData: Argument to pass with the method invocation.
1458  * @cancellable: (allow-none): A #GCancellable or %NULL.
1459  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1460  * @user_data: User data to pass to @callback.
1461  *
1462  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.refresh">refresh()</link> D-Bus method on @proxy.
1463  * 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.
1464  * You can then call gsignond_dbus_remote_plugin_call_refresh_finish() to get the result of the operation.
1465  *
1466  * See gsignond_dbus_remote_plugin_call_refresh_sync() for the synchronous, blocking version of this method.
1467  */
1468 void
1469 gsignond_dbus_remote_plugin_call_refresh (
1470     GSignondDbusRemotePlugin *proxy,
1471     GVariant *arg_uiData,
1472     GCancellable *cancellable,
1473     GAsyncReadyCallback callback,
1474     gpointer user_data)
1475 {
1476   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1477     "refresh",
1478     g_variant_new ("(@a{sv})",
1479                    arg_uiData),
1480     G_DBUS_CALL_FLAGS_NONE,
1481     -1,
1482     cancellable,
1483     callback,
1484     user_data);
1485 }
1486
1487 /**
1488  * gsignond_dbus_remote_plugin_call_refresh_finish:
1489  * @proxy: A #GSignondDbusRemotePluginProxy.
1490  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_refresh().
1491  * @error: Return location for error or %NULL.
1492  *
1493  * Finishes an operation started with gsignond_dbus_remote_plugin_call_refresh().
1494  *
1495  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1496  */
1497 gboolean
1498 gsignond_dbus_remote_plugin_call_refresh_finish (
1499     GSignondDbusRemotePlugin *proxy,
1500     GAsyncResult *res,
1501     GError **error)
1502 {
1503   GVariant *_ret;
1504   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1505   if (_ret == NULL)
1506     goto _out;
1507   g_variant_get (_ret,
1508                  "()");
1509   g_variant_unref (_ret);
1510 _out:
1511   return _ret != NULL;
1512 }
1513
1514 /**
1515  * gsignond_dbus_remote_plugin_call_refresh_sync:
1516  * @proxy: A #GSignondDbusRemotePluginProxy.
1517  * @arg_uiData: Argument to pass with the method invocation.
1518  * @cancellable: (allow-none): A #GCancellable or %NULL.
1519  * @error: Return location for error or %NULL.
1520  *
1521  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.refresh">refresh()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1522  *
1523  * See gsignond_dbus_remote_plugin_call_refresh() for the asynchronous version of this method.
1524  *
1525  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1526  */
1527 gboolean
1528 gsignond_dbus_remote_plugin_call_refresh_sync (
1529     GSignondDbusRemotePlugin *proxy,
1530     GVariant *arg_uiData,
1531     GCancellable *cancellable,
1532     GError **error)
1533 {
1534   GVariant *_ret;
1535   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1536     "refresh",
1537     g_variant_new ("(@a{sv})",
1538                    arg_uiData),
1539     G_DBUS_CALL_FLAGS_NONE,
1540     -1,
1541     cancellable,
1542     error);
1543   if (_ret == NULL)
1544     goto _out;
1545   g_variant_get (_ret,
1546                  "()");
1547   g_variant_unref (_ret);
1548 _out:
1549   return _ret != NULL;
1550 }
1551
1552 /**
1553  * gsignond_dbus_remote_plugin_call_get_info:
1554  * @proxy: A #GSignondDbusRemotePluginProxy.
1555  * @cancellable: (allow-none): A #GCancellable or %NULL.
1556  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1557  * @user_data: User data to pass to @callback.
1558  *
1559  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.getInfo">getInfo()</link> D-Bus method on @proxy.
1560  * 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.
1561  * You can then call gsignond_dbus_remote_plugin_call_get_info_finish() to get the result of the operation.
1562  *
1563  * See gsignond_dbus_remote_plugin_call_get_info_sync() for the synchronous, blocking version of this method.
1564  */
1565 void
1566 gsignond_dbus_remote_plugin_call_get_info (
1567     GSignondDbusRemotePlugin *proxy,
1568     GCancellable *cancellable,
1569     GAsyncReadyCallback callback,
1570     gpointer user_data)
1571 {
1572   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1573     "getInfo",
1574     g_variant_new ("()"),
1575     G_DBUS_CALL_FLAGS_NONE,
1576     -1,
1577     cancellable,
1578     callback,
1579     user_data);
1580 }
1581
1582 /**
1583  * gsignond_dbus_remote_plugin_call_get_info_finish:
1584  * @proxy: A #GSignondDbusRemotePluginProxy.
1585  * @out_type: (out): Return location for return parameter or %NULL to ignore.
1586  * @out_mechanisms: (out): Return location for return parameter or %NULL to ignore.
1587  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_call_get_info().
1588  * @error: Return location for error or %NULL.
1589  *
1590  * Finishes an operation started with gsignond_dbus_remote_plugin_call_get_info().
1591  *
1592  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1593  */
1594 gboolean
1595 gsignond_dbus_remote_plugin_call_get_info_finish (
1596     GSignondDbusRemotePlugin *proxy,
1597     gchar **out_type,
1598     gchar ***out_mechanisms,
1599     GAsyncResult *res,
1600     GError **error)
1601 {
1602   GVariant *_ret;
1603   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1604   if (_ret == NULL)
1605     goto _out;
1606   g_variant_get (_ret,
1607                  "(s^as)",
1608                  out_type,
1609                  out_mechanisms);
1610   g_variant_unref (_ret);
1611 _out:
1612   return _ret != NULL;
1613 }
1614
1615 /**
1616  * gsignond_dbus_remote_plugin_call_get_info_sync:
1617  * @proxy: A #GSignondDbusRemotePluginProxy.
1618  * @out_type: (out): Return location for return parameter or %NULL to ignore.
1619  * @out_mechanisms: (out): Return location for return parameter or %NULL to ignore.
1620  * @cancellable: (allow-none): A #GCancellable or %NULL.
1621  * @error: Return location for error or %NULL.
1622  *
1623  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.getInfo">getInfo()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1624  *
1625  * See gsignond_dbus_remote_plugin_call_get_info() for the asynchronous version of this method.
1626  *
1627  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1628  */
1629 gboolean
1630 gsignond_dbus_remote_plugin_call_get_info_sync (
1631     GSignondDbusRemotePlugin *proxy,
1632     gchar **out_type,
1633     gchar ***out_mechanisms,
1634     GCancellable *cancellable,
1635     GError **error)
1636 {
1637   GVariant *_ret;
1638   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1639     "getInfo",
1640     g_variant_new ("()"),
1641     G_DBUS_CALL_FLAGS_NONE,
1642     -1,
1643     cancellable,
1644     error);
1645   if (_ret == NULL)
1646     goto _out;
1647   g_variant_get (_ret,
1648                  "(s^as)",
1649                  out_type,
1650                  out_mechanisms);
1651   g_variant_unref (_ret);
1652 _out:
1653   return _ret != NULL;
1654 }
1655
1656 /**
1657  * gsignond_dbus_remote_plugin_complete_cancel:
1658  * @object: A #GSignondDbusRemotePlugin.
1659  * @invocation: (transfer full): A #GDBusMethodInvocation.
1660  *
1661  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.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.
1662  *
1663  * This method will free @invocation, you cannot use it afterwards.
1664  */
1665 void
1666 gsignond_dbus_remote_plugin_complete_cancel (
1667     GSignondDbusRemotePlugin *object,
1668     GDBusMethodInvocation *invocation)
1669 {
1670   g_dbus_method_invocation_return_value (invocation,
1671     g_variant_new ("()"));
1672 }
1673
1674 /**
1675  * gsignond_dbus_remote_plugin_complete_request_initial:
1676  * @object: A #GSignondDbusRemotePlugin.
1677  * @invocation: (transfer full): A #GDBusMethodInvocation.
1678  *
1679  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.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.
1680  *
1681  * This method will free @invocation, you cannot use it afterwards.
1682  */
1683 void
1684 gsignond_dbus_remote_plugin_complete_request_initial (
1685     GSignondDbusRemotePlugin *object,
1686     GDBusMethodInvocation *invocation)
1687 {
1688   g_dbus_method_invocation_return_value (invocation,
1689     g_variant_new ("()"));
1690 }
1691
1692 /**
1693  * gsignond_dbus_remote_plugin_complete_request:
1694  * @object: A #GSignondDbusRemotePlugin.
1695  * @invocation: (transfer full): A #GDBusMethodInvocation.
1696  *
1697  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.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.
1698  *
1699  * This method will free @invocation, you cannot use it afterwards.
1700  */
1701 void
1702 gsignond_dbus_remote_plugin_complete_request (
1703     GSignondDbusRemotePlugin *object,
1704     GDBusMethodInvocation *invocation)
1705 {
1706   g_dbus_method_invocation_return_value (invocation,
1707     g_variant_new ("()"));
1708 }
1709
1710 /**
1711  * gsignond_dbus_remote_plugin_complete_user_action_finished:
1712  * @object: A #GSignondDbusRemotePlugin.
1713  * @invocation: (transfer full): A #GDBusMethodInvocation.
1714  *
1715  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.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.
1716  *
1717  * This method will free @invocation, you cannot use it afterwards.
1718  */
1719 void
1720 gsignond_dbus_remote_plugin_complete_user_action_finished (
1721     GSignondDbusRemotePlugin *object,
1722     GDBusMethodInvocation *invocation)
1723 {
1724   g_dbus_method_invocation_return_value (invocation,
1725     g_variant_new ("()"));
1726 }
1727
1728 /**
1729  * gsignond_dbus_remote_plugin_complete_refresh:
1730  * @object: A #GSignondDbusRemotePlugin.
1731  * @invocation: (transfer full): A #GDBusMethodInvocation.
1732  *
1733  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.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.
1734  *
1735  * This method will free @invocation, you cannot use it afterwards.
1736  */
1737 void
1738 gsignond_dbus_remote_plugin_complete_refresh (
1739     GSignondDbusRemotePlugin *object,
1740     GDBusMethodInvocation *invocation)
1741 {
1742   g_dbus_method_invocation_return_value (invocation,
1743     g_variant_new ("()"));
1744 }
1745
1746 /**
1747  * gsignond_dbus_remote_plugin_complete_get_info:
1748  * @object: A #GSignondDbusRemotePlugin.
1749  * @invocation: (transfer full): A #GDBusMethodInvocation.
1750  * @type: Parameter to return.
1751  * @mechanisms: Parameter to return.
1752  *
1753  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.getInfo">getInfo()</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.
1754  *
1755  * This method will free @invocation, you cannot use it afterwards.
1756  */
1757 void
1758 gsignond_dbus_remote_plugin_complete_get_info (
1759     GSignondDbusRemotePlugin *object,
1760     GDBusMethodInvocation *invocation,
1761     const gchar *type,
1762     const gchar *const *mechanisms)
1763 {
1764   g_dbus_method_invocation_return_value (invocation,
1765     g_variant_new ("(s^as)",
1766                    type,
1767                    mechanisms));
1768 }
1769
1770 /* ------------------------------------------------------------------------ */
1771
1772 /**
1773  * GSignondDbusRemotePluginProxy:
1774  *
1775  * The #GSignondDbusRemotePluginProxy structure contains only private data and should only be accessed using the provided API.
1776  */
1777
1778 /**
1779  * GSignondDbusRemotePluginProxyClass:
1780  * @parent_class: The parent class.
1781  *
1782  * Class structure for #GSignondDbusRemotePluginProxy.
1783  */
1784
1785 struct _GSignondDbusRemotePluginProxyPrivate
1786 {
1787   GData *qdata;
1788 };
1789
1790 static void gsignond_dbus_remote_plugin_proxy_iface_init (GSignondDbusRemotePluginIface *iface);
1791
1792 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginProxy, gsignond_dbus_remote_plugin_proxy, G_TYPE_DBUS_PROXY,
1793                          G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, gsignond_dbus_remote_plugin_proxy_iface_init));
1794
1795 static void
1796 gsignond_dbus_remote_plugin_proxy_finalize (GObject *object)
1797 {
1798   GSignondDbusRemotePluginProxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY (object);
1799   g_datalist_clear (&proxy->priv->qdata);
1800   G_OBJECT_CLASS (gsignond_dbus_remote_plugin_proxy_parent_class)->finalize (object);
1801 }
1802
1803 static void
1804 gsignond_dbus_remote_plugin_proxy_get_property (GObject      *object,
1805   guint         prop_id,
1806   GValue       *value,
1807   GParamSpec   *pspec)
1808 {
1809 }
1810
1811 static void
1812 gsignond_dbus_remote_plugin_proxy_set_property (GObject      *object,
1813   guint         prop_id,
1814   const GValue *value,
1815   GParamSpec   *pspec)
1816 {
1817 }
1818
1819 static void
1820 gsignond_dbus_remote_plugin_proxy_g_signal (GDBusProxy *proxy,
1821   const gchar *sender_name,
1822   const gchar *signal_name,
1823   GVariant *parameters)
1824 {
1825   _ExtendedGDBusSignalInfo *info;
1826   GVariantIter iter;
1827   GVariant *child;
1828   GValue *paramv;
1829   guint num_params;
1830   guint n;
1831   guint signal_id;
1832   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, signal_name);
1833   if (info == NULL)
1834     return;
1835   num_params = g_variant_n_children (parameters);
1836   paramv = g_new0 (GValue, num_params + 1);
1837   g_value_init (&paramv[0], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN);
1838   g_value_set_object (&paramv[0], proxy);
1839   g_variant_iter_init (&iter, parameters);
1840   n = 1;
1841   while ((child = g_variant_iter_next_value (&iter)) != NULL)
1842     {
1843       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1844       if (arg_info->use_gvariant)
1845         {
1846           g_value_init (&paramv[n], G_TYPE_VARIANT);
1847           g_value_set_variant (&paramv[n], child);
1848           n++;
1849         }
1850       else
1851         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
1852       g_variant_unref (child);
1853     }
1854   signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN);
1855   g_signal_emitv (paramv, signal_id, 0, NULL);
1856   for (n = 0; n < num_params + 1; n++)
1857     g_value_unset (&paramv[n]);
1858   g_free (paramv);
1859 }
1860
1861 static void
1862 gsignond_dbus_remote_plugin_proxy_g_properties_changed (GDBusProxy *_proxy,
1863   GVariant *changed_properties,
1864   const gchar *const *invalidated_properties)
1865 {
1866   GSignondDbusRemotePluginProxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_PROXY (_proxy);
1867   guint n;
1868   const gchar *key;
1869   GVariantIter *iter;
1870   _ExtendedGDBusPropertyInfo *info;
1871   g_variant_get (changed_properties, "a{sv}", &iter);
1872   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1873     {
1874       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, key);
1875       g_datalist_remove_data (&proxy->priv->qdata, key);
1876       if (info != NULL)
1877         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1878     }
1879   g_variant_iter_free (iter);
1880   for (n = 0; invalidated_properties[n] != NULL; n++)
1881     {
1882       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, invalidated_properties[n]);
1883       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1884       if (info != NULL)
1885         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1886     }
1887 }
1888
1889 static void
1890 gsignond_dbus_remote_plugin_proxy_init (GSignondDbusRemotePluginProxy *proxy)
1891 {
1892   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_PROXY, GSignondDbusRemotePluginProxyPrivate);
1893   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_remote_plugin_interface_info ());
1894 }
1895
1896 static void
1897 gsignond_dbus_remote_plugin_proxy_class_init (GSignondDbusRemotePluginProxyClass *klass)
1898 {
1899   GObjectClass *gobject_class;
1900   GDBusProxyClass *proxy_class;
1901
1902   g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginProxyPrivate));
1903
1904   gobject_class = G_OBJECT_CLASS (klass);
1905   gobject_class->finalize     = gsignond_dbus_remote_plugin_proxy_finalize;
1906   gobject_class->get_property = gsignond_dbus_remote_plugin_proxy_get_property;
1907   gobject_class->set_property = gsignond_dbus_remote_plugin_proxy_set_property;
1908
1909   proxy_class = G_DBUS_PROXY_CLASS (klass);
1910   proxy_class->g_signal = gsignond_dbus_remote_plugin_proxy_g_signal;
1911   proxy_class->g_properties_changed = gsignond_dbus_remote_plugin_proxy_g_properties_changed;
1912
1913 }
1914
1915 static void
1916 gsignond_dbus_remote_plugin_proxy_iface_init (GSignondDbusRemotePluginIface *iface)
1917 {
1918 }
1919
1920 /**
1921  * gsignond_dbus_remote_plugin_proxy_new:
1922  * @connection: A #GDBusConnection.
1923  * @flags: Flags from the #GDBusProxyFlags enumeration.
1924  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1925  * @object_path: An object path.
1926  * @cancellable: (allow-none): A #GCancellable or %NULL.
1927  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1928  * @user_data: User data to pass to @callback.
1929  *
1930  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link>. See g_dbus_proxy_new() for more details.
1931  *
1932  * 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.
1933  * You can then call gsignond_dbus_remote_plugin_proxy_new_finish() to get the result of the operation.
1934  *
1935  * See gsignond_dbus_remote_plugin_proxy_new_sync() for the synchronous, blocking version of this constructor.
1936  */
1937 void
1938 gsignond_dbus_remote_plugin_proxy_new (
1939     GDBusConnection     *connection,
1940     GDBusProxyFlags      flags,
1941     const gchar         *name,
1942     const gchar         *object_path,
1943     GCancellable        *cancellable,
1944     GAsyncReadyCallback  callback,
1945     gpointer             user_data)
1946 {
1947   g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_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", NULL);
1948 }
1949
1950 /**
1951  * gsignond_dbus_remote_plugin_proxy_new_finish:
1952  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_proxy_new().
1953  * @error: Return location for error or %NULL
1954  *
1955  * Finishes an operation started with gsignond_dbus_remote_plugin_proxy_new().
1956  *
1957  * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set.
1958  */
1959 GSignondDbusRemotePlugin *
1960 gsignond_dbus_remote_plugin_proxy_new_finish (
1961     GAsyncResult        *res,
1962     GError             **error)
1963 {
1964   GObject *ret;
1965   GObject *source_object;
1966   source_object = g_async_result_get_source_object (res);
1967   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1968   g_object_unref (source_object);
1969   if (ret != NULL)
1970     return GSIGNOND_DBUS_REMOTE_PLUGIN (ret);
1971   else
1972     return NULL;
1973 }
1974
1975 /**
1976  * gsignond_dbus_remote_plugin_proxy_new_sync:
1977  * @connection: A #GDBusConnection.
1978  * @flags: Flags from the #GDBusProxyFlags enumeration.
1979  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1980  * @object_path: An object path.
1981  * @cancellable: (allow-none): A #GCancellable or %NULL.
1982  * @error: Return location for error or %NULL
1983  *
1984  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link>. See g_dbus_proxy_new_sync() for more details.
1985  *
1986  * The calling thread is blocked until a reply is received.
1987  *
1988  * See gsignond_dbus_remote_plugin_proxy_new() for the asynchronous version of this constructor.
1989  *
1990  * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set.
1991  */
1992 GSignondDbusRemotePlugin *
1993 gsignond_dbus_remote_plugin_proxy_new_sync (
1994     GDBusConnection     *connection,
1995     GDBusProxyFlags      flags,
1996     const gchar         *name,
1997     const gchar         *object_path,
1998     GCancellable        *cancellable,
1999     GError             **error)
2000 {
2001   GInitable *ret;
2002   ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_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", NULL);
2003   if (ret != NULL)
2004     return GSIGNOND_DBUS_REMOTE_PLUGIN (ret);
2005   else
2006     return NULL;
2007 }
2008
2009
2010 /**
2011  * gsignond_dbus_remote_plugin_proxy_new_for_bus:
2012  * @bus_type: A #GBusType.
2013  * @flags: Flags from the #GDBusProxyFlags enumeration.
2014  * @name: A bus name (well-known or unique).
2015  * @object_path: An object path.
2016  * @cancellable: (allow-none): A #GCancellable or %NULL.
2017  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
2018  * @user_data: User data to pass to @callback.
2019  *
2020  * Like gsignond_dbus_remote_plugin_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
2021  *
2022  * 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.
2023  * You can then call gsignond_dbus_remote_plugin_proxy_new_for_bus_finish() to get the result of the operation.
2024  *
2025  * See gsignond_dbus_remote_plugin_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
2026  */
2027 void
2028 gsignond_dbus_remote_plugin_proxy_new_for_bus (
2029     GBusType             bus_type,
2030     GDBusProxyFlags      flags,
2031     const gchar         *name,
2032     const gchar         *object_path,
2033     GCancellable        *cancellable,
2034     GAsyncReadyCallback  callback,
2035     gpointer             user_data)
2036 {
2037   g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_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", NULL);
2038 }
2039
2040 /**
2041  * gsignond_dbus_remote_plugin_proxy_new_for_bus_finish:
2042  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_proxy_new_for_bus().
2043  * @error: Return location for error or %NULL
2044  *
2045  * Finishes an operation started with gsignond_dbus_remote_plugin_proxy_new_for_bus().
2046  *
2047  * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set.
2048  */
2049 GSignondDbusRemotePlugin *
2050 gsignond_dbus_remote_plugin_proxy_new_for_bus_finish (
2051     GAsyncResult        *res,
2052     GError             **error)
2053 {
2054   GObject *ret;
2055   GObject *source_object;
2056   source_object = g_async_result_get_source_object (res);
2057   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
2058   g_object_unref (source_object);
2059   if (ret != NULL)
2060     return GSIGNOND_DBUS_REMOTE_PLUGIN (ret);
2061   else
2062     return NULL;
2063 }
2064
2065 /**
2066  * gsignond_dbus_remote_plugin_proxy_new_for_bus_sync:
2067  * @bus_type: A #GBusType.
2068  * @flags: Flags from the #GDBusProxyFlags enumeration.
2069  * @name: A bus name (well-known or unique).
2070  * @object_path: An object path.
2071  * @cancellable: (allow-none): A #GCancellable or %NULL.
2072  * @error: Return location for error or %NULL
2073  *
2074  * Like gsignond_dbus_remote_plugin_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
2075  *
2076  * The calling thread is blocked until a reply is received.
2077  *
2078  * See gsignond_dbus_remote_plugin_proxy_new_for_bus() for the asynchronous version of this constructor.
2079  *
2080  * Returns: (transfer full) (type GSignondDbusRemotePluginProxy): The constructed proxy object or %NULL if @error is set.
2081  */
2082 GSignondDbusRemotePlugin *
2083 gsignond_dbus_remote_plugin_proxy_new_for_bus_sync (
2084     GBusType             bus_type,
2085     GDBusProxyFlags      flags,
2086     const gchar         *name,
2087     const gchar         *object_path,
2088     GCancellable        *cancellable,
2089     GError             **error)
2090 {
2091   GInitable *ret;
2092   ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_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", NULL);
2093   if (ret != NULL)
2094     return GSIGNOND_DBUS_REMOTE_PLUGIN (ret);
2095   else
2096     return NULL;
2097 }
2098
2099
2100 /* ------------------------------------------------------------------------ */
2101
2102 /**
2103  * GSignondDbusRemotePluginSkeleton:
2104  *
2105  * The #GSignondDbusRemotePluginSkeleton structure contains only private data and should only be accessed using the provided API.
2106  */
2107
2108 /**
2109  * GSignondDbusRemotePluginSkeletonClass:
2110  * @parent_class: The parent class.
2111  *
2112  * Class structure for #GSignondDbusRemotePluginSkeleton.
2113  */
2114
2115 struct _GSignondDbusRemotePluginSkeletonPrivate
2116 {
2117   GValue *properties;
2118   GList *changed_properties;
2119   GSource *changed_properties_idle_source;
2120   GMainContext *context;
2121   GMutex lock;
2122 };
2123
2124 static void
2125 _gsignond_dbus_remote_plugin_skeleton_handle_method_call (
2126   GDBusConnection *connection,
2127   const gchar *sender,
2128   const gchar *object_path,
2129   const gchar *interface_name,
2130   const gchar *method_name,
2131   GVariant *parameters,
2132   GDBusMethodInvocation *invocation,
2133   gpointer user_data)
2134 {
2135   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data);
2136   _ExtendedGDBusMethodInfo *info;
2137   GVariantIter iter;
2138   GVariant *child;
2139   GValue *paramv;
2140   guint num_params;
2141   guint num_extra;
2142   guint n;
2143   guint signal_id;
2144   GValue return_value = G_VALUE_INIT;
2145   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
2146   g_assert (info != NULL);
2147   num_params = g_variant_n_children (parameters);
2148   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
2149   n = 0;
2150   g_value_init (&paramv[n], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN);
2151   g_value_set_object (&paramv[n++], skeleton);
2152   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
2153   g_value_set_object (&paramv[n++], invocation);
2154   if (info->pass_fdlist)
2155     {
2156 #ifdef G_OS_UNIX
2157       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
2158       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
2159 #else
2160       g_assert_not_reached ();
2161 #endif
2162     }
2163   g_variant_iter_init (&iter, parameters);
2164   while ((child = g_variant_iter_next_value (&iter)) != NULL)
2165     {
2166       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
2167       if (arg_info->use_gvariant)
2168         {
2169           g_value_init (&paramv[n], G_TYPE_VARIANT);
2170           g_value_set_variant (&paramv[n], child);
2171           n++;
2172         }
2173       else
2174         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
2175       g_variant_unref (child);
2176     }
2177   signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN);
2178   g_value_init (&return_value, G_TYPE_BOOLEAN);
2179   g_signal_emitv (paramv, signal_id, 0, &return_value);
2180   if (!g_value_get_boolean (&return_value))
2181     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);
2182   g_value_unset (&return_value);
2183   for (n = 0; n < num_params + num_extra; n++)
2184     g_value_unset (&paramv[n]);
2185   g_free (paramv);
2186 }
2187
2188 static GVariant *
2189 _gsignond_dbus_remote_plugin_skeleton_handle_get_property (
2190   GDBusConnection *connection,
2191   const gchar *sender,
2192   const gchar *object_path,
2193   const gchar *interface_name,
2194   const gchar *property_name,
2195   GError **error,
2196   gpointer user_data)
2197 {
2198   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data);
2199   GValue value = G_VALUE_INIT;
2200   GParamSpec *pspec;
2201   _ExtendedGDBusPropertyInfo *info;
2202   GVariant *ret;
2203   ret = NULL;
2204   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name);
2205   g_assert (info != NULL);
2206   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2207   if (pspec == NULL)
2208     {
2209       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2210     }
2211   else
2212     {
2213       g_value_init (&value, pspec->value_type);
2214       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2215       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
2216       g_value_unset (&value);
2217     }
2218   return ret;
2219 }
2220
2221 static gboolean
2222 _gsignond_dbus_remote_plugin_skeleton_handle_set_property (
2223   GDBusConnection *connection,
2224   const gchar *sender,
2225   const gchar *object_path,
2226   const gchar *interface_name,
2227   const gchar *property_name,
2228   GVariant *variant,
2229   GError **error,
2230   gpointer user_data)
2231 {
2232   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (user_data);
2233   GValue value = G_VALUE_INIT;
2234   GParamSpec *pspec;
2235   _ExtendedGDBusPropertyInfo *info;
2236   gboolean ret;
2237   ret = FALSE;
2238   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_interface_info.parent_struct, property_name);
2239   g_assert (info != NULL);
2240   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2241   if (pspec == NULL)
2242     {
2243       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2244     }
2245   else
2246     {
2247       if (info->use_gvariant)
2248         g_value_set_variant (&value, variant);
2249       else
2250         g_dbus_gvariant_to_gvalue (variant, &value);
2251       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2252       g_value_unset (&value);
2253       ret = TRUE;
2254     }
2255   return ret;
2256 }
2257
2258 static const GDBusInterfaceVTable _gsignond_dbus_remote_plugin_skeleton_vtable =
2259 {
2260   _gsignond_dbus_remote_plugin_skeleton_handle_method_call,
2261   _gsignond_dbus_remote_plugin_skeleton_handle_get_property,
2262   _gsignond_dbus_remote_plugin_skeleton_handle_set_property
2263 };
2264
2265 static GDBusInterfaceInfo *
2266 gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
2267 {
2268   return gsignond_dbus_remote_plugin_interface_info ();
2269 }
2270
2271 static GDBusInterfaceVTable *
2272 gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
2273 {
2274   return (GDBusInterfaceVTable *) &_gsignond_dbus_remote_plugin_skeleton_vtable;
2275 }
2276
2277 static GVariant *
2278 gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
2279 {
2280   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (_skeleton);
2281
2282   GVariantBuilder builder;
2283   guint n;
2284   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2285   if (_gsignond_dbus_remote_plugin_interface_info.parent_struct.properties == NULL)
2286     goto out;
2287   for (n = 0; _gsignond_dbus_remote_plugin_interface_info.parent_struct.properties[n] != NULL; n++)
2288     {
2289       GDBusPropertyInfo *info = _gsignond_dbus_remote_plugin_interface_info.parent_struct.properties[n];
2290       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
2291         {
2292           GVariant *value;
2293           value = _gsignond_dbus_remote_plugin_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", info->name, NULL, skeleton);
2294           if (value != NULL)
2295             {
2296               g_variant_take_ref (value);
2297               g_variant_builder_add (&builder, "{sv}", info->name, value);
2298               g_variant_unref (value);
2299             }
2300         }
2301     }
2302 out:
2303   return g_variant_builder_end (&builder);
2304 }
2305
2306 static void
2307 gsignond_dbus_remote_plugin_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
2308 {
2309 }
2310
2311 static void
2312 _gsignond_dbus_remote_plugin_on_signal_response (
2313     GSignondDbusRemotePlugin *object,
2314     GVariant *arg_sessionData)
2315 {
2316   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2317
2318   GList      *connections, *l;
2319   GVariant   *signal_variant;
2320   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2321
2322   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2323                    arg_sessionData));
2324   for (l = connections; l != NULL; l = l->next)
2325     {
2326       GDBusConnection *connection = l->data;
2327       g_dbus_connection_emit_signal (connection,
2328         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "response",
2329         signal_variant, NULL);
2330     }
2331   g_variant_unref (signal_variant);
2332   g_list_free_full (connections, g_object_unref);
2333 }
2334
2335 static void
2336 _gsignond_dbus_remote_plugin_on_signal_response_final (
2337     GSignondDbusRemotePlugin *object,
2338     GVariant *arg_sessionData)
2339 {
2340   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2341
2342   GList      *connections, *l;
2343   GVariant   *signal_variant;
2344   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2345
2346   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2347                    arg_sessionData));
2348   for (l = connections; l != NULL; l = l->next)
2349     {
2350       GDBusConnection *connection = l->data;
2351       g_dbus_connection_emit_signal (connection,
2352         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "responseFinal",
2353         signal_variant, NULL);
2354     }
2355   g_variant_unref (signal_variant);
2356   g_list_free_full (connections, g_object_unref);
2357 }
2358
2359 static void
2360 _gsignond_dbus_remote_plugin_on_signal_store (
2361     GSignondDbusRemotePlugin *object,
2362     GVariant *arg_sessionData)
2363 {
2364   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2365
2366   GList      *connections, *l;
2367   GVariant   *signal_variant;
2368   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2369
2370   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2371                    arg_sessionData));
2372   for (l = connections; l != NULL; l = l->next)
2373     {
2374       GDBusConnection *connection = l->data;
2375       g_dbus_connection_emit_signal (connection,
2376         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "store",
2377         signal_variant, NULL);
2378     }
2379   g_variant_unref (signal_variant);
2380   g_list_free_full (connections, g_object_unref);
2381 }
2382
2383 static void
2384 _gsignond_dbus_remote_plugin_on_signal_error (
2385     GSignondDbusRemotePlugin *object,
2386     GVariant *arg_error)
2387 {
2388   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2389
2390   GList      *connections, *l;
2391   GVariant   *signal_variant;
2392   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2393
2394   signal_variant = g_variant_ref_sink (g_variant_new ("(@(uis))",
2395                    arg_error));
2396   for (l = connections; l != NULL; l = l->next)
2397     {
2398       GDBusConnection *connection = l->data;
2399       g_dbus_connection_emit_signal (connection,
2400         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "error",
2401         signal_variant, NULL);
2402     }
2403   g_variant_unref (signal_variant);
2404   g_list_free_full (connections, g_object_unref);
2405 }
2406
2407 static void
2408 _gsignond_dbus_remote_plugin_on_signal_user_action_required (
2409     GSignondDbusRemotePlugin *object,
2410     GVariant *arg_uiData)
2411 {
2412   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2413
2414   GList      *connections, *l;
2415   GVariant   *signal_variant;
2416   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2417
2418   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2419                    arg_uiData));
2420   for (l = connections; l != NULL; l = l->next)
2421     {
2422       GDBusConnection *connection = l->data;
2423       g_dbus_connection_emit_signal (connection,
2424         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "userActionRequired",
2425         signal_variant, NULL);
2426     }
2427   g_variant_unref (signal_variant);
2428   g_list_free_full (connections, g_object_unref);
2429 }
2430
2431 static void
2432 _gsignond_dbus_remote_plugin_on_signal_refreshed (
2433     GSignondDbusRemotePlugin *object,
2434     GVariant *arg_uiData)
2435 {
2436   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2437
2438   GList      *connections, *l;
2439   GVariant   *signal_variant;
2440   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2441
2442   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2443                    arg_uiData));
2444   for (l = connections; l != NULL; l = l->next)
2445     {
2446       GDBusConnection *connection = l->data;
2447       g_dbus_connection_emit_signal (connection,
2448         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "refreshed",
2449         signal_variant, NULL);
2450     }
2451   g_variant_unref (signal_variant);
2452   g_list_free_full (connections, g_object_unref);
2453 }
2454
2455 static void
2456 _gsignond_dbus_remote_plugin_on_signal_status_changed (
2457     GSignondDbusRemotePlugin *object,
2458     gint arg_state,
2459     const gchar *arg_message)
2460 {
2461   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2462
2463   GList      *connections, *l;
2464   GVariant   *signal_variant;
2465   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2466
2467   signal_variant = g_variant_ref_sink (g_variant_new ("(is)",
2468                    arg_state,
2469                    arg_message));
2470   for (l = connections; l != NULL; l = l->next)
2471     {
2472       GDBusConnection *connection = l->data;
2473       g_dbus_connection_emit_signal (connection,
2474         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin", "statusChanged",
2475         signal_variant, NULL);
2476     }
2477   g_variant_unref (signal_variant);
2478   g_list_free_full (connections, g_object_unref);
2479 }
2480
2481 static void gsignond_dbus_remote_plugin_skeleton_iface_init (GSignondDbusRemotePluginIface *iface);
2482 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginSkeleton, gsignond_dbus_remote_plugin_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2483                          G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN, gsignond_dbus_remote_plugin_skeleton_iface_init));
2484
2485 static void
2486 gsignond_dbus_remote_plugin_skeleton_finalize (GObject *object)
2487 {
2488   GSignondDbusRemotePluginSkeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_SKELETON (object);
2489   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2490   if (skeleton->priv->changed_properties_idle_source != NULL)
2491     g_source_destroy (skeleton->priv->changed_properties_idle_source);
2492   g_main_context_unref (skeleton->priv->context);
2493   g_mutex_clear (&skeleton->priv->lock);
2494   G_OBJECT_CLASS (gsignond_dbus_remote_plugin_skeleton_parent_class)->finalize (object);
2495 }
2496
2497 static void
2498 gsignond_dbus_remote_plugin_skeleton_init (GSignondDbusRemotePluginSkeleton *skeleton)
2499 {
2500   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, GSignondDbusRemotePluginSkeletonPrivate);
2501   g_mutex_init (&skeleton->priv->lock);
2502   skeleton->priv->context = g_main_context_ref_thread_default ();
2503 }
2504
2505 static void
2506 gsignond_dbus_remote_plugin_skeleton_class_init (GSignondDbusRemotePluginSkeletonClass *klass)
2507 {
2508   GObjectClass *gobject_class;
2509   GDBusInterfaceSkeletonClass *skeleton_class;
2510
2511   g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginSkeletonPrivate));
2512
2513   gobject_class = G_OBJECT_CLASS (klass);
2514   gobject_class->finalize = gsignond_dbus_remote_plugin_skeleton_finalize;
2515
2516   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
2517   skeleton_class->get_info = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_info;
2518   skeleton_class->get_properties = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_properties;
2519   skeleton_class->flush = gsignond_dbus_remote_plugin_skeleton_dbus_interface_flush;
2520   skeleton_class->get_vtable = gsignond_dbus_remote_plugin_skeleton_dbus_interface_get_vtable;
2521 }
2522
2523 static void
2524 gsignond_dbus_remote_plugin_skeleton_iface_init (GSignondDbusRemotePluginIface *iface)
2525 {
2526   iface->response = _gsignond_dbus_remote_plugin_on_signal_response;
2527   iface->response_final = _gsignond_dbus_remote_plugin_on_signal_response_final;
2528   iface->store = _gsignond_dbus_remote_plugin_on_signal_store;
2529   iface->error = _gsignond_dbus_remote_plugin_on_signal_error;
2530   iface->user_action_required = _gsignond_dbus_remote_plugin_on_signal_user_action_required;
2531   iface->refreshed = _gsignond_dbus_remote_plugin_on_signal_refreshed;
2532   iface->status_changed = _gsignond_dbus_remote_plugin_on_signal_status_changed;
2533 }
2534
2535 /**
2536  * gsignond_dbus_remote_plugin_skeleton_new:
2537  *
2538  * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin</link>.
2539  *
2540  * Returns: (transfer full) (type GSignondDbusRemotePluginSkeleton): The skeleton object.
2541  */
2542 GSignondDbusRemotePlugin *
2543 gsignond_dbus_remote_plugin_skeleton_new (void)
2544 {
2545   return GSIGNOND_DBUS_REMOTE_PLUGIN (g_object_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_SKELETON, NULL));
2546 }
2547