Update to upstream 1.0.1
[profile/ivi/gsignond.git] / src / daemon / dbus / gsignond-dbus-remote-plugin-gen.c
1 /*
2  * Generated by gdbus-codegen 2.32.4. 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.V1
153  * ------------------------------------------------------------------------
154  */
155
156 /**
157  * SECTION:GSignondDbusRemotePluginV1
158  * @title: GSignondDbusRemotePluginV1
159  * @short_description: Generated C code for the com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 D-Bus interface
160  *
161  * This section contains code for working with the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link> D-Bus interface in C.
162  */
163
164 /* ---- Introspection data for com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1 ---- */
165
166 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_cancel =
167 {
168   {
169     -1,
170     "cancel",
171     NULL,
172     NULL,
173     NULL
174   },
175   "handle-cancel",
176   FALSE
177 };
178
179 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData =
180 {
181   {
182     -1,
183     "sessionData",
184     "a{sv}",
185     NULL
186   },
187   FALSE
188 };
189
190 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache =
191 {
192   {
193     -1,
194     "identityMethodCache",
195     "a{sv}",
196     NULL
197   },
198   FALSE
199 };
200
201 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism =
202 {
203   {
204     -1,
205     "mechanism",
206     "s",
207     NULL
208   },
209   FALSE
210 };
211
212 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_pointers[] =
213 {
214   &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_sessionData,
215   &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_identityMethodCache,
216   &_gsignond_dbus_remote_plugin_v1_method_info_request_initial_IN_ARG_mechanism,
217   NULL
218 };
219
220 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request_initial =
221 {
222   {
223     -1,
224     "requestInitial",
225     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_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_v1_method_info_request_IN_ARG_sessionData =
234 {
235   {
236     -1,
237     "sessionData",
238     "a{sv}",
239     NULL
240   },
241   FALSE
242 };
243
244 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_pointers[] =
245 {
246   &_gsignond_dbus_remote_plugin_v1_method_info_request_IN_ARG_sessionData,
247   NULL
248 };
249
250 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_request =
251 {
252   {
253     -1,
254     "request",
255     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_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_v1_method_info_user_action_finished_IN_ARG_uiData =
264 {
265   {
266     -1,
267     "uiData",
268     "a{sv}",
269     NULL
270   },
271   FALSE
272 };
273
274 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_pointers[] =
275 {
276   &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished_IN_ARG_uiData,
277   NULL
278 };
279
280 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_user_action_finished =
281 {
282   {
283     -1,
284     "userActionFinished",
285     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_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_v1_method_info_refresh_IN_ARG_uiData =
294 {
295   {
296     -1,
297     "uiData",
298     "a{sv}",
299     NULL
300   },
301   FALSE
302 };
303
304 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers[] =
305 {
306   &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_uiData,
307   NULL
308 };
309
310 static const _ExtendedGDBusMethodInfo _gsignond_dbus_remote_plugin_v1_method_info_refresh =
311 {
312   {
313     -1,
314     "refresh",
315     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_refresh_IN_ARG_pointers,
316     NULL,
317     NULL
318   },
319   "handle-refresh",
320   FALSE
321 };
322
323 static const _ExtendedGDBusMethodInfo * const _gsignond_dbus_remote_plugin_v1_method_info_pointers[] =
324 {
325   &_gsignond_dbus_remote_plugin_v1_method_info_cancel,
326   &_gsignond_dbus_remote_plugin_v1_method_info_request_initial,
327   &_gsignond_dbus_remote_plugin_v1_method_info_request,
328   &_gsignond_dbus_remote_plugin_v1_method_info_user_action_finished,
329   &_gsignond_dbus_remote_plugin_v1_method_info_refresh,
330   NULL
331 };
332
333 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData =
334 {
335   {
336     -1,
337     "sessionData",
338     "a{sv}",
339     NULL
340   },
341   FALSE
342 };
343
344 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers[] =
345 {
346   &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_sessionData,
347   NULL
348 };
349
350 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response =
351 {
352   {
353     -1,
354     "response",
355     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_ARG_pointers,
356     NULL
357   },
358   "response"
359 };
360
361 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData =
362 {
363   {
364     -1,
365     "sessionData",
366     "a{sv}",
367     NULL
368   },
369   FALSE
370 };
371
372 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers[] =
373 {
374   &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_sessionData,
375   NULL
376 };
377
378 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_response_final =
379 {
380   {
381     -1,
382     "responseFinal",
383     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_response_final_ARG_pointers,
384     NULL
385   },
386   "response-final"
387 };
388
389 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData =
390 {
391   {
392     -1,
393     "sessionData",
394     "a{sv}",
395     NULL
396   },
397   FALSE
398 };
399
400 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers[] =
401 {
402   &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_sessionData,
403   NULL
404 };
405
406 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_store =
407 {
408   {
409     -1,
410     "store",
411     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_store_ARG_pointers,
412     NULL
413   },
414   "store"
415 };
416
417 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error =
418 {
419   {
420     -1,
421     "error",
422     "(uis)",
423     NULL
424   },
425   FALSE
426 };
427
428 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers[] =
429 {
430   &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_error,
431   NULL
432 };
433
434 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_error =
435 {
436   {
437     -1,
438     "error",
439     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_error_ARG_pointers,
440     NULL
441   },
442   "error"
443 };
444
445 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData =
446 {
447   {
448     -1,
449     "uiData",
450     "a{sv}",
451     NULL
452   },
453   FALSE
454 };
455
456 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers[] =
457 {
458   &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_uiData,
459   NULL
460 };
461
462 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_user_action_required =
463 {
464   {
465     -1,
466     "userActionRequired",
467     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required_ARG_pointers,
468     NULL
469   },
470   "user-action-required"
471 };
472
473 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData =
474 {
475   {
476     -1,
477     "uiData",
478     "a{sv}",
479     NULL
480   },
481   FALSE
482 };
483
484 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers[] =
485 {
486   &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_uiData,
487   NULL
488 };
489
490 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_refreshed =
491 {
492   {
493     -1,
494     "refreshed",
495     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed_ARG_pointers,
496     NULL
497   },
498   "refreshed"
499 };
500
501 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state =
502 {
503   {
504     -1,
505     "state",
506     "i",
507     NULL
508   },
509   FALSE
510 };
511
512 static const _ExtendedGDBusArgInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message =
513 {
514   {
515     -1,
516     "message",
517     "s",
518     NULL
519   },
520   FALSE
521 };
522
523 static const _ExtendedGDBusArgInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers[] =
524 {
525   &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_state,
526   &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_message,
527   NULL
528 };
529
530 static const _ExtendedGDBusSignalInfo _gsignond_dbus_remote_plugin_v1_signal_info_status_changed =
531 {
532   {
533     -1,
534     "statusChanged",
535     (GDBusArgInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed_ARG_pointers,
536     NULL
537   },
538   "status-changed"
539 };
540
541 static const _ExtendedGDBusSignalInfo * const _gsignond_dbus_remote_plugin_v1_signal_info_pointers[] =
542 {
543   &_gsignond_dbus_remote_plugin_v1_signal_info_response,
544   &_gsignond_dbus_remote_plugin_v1_signal_info_response_final,
545   &_gsignond_dbus_remote_plugin_v1_signal_info_store,
546   &_gsignond_dbus_remote_plugin_v1_signal_info_error,
547   &_gsignond_dbus_remote_plugin_v1_signal_info_user_action_required,
548   &_gsignond_dbus_remote_plugin_v1_signal_info_refreshed,
549   &_gsignond_dbus_remote_plugin_v1_signal_info_status_changed,
550   NULL
551 };
552
553 static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_method =
554 {
555   {
556     -1,
557     "method",
558     "s",
559     G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
560     NULL
561   },
562   "method",
563   FALSE
564 };
565
566 static const _ExtendedGDBusPropertyInfo _gsignond_dbus_remote_plugin_v1_property_info_mechanisms =
567 {
568   {
569     -1,
570     "mechanisms",
571     "as",
572     G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
573     NULL
574   },
575   "mechanisms",
576   FALSE
577 };
578
579 static const _ExtendedGDBusPropertyInfo * const _gsignond_dbus_remote_plugin_v1_property_info_pointers[] =
580 {
581   &_gsignond_dbus_remote_plugin_v1_property_info_method,
582   &_gsignond_dbus_remote_plugin_v1_property_info_mechanisms,
583   NULL
584 };
585
586 static const _ExtendedGDBusInterfaceInfo _gsignond_dbus_remote_plugin_v1_interface_info =
587 {
588   {
589     -1,
590     "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1",
591     (GDBusMethodInfo **) &_gsignond_dbus_remote_plugin_v1_method_info_pointers,
592     (GDBusSignalInfo **) &_gsignond_dbus_remote_plugin_v1_signal_info_pointers,
593     (GDBusPropertyInfo **) &_gsignond_dbus_remote_plugin_v1_property_info_pointers,
594     NULL
595   },
596   "remote-plugin-v1",
597 };
598
599
600 /**
601  * gsignond_dbus_remote_plugin_v1_interface_info:
602  *
603  * Gets a machine-readable description of the <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link> D-Bus interface.
604  *
605  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
606  */
607 GDBusInterfaceInfo *
608 gsignond_dbus_remote_plugin_v1_interface_info (void)
609 {
610   return (GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info;
611 }
612
613 /**
614  * gsignond_dbus_remote_plugin_v1_override_properties:
615  * @klass: The class structure for a #GObject<!-- -->-derived class.
616  * @property_id_begin: The property id to assign to the first overridden property.
617  *
618  * Overrides all #GObject properties in the #GSignondDbusRemotePluginV1 interface for a concrete class.
619  * The properties are overridden in the order they are defined.
620  *
621  * Returns: The last property id.
622  */
623 guint
624 gsignond_dbus_remote_plugin_v1_override_properties (GObjectClass *klass, guint property_id_begin)
625 {
626   g_object_class_override_property (klass, property_id_begin++, "method");
627   g_object_class_override_property (klass, property_id_begin++, "mechanisms");
628   return property_id_begin - 1;
629 }
630
631
632
633 /**
634  * GSignondDbusRemotePluginV1:
635  *
636  * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
637  */
638
639 /**
640  * GSignondDbusRemotePluginV1Iface:
641  * @parent_iface: The parent interface.
642  * @handle_cancel: Handler for the #GSignondDbusRemotePluginV1::handle-cancel signal.
643  * @handle_refresh: Handler for the #GSignondDbusRemotePluginV1::handle-refresh signal.
644  * @handle_request: Handler for the #GSignondDbusRemotePluginV1::handle-request signal.
645  * @handle_request_initial: Handler for the #GSignondDbusRemotePluginV1::handle-request-initial signal.
646  * @handle_user_action_finished: Handler for the #GSignondDbusRemotePluginV1::handle-user-action-finished signal.
647  * @get_mechanisms: Getter for the #GSignondDbusRemotePluginV1:mechanisms property.
648  * @get_method: Getter for the #GSignondDbusRemotePluginV1:method property.
649  * @error: Handler for the #GSignondDbusRemotePluginV1::error signal.
650  * @refreshed: Handler for the #GSignondDbusRemotePluginV1::refreshed signal.
651  * @response: Handler for the #GSignondDbusRemotePluginV1::response signal.
652  * @response_final: Handler for the #GSignondDbusRemotePluginV1::response-final signal.
653  * @status_changed: Handler for the #GSignondDbusRemotePluginV1::status-changed signal.
654  * @store: Handler for the #GSignondDbusRemotePluginV1::store signal.
655  * @user_action_required: Handler for the #GSignondDbusRemotePluginV1::user-action-required signal.
656  *
657  * Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
658  */
659
660 static void
661 gsignond_dbus_remote_plugin_v1_default_init (GSignondDbusRemotePluginV1Iface *iface)
662 {
663   /* GObject signals for incoming D-Bus method calls: */
664   /**
665    * GSignondDbusRemotePluginV1::handle-cancel:
666    * @object: A #GSignondDbusRemotePluginV1.
667    * @invocation: A #GDBusMethodInvocation.
668    *
669    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method.
670    *
671    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_cancel() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
672    *
673    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
674    */
675   g_signal_new ("handle-cancel",
676     G_TYPE_FROM_INTERFACE (iface),
677     G_SIGNAL_RUN_LAST,
678     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_cancel),
679     g_signal_accumulator_true_handled,
680     NULL,
681     g_cclosure_marshal_generic,
682     G_TYPE_BOOLEAN,
683     1,
684     G_TYPE_DBUS_METHOD_INVOCATION);
685
686   /**
687    * GSignondDbusRemotePluginV1::handle-request-initial:
688    * @object: A #GSignondDbusRemotePluginV1.
689    * @invocation: A #GDBusMethodInvocation.
690    * @arg_sessionData: Argument passed by remote caller.
691    * @arg_identityMethodCache: Argument passed by remote caller.
692    * @arg_mechanism: Argument passed by remote caller.
693    *
694    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method.
695    *
696    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request_initial() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
697    *
698    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
699    */
700   g_signal_new ("handle-request-initial",
701     G_TYPE_FROM_INTERFACE (iface),
702     G_SIGNAL_RUN_LAST,
703     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request_initial),
704     g_signal_accumulator_true_handled,
705     NULL,
706     g_cclosure_marshal_generic,
707     G_TYPE_BOOLEAN,
708     4,
709     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT, G_TYPE_STRING);
710
711   /**
712    * GSignondDbusRemotePluginV1::handle-request:
713    * @object: A #GSignondDbusRemotePluginV1.
714    * @invocation: A #GDBusMethodInvocation.
715    * @arg_sessionData: Argument passed by remote caller.
716    *
717    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method.
718    *
719    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_request() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
720    *
721    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
722    */
723   g_signal_new ("handle-request",
724     G_TYPE_FROM_INTERFACE (iface),
725     G_SIGNAL_RUN_LAST,
726     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_request),
727     g_signal_accumulator_true_handled,
728     NULL,
729     g_cclosure_marshal_generic,
730     G_TYPE_BOOLEAN,
731     2,
732     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
733
734   /**
735    * GSignondDbusRemotePluginV1::handle-user-action-finished:
736    * @object: A #GSignondDbusRemotePluginV1.
737    * @invocation: A #GDBusMethodInvocation.
738    * @arg_uiData: Argument passed by remote caller.
739    *
740    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method.
741    *
742    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_user_action_finished() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
743    *
744    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
745    */
746   g_signal_new ("handle-user-action-finished",
747     G_TYPE_FROM_INTERFACE (iface),
748     G_SIGNAL_RUN_LAST,
749     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_user_action_finished),
750     g_signal_accumulator_true_handled,
751     NULL,
752     g_cclosure_marshal_generic,
753     G_TYPE_BOOLEAN,
754     2,
755     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
756
757   /**
758    * GSignondDbusRemotePluginV1::handle-refresh:
759    * @object: A #GSignondDbusRemotePluginV1.
760    * @invocation: A #GDBusMethodInvocation.
761    * @arg_uiData: Argument passed by remote caller.
762    *
763    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method.
764    *
765    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gsignond_dbus_remote_plugin_v1_complete_refresh() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
766    *
767    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
768    */
769   g_signal_new ("handle-refresh",
770     G_TYPE_FROM_INTERFACE (iface),
771     G_SIGNAL_RUN_LAST,
772     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, handle_refresh),
773     g_signal_accumulator_true_handled,
774     NULL,
775     g_cclosure_marshal_generic,
776     G_TYPE_BOOLEAN,
777     2,
778     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
779
780   /* GObject signals for received D-Bus signals: */
781   /**
782    * GSignondDbusRemotePluginV1::response:
783    * @object: A #GSignondDbusRemotePluginV1.
784    * @arg_sessionData: Argument.
785    *
786    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.response">"response"</link> is received.
787    *
788    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
789    */
790   g_signal_new ("response",
791     G_TYPE_FROM_INTERFACE (iface),
792     G_SIGNAL_RUN_LAST,
793     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response),
794     NULL,
795     NULL,
796     g_cclosure_marshal_generic,
797     G_TYPE_NONE,
798     1, G_TYPE_VARIANT);
799
800   /**
801    * GSignondDbusRemotePluginV1::response-final:
802    * @object: A #GSignondDbusRemotePluginV1.
803    * @arg_sessionData: Argument.
804    *
805    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.responseFinal">"responseFinal"</link> is received.
806    *
807    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
808    */
809   g_signal_new ("response-final",
810     G_TYPE_FROM_INTERFACE (iface),
811     G_SIGNAL_RUN_LAST,
812     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, response_final),
813     NULL,
814     NULL,
815     g_cclosure_marshal_generic,
816     G_TYPE_NONE,
817     1, G_TYPE_VARIANT);
818
819   /**
820    * GSignondDbusRemotePluginV1::store:
821    * @object: A #GSignondDbusRemotePluginV1.
822    * @arg_sessionData: Argument.
823    *
824    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.store">"store"</link> is received.
825    *
826    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
827    */
828   g_signal_new ("store",
829     G_TYPE_FROM_INTERFACE (iface),
830     G_SIGNAL_RUN_LAST,
831     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, store),
832     NULL,
833     NULL,
834     g_cclosure_marshal_generic,
835     G_TYPE_NONE,
836     1, G_TYPE_VARIANT);
837
838   /**
839    * GSignondDbusRemotePluginV1::error:
840    * @object: A #GSignondDbusRemotePluginV1.
841    * @arg_error: Argument.
842    *
843    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.error">"error"</link> is received.
844    *
845    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
846    */
847   g_signal_new ("error",
848     G_TYPE_FROM_INTERFACE (iface),
849     G_SIGNAL_RUN_LAST,
850     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, error),
851     NULL,
852     NULL,
853     g_cclosure_marshal_generic,
854     G_TYPE_NONE,
855     1, G_TYPE_VARIANT);
856
857   /**
858    * GSignondDbusRemotePluginV1::user-action-required:
859    * @object: A #GSignondDbusRemotePluginV1.
860    * @arg_uiData: Argument.
861    *
862    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionRequired">"userActionRequired"</link> is received.
863    *
864    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
865    */
866   g_signal_new ("user-action-required",
867     G_TYPE_FROM_INTERFACE (iface),
868     G_SIGNAL_RUN_LAST,
869     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, user_action_required),
870     NULL,
871     NULL,
872     g_cclosure_marshal_generic,
873     G_TYPE_NONE,
874     1, G_TYPE_VARIANT);
875
876   /**
877    * GSignondDbusRemotePluginV1::refreshed:
878    * @object: A #GSignondDbusRemotePluginV1.
879    * @arg_uiData: Argument.
880    *
881    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refreshed">"refreshed"</link> is received.
882    *
883    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
884    */
885   g_signal_new ("refreshed",
886     G_TYPE_FROM_INTERFACE (iface),
887     G_SIGNAL_RUN_LAST,
888     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, refreshed),
889     NULL,
890     NULL,
891     g_cclosure_marshal_generic,
892     G_TYPE_NONE,
893     1, G_TYPE_VARIANT);
894
895   /**
896    * GSignondDbusRemotePluginV1::status-changed:
897    * @object: A #GSignondDbusRemotePluginV1.
898    * @arg_state: Argument.
899    * @arg_message: Argument.
900    *
901    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.statusChanged">"statusChanged"</link> is received.
902    *
903    * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
904    */
905   g_signal_new ("status-changed",
906     G_TYPE_FROM_INTERFACE (iface),
907     G_SIGNAL_RUN_LAST,
908     G_STRUCT_OFFSET (GSignondDbusRemotePluginV1Iface, status_changed),
909     NULL,
910     NULL,
911     g_cclosure_marshal_generic,
912     G_TYPE_NONE,
913     2, G_TYPE_INT, G_TYPE_STRING);
914
915   /* GObject properties for D-Bus properties: */
916   /**
917    * GSignondDbusRemotePluginV1:method:
918    *
919    * Represents the D-Bus property <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link>.
920    *
921    * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
922    */
923   g_object_interface_install_property (iface,
924     g_param_spec_string ("method", "method", "method", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
925   /**
926    * GSignondDbusRemotePluginV1:mechanisms:
927    *
928    * Represents the D-Bus property <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link>.
929    *
930    * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
931    */
932   g_object_interface_install_property (iface,
933     g_param_spec_boxed ("mechanisms", "mechanisms", "mechanisms", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
934 }
935
936 typedef GSignondDbusRemotePluginV1Iface GSignondDbusRemotePluginV1Interface;
937 G_DEFINE_INTERFACE (GSignondDbusRemotePluginV1, gsignond_dbus_remote_plugin_v1, G_TYPE_OBJECT);
938
939 /**
940  * gsignond_dbus_remote_plugin_v1_get_method: (skip)
941  * @object: A #GSignondDbusRemotePluginV1.
942  *
943  * Gets the value of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property.
944  *
945  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
946  *
947  * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_method() if on another thread.</warning>
948  *
949  * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
950  */
951 const gchar *
952 gsignond_dbus_remote_plugin_v1_get_method (GSignondDbusRemotePluginV1 *object)
953 {
954   return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_method (object);
955 }
956
957 /**
958  * gsignond_dbus_remote_plugin_v1_dup_method: (skip)
959  * @object: A #GSignondDbusRemotePluginV1.
960  *
961  * Gets a copy of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property.
962  *
963  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
964  *
965  * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
966  */
967 gchar *
968 gsignond_dbus_remote_plugin_v1_dup_method (GSignondDbusRemotePluginV1 *object)
969 {
970   gchar *value;
971   g_object_get (G_OBJECT (object), "method", &value, NULL);
972   return value;
973 }
974
975 /**
976  * gsignond_dbus_remote_plugin_v1_set_method: (skip)
977  * @object: A #GSignondDbusRemotePluginV1.
978  * @value: The value to set.
979  *
980  * Sets the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.method">"method"</link> D-Bus property to @value.
981  *
982  * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
983  */
984 void
985 gsignond_dbus_remote_plugin_v1_set_method (GSignondDbusRemotePluginV1 *object, const gchar *value)
986 {
987   g_object_set (G_OBJECT (object), "method", value, NULL);
988 }
989
990 /**
991  * gsignond_dbus_remote_plugin_v1_get_mechanisms: (skip)
992  * @object: A #GSignondDbusRemotePluginV1.
993  *
994  * Gets the value of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property.
995  *
996  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
997  *
998  * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use gsignond_dbus_remote_plugin_v1_dup_mechanisms() if on another thread.</warning>
999  *
1000  * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
1001  */
1002 const gchar *const *
1003 gsignond_dbus_remote_plugin_v1_get_mechanisms (GSignondDbusRemotePluginV1 *object)
1004 {
1005   return GSIGNOND_DBUS_REMOTE_PLUGIN_V1_GET_IFACE (object)->get_mechanisms (object);
1006 }
1007
1008 /**
1009  * gsignond_dbus_remote_plugin_v1_dup_mechanisms: (skip)
1010  * @object: A #GSignondDbusRemotePluginV1.
1011  *
1012  * Gets a copy of the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property.
1013  *
1014  * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
1015  *
1016  * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
1017  */
1018 gchar **
1019 gsignond_dbus_remote_plugin_v1_dup_mechanisms (GSignondDbusRemotePluginV1 *object)
1020 {
1021   gchar **value;
1022   g_object_get (G_OBJECT (object), "mechanisms", &value, NULL);
1023   return value;
1024 }
1025
1026 /**
1027  * gsignond_dbus_remote_plugin_v1_set_mechanisms: (skip)
1028  * @object: A #GSignondDbusRemotePluginV1.
1029  * @value: The value to set.
1030  *
1031  * Sets the <link linkend="gdbus-property-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.mechanisms">"mechanisms"</link> D-Bus property to @value.
1032  *
1033  * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
1034  */
1035 void
1036 gsignond_dbus_remote_plugin_v1_set_mechanisms (GSignondDbusRemotePluginV1 *object, const gchar *const *value)
1037 {
1038   g_object_set (G_OBJECT (object), "mechanisms", value, NULL);
1039 }
1040
1041 /**
1042  * gsignond_dbus_remote_plugin_v1_emit_response:
1043  * @object: A #GSignondDbusRemotePluginV1.
1044  * @arg_sessionData: Argument to pass with the signal.
1045  *
1046  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.response">"response"</link> D-Bus signal.
1047  */
1048 void
1049 gsignond_dbus_remote_plugin_v1_emit_response (
1050     GSignondDbusRemotePluginV1 *object,
1051     GVariant *arg_sessionData)
1052 {
1053   g_signal_emit_by_name (object, "response", arg_sessionData);
1054 }
1055
1056 /**
1057  * gsignond_dbus_remote_plugin_v1_emit_response_final:
1058  * @object: A #GSignondDbusRemotePluginV1.
1059  * @arg_sessionData: Argument to pass with the signal.
1060  *
1061  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.responseFinal">"responseFinal"</link> D-Bus signal.
1062  */
1063 void
1064 gsignond_dbus_remote_plugin_v1_emit_response_final (
1065     GSignondDbusRemotePluginV1 *object,
1066     GVariant *arg_sessionData)
1067 {
1068   g_signal_emit_by_name (object, "response-final", arg_sessionData);
1069 }
1070
1071 /**
1072  * gsignond_dbus_remote_plugin_v1_emit_store:
1073  * @object: A #GSignondDbusRemotePluginV1.
1074  * @arg_sessionData: Argument to pass with the signal.
1075  *
1076  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.store">"store"</link> D-Bus signal.
1077  */
1078 void
1079 gsignond_dbus_remote_plugin_v1_emit_store (
1080     GSignondDbusRemotePluginV1 *object,
1081     GVariant *arg_sessionData)
1082 {
1083   g_signal_emit_by_name (object, "store", arg_sessionData);
1084 }
1085
1086 /**
1087  * gsignond_dbus_remote_plugin_v1_emit_error:
1088  * @object: A #GSignondDbusRemotePluginV1.
1089  * @arg_error: Argument to pass with the signal.
1090  *
1091  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.error">"error"</link> D-Bus signal.
1092  */
1093 void
1094 gsignond_dbus_remote_plugin_v1_emit_error (
1095     GSignondDbusRemotePluginV1 *object,
1096     GVariant *arg_error)
1097 {
1098   g_signal_emit_by_name (object, "error", arg_error);
1099 }
1100
1101 /**
1102  * gsignond_dbus_remote_plugin_v1_emit_user_action_required:
1103  * @object: A #GSignondDbusRemotePluginV1.
1104  * @arg_uiData: Argument to pass with the signal.
1105  *
1106  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionRequired">"userActionRequired"</link> D-Bus signal.
1107  */
1108 void
1109 gsignond_dbus_remote_plugin_v1_emit_user_action_required (
1110     GSignondDbusRemotePluginV1 *object,
1111     GVariant *arg_uiData)
1112 {
1113   g_signal_emit_by_name (object, "user-action-required", arg_uiData);
1114 }
1115
1116 /**
1117  * gsignond_dbus_remote_plugin_v1_emit_refreshed:
1118  * @object: A #GSignondDbusRemotePluginV1.
1119  * @arg_uiData: Argument to pass with the signal.
1120  *
1121  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refreshed">"refreshed"</link> D-Bus signal.
1122  */
1123 void
1124 gsignond_dbus_remote_plugin_v1_emit_refreshed (
1125     GSignondDbusRemotePluginV1 *object,
1126     GVariant *arg_uiData)
1127 {
1128   g_signal_emit_by_name (object, "refreshed", arg_uiData);
1129 }
1130
1131 /**
1132  * gsignond_dbus_remote_plugin_v1_emit_status_changed:
1133  * @object: A #GSignondDbusRemotePluginV1.
1134  * @arg_state: Argument to pass with the signal.
1135  * @arg_message: Argument to pass with the signal.
1136  *
1137  * Emits the <link linkend="gdbus-signal-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.statusChanged">"statusChanged"</link> D-Bus signal.
1138  */
1139 void
1140 gsignond_dbus_remote_plugin_v1_emit_status_changed (
1141     GSignondDbusRemotePluginV1 *object,
1142     gint arg_state,
1143     const gchar *arg_message)
1144 {
1145   g_signal_emit_by_name (object, "status-changed", arg_state, arg_message);
1146 }
1147
1148 /**
1149  * gsignond_dbus_remote_plugin_v1_call_cancel:
1150  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1151  * @cancellable: (allow-none): A #GCancellable or %NULL.
1152  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1153  * @user_data: User data to pass to @callback.
1154  *
1155  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method on @proxy.
1156  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1157  * You can then call gsignond_dbus_remote_plugin_v1_call_cancel_finish() to get the result of the operation.
1158  *
1159  * See gsignond_dbus_remote_plugin_v1_call_cancel_sync() for the synchronous, blocking version of this method.
1160  */
1161 void
1162 gsignond_dbus_remote_plugin_v1_call_cancel (
1163     GSignondDbusRemotePluginV1 *proxy,
1164     GCancellable *cancellable,
1165     GAsyncReadyCallback callback,
1166     gpointer user_data)
1167 {
1168   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1169     "cancel",
1170     g_variant_new ("()"),
1171     G_DBUS_CALL_FLAGS_NONE,
1172     -1,
1173     cancellable,
1174     callback,
1175     user_data);
1176 }
1177
1178 /**
1179  * gsignond_dbus_remote_plugin_v1_call_cancel_finish:
1180  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1181  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_cancel().
1182  * @error: Return location for error or %NULL.
1183  *
1184  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_cancel().
1185  *
1186  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1187  */
1188 gboolean
1189 gsignond_dbus_remote_plugin_v1_call_cancel_finish (
1190     GSignondDbusRemotePluginV1 *proxy,
1191     GAsyncResult *res,
1192     GError **error)
1193 {
1194   GVariant *_ret;
1195   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1196   if (_ret == NULL)
1197     goto _out;
1198   g_variant_get (_ret,
1199                  "()");
1200   g_variant_unref (_ret);
1201 _out:
1202   return _ret != NULL;
1203 }
1204
1205 /**
1206  * gsignond_dbus_remote_plugin_v1_call_cancel_sync:
1207  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1208  * @cancellable: (allow-none): A #GCancellable or %NULL.
1209  * @error: Return location for error or %NULL.
1210  *
1211  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1212  *
1213  * See gsignond_dbus_remote_plugin_v1_call_cancel() for the asynchronous version of this method.
1214  *
1215  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1216  */
1217 gboolean
1218 gsignond_dbus_remote_plugin_v1_call_cancel_sync (
1219     GSignondDbusRemotePluginV1 *proxy,
1220     GCancellable *cancellable,
1221     GError **error)
1222 {
1223   GVariant *_ret;
1224   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1225     "cancel",
1226     g_variant_new ("()"),
1227     G_DBUS_CALL_FLAGS_NONE,
1228     -1,
1229     cancellable,
1230     error);
1231   if (_ret == NULL)
1232     goto _out;
1233   g_variant_get (_ret,
1234                  "()");
1235   g_variant_unref (_ret);
1236 _out:
1237   return _ret != NULL;
1238 }
1239
1240 /**
1241  * gsignond_dbus_remote_plugin_v1_call_request_initial:
1242  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1243  * @arg_sessionData: Argument to pass with the method invocation.
1244  * @arg_identityMethodCache: Argument to pass with the method invocation.
1245  * @arg_mechanism: Argument to pass with the method invocation.
1246  * @cancellable: (allow-none): A #GCancellable or %NULL.
1247  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1248  * @user_data: User data to pass to @callback.
1249  *
1250  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method on @proxy.
1251  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1252  * You can then call gsignond_dbus_remote_plugin_v1_call_request_initial_finish() to get the result of the operation.
1253  *
1254  * See gsignond_dbus_remote_plugin_v1_call_request_initial_sync() for the synchronous, blocking version of this method.
1255  */
1256 void
1257 gsignond_dbus_remote_plugin_v1_call_request_initial (
1258     GSignondDbusRemotePluginV1 *proxy,
1259     GVariant *arg_sessionData,
1260     GVariant *arg_identityMethodCache,
1261     const gchar *arg_mechanism,
1262     GCancellable *cancellable,
1263     GAsyncReadyCallback callback,
1264     gpointer user_data)
1265 {
1266   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1267     "requestInitial",
1268     g_variant_new ("(@a{sv}@a{sv}s)",
1269                    arg_sessionData,
1270                    arg_identityMethodCache,
1271                    arg_mechanism),
1272     G_DBUS_CALL_FLAGS_NONE,
1273     -1,
1274     cancellable,
1275     callback,
1276     user_data);
1277 }
1278
1279 /**
1280  * gsignond_dbus_remote_plugin_v1_call_request_initial_finish:
1281  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1282  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request_initial().
1283  * @error: Return location for error or %NULL.
1284  *
1285  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request_initial().
1286  *
1287  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1288  */
1289 gboolean
1290 gsignond_dbus_remote_plugin_v1_call_request_initial_finish (
1291     GSignondDbusRemotePluginV1 *proxy,
1292     GAsyncResult *res,
1293     GError **error)
1294 {
1295   GVariant *_ret;
1296   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1297   if (_ret == NULL)
1298     goto _out;
1299   g_variant_get (_ret,
1300                  "()");
1301   g_variant_unref (_ret);
1302 _out:
1303   return _ret != NULL;
1304 }
1305
1306 /**
1307  * gsignond_dbus_remote_plugin_v1_call_request_initial_sync:
1308  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1309  * @arg_sessionData: Argument to pass with the method invocation.
1310  * @arg_identityMethodCache: Argument to pass with the method invocation.
1311  * @arg_mechanism: Argument to pass with the method invocation.
1312  * @cancellable: (allow-none): A #GCancellable or %NULL.
1313  * @error: Return location for error or %NULL.
1314  *
1315  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1316  *
1317  * See gsignond_dbus_remote_plugin_v1_call_request_initial() for the asynchronous version of this method.
1318  *
1319  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1320  */
1321 gboolean
1322 gsignond_dbus_remote_plugin_v1_call_request_initial_sync (
1323     GSignondDbusRemotePluginV1 *proxy,
1324     GVariant *arg_sessionData,
1325     GVariant *arg_identityMethodCache,
1326     const gchar *arg_mechanism,
1327     GCancellable *cancellable,
1328     GError **error)
1329 {
1330   GVariant *_ret;
1331   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1332     "requestInitial",
1333     g_variant_new ("(@a{sv}@a{sv}s)",
1334                    arg_sessionData,
1335                    arg_identityMethodCache,
1336                    arg_mechanism),
1337     G_DBUS_CALL_FLAGS_NONE,
1338     -1,
1339     cancellable,
1340     error);
1341   if (_ret == NULL)
1342     goto _out;
1343   g_variant_get (_ret,
1344                  "()");
1345   g_variant_unref (_ret);
1346 _out:
1347   return _ret != NULL;
1348 }
1349
1350 /**
1351  * gsignond_dbus_remote_plugin_v1_call_request:
1352  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1353  * @arg_sessionData: Argument to pass with the method invocation.
1354  * @cancellable: (allow-none): A #GCancellable or %NULL.
1355  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1356  * @user_data: User data to pass to @callback.
1357  *
1358  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method on @proxy.
1359  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1360  * You can then call gsignond_dbus_remote_plugin_v1_call_request_finish() to get the result of the operation.
1361  *
1362  * See gsignond_dbus_remote_plugin_v1_call_request_sync() for the synchronous, blocking version of this method.
1363  */
1364 void
1365 gsignond_dbus_remote_plugin_v1_call_request (
1366     GSignondDbusRemotePluginV1 *proxy,
1367     GVariant *arg_sessionData,
1368     GCancellable *cancellable,
1369     GAsyncReadyCallback callback,
1370     gpointer user_data)
1371 {
1372   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1373     "request",
1374     g_variant_new ("(@a{sv})",
1375                    arg_sessionData),
1376     G_DBUS_CALL_FLAGS_NONE,
1377     -1,
1378     cancellable,
1379     callback,
1380     user_data);
1381 }
1382
1383 /**
1384  * gsignond_dbus_remote_plugin_v1_call_request_finish:
1385  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1386  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_request().
1387  * @error: Return location for error or %NULL.
1388  *
1389  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_request().
1390  *
1391  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1392  */
1393 gboolean
1394 gsignond_dbus_remote_plugin_v1_call_request_finish (
1395     GSignondDbusRemotePluginV1 *proxy,
1396     GAsyncResult *res,
1397     GError **error)
1398 {
1399   GVariant *_ret;
1400   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1401   if (_ret == NULL)
1402     goto _out;
1403   g_variant_get (_ret,
1404                  "()");
1405   g_variant_unref (_ret);
1406 _out:
1407   return _ret != NULL;
1408 }
1409
1410 /**
1411  * gsignond_dbus_remote_plugin_v1_call_request_sync:
1412  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1413  * @arg_sessionData: Argument to pass with the method invocation.
1414  * @cancellable: (allow-none): A #GCancellable or %NULL.
1415  * @error: Return location for error or %NULL.
1416  *
1417  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1418  *
1419  * See gsignond_dbus_remote_plugin_v1_call_request() for the asynchronous version of this method.
1420  *
1421  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1422  */
1423 gboolean
1424 gsignond_dbus_remote_plugin_v1_call_request_sync (
1425     GSignondDbusRemotePluginV1 *proxy,
1426     GVariant *arg_sessionData,
1427     GCancellable *cancellable,
1428     GError **error)
1429 {
1430   GVariant *_ret;
1431   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1432     "request",
1433     g_variant_new ("(@a{sv})",
1434                    arg_sessionData),
1435     G_DBUS_CALL_FLAGS_NONE,
1436     -1,
1437     cancellable,
1438     error);
1439   if (_ret == NULL)
1440     goto _out;
1441   g_variant_get (_ret,
1442                  "()");
1443   g_variant_unref (_ret);
1444 _out:
1445   return _ret != NULL;
1446 }
1447
1448 /**
1449  * gsignond_dbus_remote_plugin_v1_call_user_action_finished:
1450  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1451  * @arg_uiData: Argument to pass with the method invocation.
1452  * @cancellable: (allow-none): A #GCancellable or %NULL.
1453  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1454  * @user_data: User data to pass to @callback.
1455  *
1456  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method on @proxy.
1457  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1458  * You can then call gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish() to get the result of the operation.
1459  *
1460  * See gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync() for the synchronous, blocking version of this method.
1461  */
1462 void
1463 gsignond_dbus_remote_plugin_v1_call_user_action_finished (
1464     GSignondDbusRemotePluginV1 *proxy,
1465     GVariant *arg_uiData,
1466     GCancellable *cancellable,
1467     GAsyncReadyCallback callback,
1468     gpointer user_data)
1469 {
1470   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1471     "userActionFinished",
1472     g_variant_new ("(@a{sv})",
1473                    arg_uiData),
1474     G_DBUS_CALL_FLAGS_NONE,
1475     -1,
1476     cancellable,
1477     callback,
1478     user_data);
1479 }
1480
1481 /**
1482  * gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish:
1483  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1484  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_user_action_finished().
1485  * @error: Return location for error or %NULL.
1486  *
1487  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_user_action_finished().
1488  *
1489  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1490  */
1491 gboolean
1492 gsignond_dbus_remote_plugin_v1_call_user_action_finished_finish (
1493     GSignondDbusRemotePluginV1 *proxy,
1494     GAsyncResult *res,
1495     GError **error)
1496 {
1497   GVariant *_ret;
1498   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1499   if (_ret == NULL)
1500     goto _out;
1501   g_variant_get (_ret,
1502                  "()");
1503   g_variant_unref (_ret);
1504 _out:
1505   return _ret != NULL;
1506 }
1507
1508 /**
1509  * gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync:
1510  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1511  * @arg_uiData: Argument to pass with the method invocation.
1512  * @cancellable: (allow-none): A #GCancellable or %NULL.
1513  * @error: Return location for error or %NULL.
1514  *
1515  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1516  *
1517  * See gsignond_dbus_remote_plugin_v1_call_user_action_finished() for the asynchronous version of this method.
1518  *
1519  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1520  */
1521 gboolean
1522 gsignond_dbus_remote_plugin_v1_call_user_action_finished_sync (
1523     GSignondDbusRemotePluginV1 *proxy,
1524     GVariant *arg_uiData,
1525     GCancellable *cancellable,
1526     GError **error)
1527 {
1528   GVariant *_ret;
1529   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1530     "userActionFinished",
1531     g_variant_new ("(@a{sv})",
1532                    arg_uiData),
1533     G_DBUS_CALL_FLAGS_NONE,
1534     -1,
1535     cancellable,
1536     error);
1537   if (_ret == NULL)
1538     goto _out;
1539   g_variant_get (_ret,
1540                  "()");
1541   g_variant_unref (_ret);
1542 _out:
1543   return _ret != NULL;
1544 }
1545
1546 /**
1547  * gsignond_dbus_remote_plugin_v1_call_refresh:
1548  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1549  * @arg_uiData: Argument to pass with the method invocation.
1550  * @cancellable: (allow-none): A #GCancellable or %NULL.
1551  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1552  * @user_data: User data to pass to @callback.
1553  *
1554  * Asynchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method on @proxy.
1555  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1556  * You can then call gsignond_dbus_remote_plugin_v1_call_refresh_finish() to get the result of the operation.
1557  *
1558  * See gsignond_dbus_remote_plugin_v1_call_refresh_sync() for the synchronous, blocking version of this method.
1559  */
1560 void
1561 gsignond_dbus_remote_plugin_v1_call_refresh (
1562     GSignondDbusRemotePluginV1 *proxy,
1563     GVariant *arg_uiData,
1564     GCancellable *cancellable,
1565     GAsyncReadyCallback callback,
1566     gpointer user_data)
1567 {
1568   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1569     "refresh",
1570     g_variant_new ("(@a{sv})",
1571                    arg_uiData),
1572     G_DBUS_CALL_FLAGS_NONE,
1573     -1,
1574     cancellable,
1575     callback,
1576     user_data);
1577 }
1578
1579 /**
1580  * gsignond_dbus_remote_plugin_v1_call_refresh_finish:
1581  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1582  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_call_refresh().
1583  * @error: Return location for error or %NULL.
1584  *
1585  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_call_refresh().
1586  *
1587  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1588  */
1589 gboolean
1590 gsignond_dbus_remote_plugin_v1_call_refresh_finish (
1591     GSignondDbusRemotePluginV1 *proxy,
1592     GAsyncResult *res,
1593     GError **error)
1594 {
1595   GVariant *_ret;
1596   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1597   if (_ret == NULL)
1598     goto _out;
1599   g_variant_get (_ret,
1600                  "()");
1601   g_variant_unref (_ret);
1602 _out:
1603   return _ret != NULL;
1604 }
1605
1606 /**
1607  * gsignond_dbus_remote_plugin_v1_call_refresh_sync:
1608  * @proxy: A #GSignondDbusRemotePluginV1Proxy.
1609  * @arg_uiData: Argument to pass with the method invocation.
1610  * @cancellable: (allow-none): A #GCancellable or %NULL.
1611  * @error: Return location for error or %NULL.
1612  *
1613  * Synchronously invokes the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1614  *
1615  * See gsignond_dbus_remote_plugin_v1_call_refresh() for the asynchronous version of this method.
1616  *
1617  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1618  */
1619 gboolean
1620 gsignond_dbus_remote_plugin_v1_call_refresh_sync (
1621     GSignondDbusRemotePluginV1 *proxy,
1622     GVariant *arg_uiData,
1623     GCancellable *cancellable,
1624     GError **error)
1625 {
1626   GVariant *_ret;
1627   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1628     "refresh",
1629     g_variant_new ("(@a{sv})",
1630                    arg_uiData),
1631     G_DBUS_CALL_FLAGS_NONE,
1632     -1,
1633     cancellable,
1634     error);
1635   if (_ret == NULL)
1636     goto _out;
1637   g_variant_get (_ret,
1638                  "()");
1639   g_variant_unref (_ret);
1640 _out:
1641   return _ret != NULL;
1642 }
1643
1644 /**
1645  * gsignond_dbus_remote_plugin_v1_complete_cancel:
1646  * @object: A #GSignondDbusRemotePluginV1.
1647  * @invocation: (transfer full): A #GDBusMethodInvocation.
1648  *
1649  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.cancel">cancel()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1650  *
1651  * This method will free @invocation, you cannot use it afterwards.
1652  */
1653 void
1654 gsignond_dbus_remote_plugin_v1_complete_cancel (
1655     GSignondDbusRemotePluginV1 *object,
1656     GDBusMethodInvocation *invocation)
1657 {
1658   g_dbus_method_invocation_return_value (invocation,
1659     g_variant_new ("()"));
1660 }
1661
1662 /**
1663  * gsignond_dbus_remote_plugin_v1_complete_request_initial:
1664  * @object: A #GSignondDbusRemotePluginV1.
1665  * @invocation: (transfer full): A #GDBusMethodInvocation.
1666  *
1667  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.requestInitial">requestInitial()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1668  *
1669  * This method will free @invocation, you cannot use it afterwards.
1670  */
1671 void
1672 gsignond_dbus_remote_plugin_v1_complete_request_initial (
1673     GSignondDbusRemotePluginV1 *object,
1674     GDBusMethodInvocation *invocation)
1675 {
1676   g_dbus_method_invocation_return_value (invocation,
1677     g_variant_new ("()"));
1678 }
1679
1680 /**
1681  * gsignond_dbus_remote_plugin_v1_complete_request:
1682  * @object: A #GSignondDbusRemotePluginV1.
1683  * @invocation: (transfer full): A #GDBusMethodInvocation.
1684  *
1685  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.request">request()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1686  *
1687  * This method will free @invocation, you cannot use it afterwards.
1688  */
1689 void
1690 gsignond_dbus_remote_plugin_v1_complete_request (
1691     GSignondDbusRemotePluginV1 *object,
1692     GDBusMethodInvocation *invocation)
1693 {
1694   g_dbus_method_invocation_return_value (invocation,
1695     g_variant_new ("()"));
1696 }
1697
1698 /**
1699  * gsignond_dbus_remote_plugin_v1_complete_user_action_finished:
1700  * @object: A #GSignondDbusRemotePluginV1.
1701  * @invocation: (transfer full): A #GDBusMethodInvocation.
1702  *
1703  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.userActionFinished">userActionFinished()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1704  *
1705  * This method will free @invocation, you cannot use it afterwards.
1706  */
1707 void
1708 gsignond_dbus_remote_plugin_v1_complete_user_action_finished (
1709     GSignondDbusRemotePluginV1 *object,
1710     GDBusMethodInvocation *invocation)
1711 {
1712   g_dbus_method_invocation_return_value (invocation,
1713     g_variant_new ("()"));
1714 }
1715
1716 /**
1717  * gsignond_dbus_remote_plugin_v1_complete_refresh:
1718  * @object: A #GSignondDbusRemotePluginV1.
1719  * @invocation: (transfer full): A #GDBusMethodInvocation.
1720  *
1721  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.refresh">refresh()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1722  *
1723  * This method will free @invocation, you cannot use it afterwards.
1724  */
1725 void
1726 gsignond_dbus_remote_plugin_v1_complete_refresh (
1727     GSignondDbusRemotePluginV1 *object,
1728     GDBusMethodInvocation *invocation)
1729 {
1730   g_dbus_method_invocation_return_value (invocation,
1731     g_variant_new ("()"));
1732 }
1733
1734 /* ------------------------------------------------------------------------ */
1735
1736 /**
1737  * GSignondDbusRemotePluginV1Proxy:
1738  *
1739  * The #GSignondDbusRemotePluginV1Proxy structure contains only private data and should only be accessed using the provided API.
1740  */
1741
1742 /**
1743  * GSignondDbusRemotePluginV1ProxyClass:
1744  * @parent_class: The parent class.
1745  *
1746  * Class structure for #GSignondDbusRemotePluginV1Proxy.
1747  */
1748
1749 struct _GSignondDbusRemotePluginV1ProxyPrivate
1750 {
1751   GData *qdata;
1752 };
1753
1754 static void gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface);
1755
1756 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Proxy, gsignond_dbus_remote_plugin_v1_proxy, G_TYPE_DBUS_PROXY,
1757                          G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_proxy_iface_init));
1758
1759 static void
1760 gsignond_dbus_remote_plugin_v1_proxy_finalize (GObject *object)
1761 {
1762   GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1763   g_datalist_clear (&proxy->priv->qdata);
1764   G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_proxy_parent_class)->finalize (object);
1765 }
1766
1767 static void
1768 gsignond_dbus_remote_plugin_v1_proxy_get_property (GObject      *object,
1769   guint         prop_id,
1770   GValue       *value,
1771   GParamSpec   *pspec)
1772 {
1773   const _ExtendedGDBusPropertyInfo *info;
1774   GVariant *variant;
1775   g_assert (prop_id != 0 && prop_id - 1 < 2);
1776   info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1];
1777   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
1778   if (info->use_gvariant)
1779     {
1780       g_value_set_variant (value, variant);
1781     }
1782   else
1783     {
1784       if (variant != NULL)
1785         g_dbus_gvariant_to_gvalue (variant, value);
1786     }
1787   if (variant != NULL)
1788     g_variant_unref (variant);
1789 }
1790
1791 static void
1792 gsignond_dbus_remote_plugin_v1_proxy_set_property_cb (GDBusProxy *proxy,
1793   GAsyncResult *res,
1794   gpointer      user_data)
1795 {
1796   const _ExtendedGDBusPropertyInfo *info = user_data;
1797   GError *error;
1798   error = NULL;
1799   if (!g_dbus_proxy_call_finish (proxy, res, &error))
1800     {
1801       g_warning ("Error setting property `%s' on interface com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1: %s (%s, %d)",
1802                  info->parent_struct.name, 
1803                  error->message, g_quark_to_string (error->domain), error->code);
1804       g_error_free (error);
1805     }
1806 }
1807
1808 static void
1809 gsignond_dbus_remote_plugin_v1_proxy_set_property (GObject      *object,
1810   guint         prop_id,
1811   const GValue *value,
1812   GParamSpec   *pspec)
1813 {
1814   const _ExtendedGDBusPropertyInfo *info;
1815   GVariant *variant;
1816   g_assert (prop_id != 0 && prop_id - 1 < 2);
1817   info = _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1];
1818   variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
1819   g_dbus_proxy_call (G_DBUS_PROXY (object),
1820     "org.freedesktop.DBus.Properties.Set",
1821     g_variant_new ("(ssv)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->parent_struct.name, variant),
1822     G_DBUS_CALL_FLAGS_NONE,
1823     -1,
1824     NULL, (GAsyncReadyCallback) gsignond_dbus_remote_plugin_v1_proxy_set_property_cb, (gpointer) info);
1825   g_variant_unref (variant);
1826 }
1827
1828 static void
1829 gsignond_dbus_remote_plugin_v1_proxy_g_signal (GDBusProxy *proxy,
1830   const gchar *sender_name,
1831   const gchar *signal_name,
1832   GVariant *parameters)
1833 {
1834   _ExtendedGDBusSignalInfo *info;
1835   GVariantIter iter;
1836   GVariant *child;
1837   GValue *paramv;
1838   guint num_params;
1839   guint n;
1840   guint signal_id;
1841   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, signal_name);
1842   if (info == NULL)
1843     return;
1844   num_params = g_variant_n_children (parameters);
1845   paramv = g_new0 (GValue, num_params + 1);
1846   g_value_init (&paramv[0], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
1847   g_value_set_object (&paramv[0], proxy);
1848   g_variant_iter_init (&iter, parameters);
1849   n = 1;
1850   while ((child = g_variant_iter_next_value (&iter)) != NULL)
1851     {
1852       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1853       if (arg_info->use_gvariant)
1854         {
1855           g_value_init (&paramv[n], G_TYPE_VARIANT);
1856           g_value_set_variant (&paramv[n], child);
1857           n++;
1858         }
1859       else
1860         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
1861       g_variant_unref (child);
1862     }
1863   signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
1864   g_signal_emitv (paramv, signal_id, 0, NULL);
1865   for (n = 0; n < num_params + 1; n++)
1866     g_value_unset (&paramv[n]);
1867   g_free (paramv);
1868 }
1869
1870 static void
1871 gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed (GDBusProxy *_proxy,
1872   GVariant *changed_properties,
1873   const gchar *const *invalidated_properties)
1874 {
1875   GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (_proxy);
1876   guint n;
1877   const gchar *key;
1878   GVariantIter *iter;
1879   _ExtendedGDBusPropertyInfo *info;
1880   g_variant_get (changed_properties, "a{sv}", &iter);
1881   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1882     {
1883       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, key);
1884       g_datalist_remove_data (&proxy->priv->qdata, key);
1885       if (info != NULL)
1886         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1887     }
1888   g_variant_iter_free (iter);
1889   for (n = 0; invalidated_properties[n] != NULL; n++)
1890     {
1891       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, invalidated_properties[n]);
1892       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1893       if (info != NULL)
1894         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1895     }
1896 }
1897
1898 static const gchar *
1899 gsignond_dbus_remote_plugin_v1_proxy_get_method (GSignondDbusRemotePluginV1 *object)
1900 {
1901   GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1902   GVariant *variant;
1903   const gchar *value = NULL;
1904   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "method");
1905   if (variant != NULL)
1906     {
1907       value = g_variant_get_string (variant, NULL);
1908       g_variant_unref (variant);
1909     }
1910   return value;
1911 }
1912
1913 static const gchar *const *
1914 gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms (GSignondDbusRemotePluginV1 *object)
1915 {
1916   GSignondDbusRemotePluginV1Proxy *proxy = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_PROXY (object);
1917   GVariant *variant;
1918   const gchar *const *value = NULL;
1919   value = g_datalist_get_data (&proxy->priv->qdata, "mechanisms");
1920   if (value != NULL)
1921     return value;
1922   variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "mechanisms");
1923   if (variant != NULL)
1924     {
1925       value = g_variant_get_strv (variant, NULL);
1926       g_datalist_set_data_full (&proxy->priv->qdata, "mechanisms", (gpointer) value, g_free);
1927       g_variant_unref (variant);
1928     }
1929   return value;
1930 }
1931
1932 static void
1933 gsignond_dbus_remote_plugin_v1_proxy_init (GSignondDbusRemotePluginV1Proxy *proxy)
1934 {
1935   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, GSignondDbusRemotePluginV1ProxyPrivate);
1936   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), gsignond_dbus_remote_plugin_v1_interface_info ());
1937 }
1938
1939 static void
1940 gsignond_dbus_remote_plugin_v1_proxy_class_init (GSignondDbusRemotePluginV1ProxyClass *klass)
1941 {
1942   GObjectClass *gobject_class;
1943   GDBusProxyClass *proxy_class;
1944
1945   g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1ProxyPrivate));
1946
1947   gobject_class = G_OBJECT_CLASS (klass);
1948   gobject_class->finalize     = gsignond_dbus_remote_plugin_v1_proxy_finalize;
1949   gobject_class->get_property = gsignond_dbus_remote_plugin_v1_proxy_get_property;
1950   gobject_class->set_property = gsignond_dbus_remote_plugin_v1_proxy_set_property;
1951
1952   proxy_class = G_DBUS_PROXY_CLASS (klass);
1953   proxy_class->g_signal = gsignond_dbus_remote_plugin_v1_proxy_g_signal;
1954   proxy_class->g_properties_changed = gsignond_dbus_remote_plugin_v1_proxy_g_properties_changed;
1955
1956
1957   gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1);
1958 }
1959
1960 static void
1961 gsignond_dbus_remote_plugin_v1_proxy_iface_init (GSignondDbusRemotePluginV1Iface *iface)
1962 {
1963   iface->get_method = gsignond_dbus_remote_plugin_v1_proxy_get_method;
1964   iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_proxy_get_mechanisms;
1965 }
1966
1967 /**
1968  * gsignond_dbus_remote_plugin_v1_proxy_new:
1969  * @connection: A #GDBusConnection.
1970  * @flags: Flags from the #GDBusProxyFlags enumeration.
1971  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1972  * @object_path: An object path.
1973  * @cancellable: (allow-none): A #GCancellable or %NULL.
1974  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1975  * @user_data: User data to pass to @callback.
1976  *
1977  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>. See g_dbus_proxy_new() for more details.
1978  *
1979  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1980  * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_finish() to get the result of the operation.
1981  *
1982  * See gsignond_dbus_remote_plugin_v1_proxy_new_sync() for the synchronous, blocking version of this constructor.
1983  */
1984 void
1985 gsignond_dbus_remote_plugin_v1_proxy_new (
1986     GDBusConnection     *connection,
1987     GDBusProxyFlags      flags,
1988     const gchar         *name,
1989     const gchar         *object_path,
1990     GCancellable        *cancellable,
1991     GAsyncReadyCallback  callback,
1992     gpointer             user_data)
1993 {
1994   g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
1995 }
1996
1997 /**
1998  * gsignond_dbus_remote_plugin_v1_proxy_new_finish:
1999  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new().
2000  * @error: Return location for error or %NULL
2001  *
2002  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new().
2003  *
2004  * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2005  */
2006 GSignondDbusRemotePluginV1 *
2007 gsignond_dbus_remote_plugin_v1_proxy_new_finish (
2008     GAsyncResult        *res,
2009     GError             **error)
2010 {
2011   GObject *ret;
2012   GObject *source_object;
2013   source_object = g_async_result_get_source_object (res);
2014   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
2015   g_object_unref (source_object);
2016   if (ret != NULL)
2017     return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2018   else
2019     return NULL;
2020 }
2021
2022 /**
2023  * gsignond_dbus_remote_plugin_v1_proxy_new_sync:
2024  * @connection: A #GDBusConnection.
2025  * @flags: Flags from the #GDBusProxyFlags enumeration.
2026  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
2027  * @object_path: An object path.
2028  * @cancellable: (allow-none): A #GCancellable or %NULL.
2029  * @error: Return location for error or %NULL
2030  *
2031  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>. See g_dbus_proxy_new_sync() for more details.
2032  *
2033  * The calling thread is blocked until a reply is received.
2034  *
2035  * See gsignond_dbus_remote_plugin_v1_proxy_new() for the asynchronous version of this constructor.
2036  *
2037  * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2038  */
2039 GSignondDbusRemotePluginV1 *
2040 gsignond_dbus_remote_plugin_v1_proxy_new_sync (
2041     GDBusConnection     *connection,
2042     GDBusProxyFlags      flags,
2043     const gchar         *name,
2044     const gchar         *object_path,
2045     GCancellable        *cancellable,
2046     GError             **error)
2047 {
2048   GInitable *ret;
2049   ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2050   if (ret != NULL)
2051     return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2052   else
2053     return NULL;
2054 }
2055
2056
2057 /**
2058  * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus:
2059  * @bus_type: A #GBusType.
2060  * @flags: Flags from the #GDBusProxyFlags enumeration.
2061  * @name: A bus name (well-known or unique).
2062  * @object_path: An object path.
2063  * @cancellable: (allow-none): A #GCancellable or %NULL.
2064  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
2065  * @user_data: User data to pass to @callback.
2066  *
2067  * Like gsignond_dbus_remote_plugin_v1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
2068  *
2069  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
2070  * You can then call gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish() to get the result of the operation.
2071  *
2072  * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
2073  */
2074 void
2075 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus (
2076     GBusType             bus_type,
2077     GDBusProxyFlags      flags,
2078     const gchar         *name,
2079     const gchar         *object_path,
2080     GCancellable        *cancellable,
2081     GAsyncReadyCallback  callback,
2082     gpointer             user_data)
2083 {
2084   g_async_initable_new_async (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2085 }
2086
2087 /**
2088  * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish:
2089  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gsignond_dbus_remote_plugin_v1_proxy_new_for_bus().
2090  * @error: Return location for error or %NULL
2091  *
2092  * Finishes an operation started with gsignond_dbus_remote_plugin_v1_proxy_new_for_bus().
2093  *
2094  * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2095  */
2096 GSignondDbusRemotePluginV1 *
2097 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_finish (
2098     GAsyncResult        *res,
2099     GError             **error)
2100 {
2101   GObject *ret;
2102   GObject *source_object;
2103   source_object = g_async_result_get_source_object (res);
2104   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
2105   g_object_unref (source_object);
2106   if (ret != NULL)
2107     return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2108   else
2109     return NULL;
2110 }
2111
2112 /**
2113  * gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync:
2114  * @bus_type: A #GBusType.
2115  * @flags: Flags from the #GDBusProxyFlags enumeration.
2116  * @name: A bus name (well-known or unique).
2117  * @object_path: An object path.
2118  * @cancellable: (allow-none): A #GCancellable or %NULL.
2119  * @error: Return location for error or %NULL
2120  *
2121  * Like gsignond_dbus_remote_plugin_v1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
2122  *
2123  * The calling thread is blocked until a reply is received.
2124  *
2125  * See gsignond_dbus_remote_plugin_v1_proxy_new_for_bus() for the asynchronous version of this constructor.
2126  *
2127  * Returns: (transfer full) (type GSignondDbusRemotePluginV1Proxy): The constructed proxy object or %NULL if @error is set.
2128  */
2129 GSignondDbusRemotePluginV1 *
2130 gsignond_dbus_remote_plugin_v1_proxy_new_for_bus_sync (
2131     GBusType             bus_type,
2132     GDBusProxyFlags      flags,
2133     const gchar         *name,
2134     const gchar         *object_path,
2135     GCancellable        *cancellable,
2136     GError             **error)
2137 {
2138   GInitable *ret;
2139   ret = g_initable_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", NULL);
2140   if (ret != NULL)
2141     return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (ret);
2142   else
2143     return NULL;
2144 }
2145
2146
2147 /* ------------------------------------------------------------------------ */
2148
2149 /**
2150  * GSignondDbusRemotePluginV1Skeleton:
2151  *
2152  * The #GSignondDbusRemotePluginV1Skeleton structure contains only private data and should only be accessed using the provided API.
2153  */
2154
2155 /**
2156  * GSignondDbusRemotePluginV1SkeletonClass:
2157  * @parent_class: The parent class.
2158  *
2159  * Class structure for #GSignondDbusRemotePluginV1Skeleton.
2160  */
2161
2162 struct _GSignondDbusRemotePluginV1SkeletonPrivate
2163 {
2164   GValue *properties;
2165   GList *changed_properties;
2166   GSource *changed_properties_idle_source;
2167   GMainContext *context;
2168   GMutex lock;
2169 };
2170
2171 static void
2172 _gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call (
2173   GDBusConnection *connection,
2174   const gchar *sender,
2175   const gchar *object_path,
2176   const gchar *interface_name,
2177   const gchar *method_name,
2178   GVariant *parameters,
2179   GDBusMethodInvocation *invocation,
2180   gpointer user_data)
2181 {
2182   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2183   _ExtendedGDBusMethodInfo *info;
2184   GVariantIter iter;
2185   GVariant *child;
2186   GValue *paramv;
2187   guint num_params;
2188   guint num_extra;
2189   guint n;
2190   guint signal_id;
2191   GValue return_value = G_VALUE_INIT;
2192   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
2193   g_assert (info != NULL);
2194   num_params = g_variant_n_children (parameters);
2195   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
2196   n = 0;
2197   g_value_init (&paramv[n], GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
2198   g_value_set_object (&paramv[n++], skeleton);
2199   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
2200   g_value_set_object (&paramv[n++], invocation);
2201   if (info->pass_fdlist)
2202     {
2203 #ifdef G_OS_UNIX
2204       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
2205       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
2206 #else
2207       g_assert_not_reached ();
2208 #endif
2209     }
2210   g_variant_iter_init (&iter, parameters);
2211   while ((child = g_variant_iter_next_value (&iter)) != NULL)
2212     {
2213       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
2214       if (arg_info->use_gvariant)
2215         {
2216           g_value_init (&paramv[n], G_TYPE_VARIANT);
2217           g_value_set_variant (&paramv[n], child);
2218           n++;
2219         }
2220       else
2221         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
2222       g_variant_unref (child);
2223     }
2224   signal_id = g_signal_lookup (info->signal_name, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1);
2225   g_value_init (&return_value, G_TYPE_BOOLEAN);
2226   g_signal_emitv (paramv, signal_id, 0, &return_value);
2227   if (!g_value_get_boolean (&return_value))
2228     g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
2229   g_value_unset (&return_value);
2230   for (n = 0; n < num_params + num_extra; n++)
2231     g_value_unset (&paramv[n]);
2232   g_free (paramv);
2233 }
2234
2235 static GVariant *
2236 _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property (
2237   GDBusConnection *connection,
2238   const gchar *sender,
2239   const gchar *object_path,
2240   const gchar *interface_name,
2241   const gchar *property_name,
2242   GError **error,
2243   gpointer user_data)
2244 {
2245   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2246   GValue value = G_VALUE_INIT;
2247   GParamSpec *pspec;
2248   _ExtendedGDBusPropertyInfo *info;
2249   GVariant *ret;
2250   ret = NULL;
2251   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name);
2252   g_assert (info != NULL);
2253   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2254   if (pspec == NULL)
2255     {
2256       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2257     }
2258   else
2259     {
2260       g_value_init (&value, pspec->value_type);
2261       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2262       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
2263       g_value_unset (&value);
2264     }
2265   return ret;
2266 }
2267
2268 static gboolean
2269 _gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property (
2270   GDBusConnection *connection,
2271   const gchar *sender,
2272   const gchar *object_path,
2273   const gchar *interface_name,
2274   const gchar *property_name,
2275   GVariant *variant,
2276   GError **error,
2277   gpointer user_data)
2278 {
2279   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2280   GValue value = G_VALUE_INIT;
2281   GParamSpec *pspec;
2282   _ExtendedGDBusPropertyInfo *info;
2283   gboolean ret;
2284   ret = FALSE;
2285   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_gsignond_dbus_remote_plugin_v1_interface_info, property_name);
2286   g_assert (info != NULL);
2287   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2288   if (pspec == NULL)
2289     {
2290       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2291     }
2292   else
2293     {
2294       if (info->use_gvariant)
2295         g_value_set_variant (&value, variant);
2296       else
2297         g_dbus_gvariant_to_gvalue (variant, &value);
2298       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2299       g_value_unset (&value);
2300       ret = TRUE;
2301     }
2302   return ret;
2303 }
2304
2305 static const GDBusInterfaceVTable _gsignond_dbus_remote_plugin_v1_skeleton_vtable =
2306 {
2307   _gsignond_dbus_remote_plugin_v1_skeleton_handle_method_call,
2308   _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property,
2309   _gsignond_dbus_remote_plugin_v1_skeleton_handle_set_property
2310 };
2311
2312 static GDBusInterfaceInfo *
2313 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
2314 {
2315   return gsignond_dbus_remote_plugin_v1_interface_info ();
2316 }
2317
2318 static GDBusInterfaceVTable *
2319 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
2320 {
2321   return (GDBusInterfaceVTable *) &_gsignond_dbus_remote_plugin_v1_skeleton_vtable;
2322 }
2323
2324 static GVariant *
2325 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
2326 {
2327   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton);
2328
2329   GVariantBuilder builder;
2330   guint n;
2331   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2332   if (_gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties == NULL)
2333     goto out;
2334   for (n = 0; _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n] != NULL; n++)
2335     {
2336       GDBusPropertyInfo *info = _gsignond_dbus_remote_plugin_v1_interface_info.parent_struct.properties[n];
2337       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
2338         {
2339           GVariant *value;
2340           value = _gsignond_dbus_remote_plugin_v1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", info->name, NULL, skeleton);
2341           if (value != NULL)
2342             {
2343               g_variant_take_ref (value);
2344               g_variant_builder_add (&builder, "{sv}", info->name, value);
2345               g_variant_unref (value);
2346             }
2347         }
2348     }
2349 out:
2350   return g_variant_builder_end (&builder);
2351 }
2352
2353 static gboolean _gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data);
2354
2355 static void
2356 gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
2357 {
2358   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (_skeleton);
2359   gboolean emit_changed = FALSE;
2360
2361   g_mutex_lock (&skeleton->priv->lock);
2362   if (skeleton->priv->changed_properties_idle_source != NULL)
2363     {
2364       g_source_destroy (skeleton->priv->changed_properties_idle_source);
2365       skeleton->priv->changed_properties_idle_source = NULL;
2366       emit_changed = TRUE;
2367     }
2368   g_mutex_unlock (&skeleton->priv->lock);
2369
2370   if (emit_changed)
2371     _gsignond_dbus_remote_plugin_v1_emit_changed (skeleton);
2372 }
2373
2374 static void
2375 _gsignond_dbus_remote_plugin_v1_on_signal_response (
2376     GSignondDbusRemotePluginV1 *object,
2377     GVariant *arg_sessionData)
2378 {
2379   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2380
2381   GList      *connections, *l;
2382   GVariant   *signal_variant;
2383   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2384
2385   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2386                    arg_sessionData));
2387   for (l = connections; l != NULL; l = l->next)
2388     {
2389       GDBusConnection *connection = l->data;
2390       g_dbus_connection_emit_signal (connection,
2391         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "response",
2392         signal_variant, NULL);
2393     }
2394   g_variant_unref (signal_variant);
2395   g_list_free_full (connections, g_object_unref);
2396 }
2397
2398 static void
2399 _gsignond_dbus_remote_plugin_v1_on_signal_response_final (
2400     GSignondDbusRemotePluginV1 *object,
2401     GVariant *arg_sessionData)
2402 {
2403   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2404
2405   GList      *connections, *l;
2406   GVariant   *signal_variant;
2407   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2408
2409   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2410                    arg_sessionData));
2411   for (l = connections; l != NULL; l = l->next)
2412     {
2413       GDBusConnection *connection = l->data;
2414       g_dbus_connection_emit_signal (connection,
2415         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "responseFinal",
2416         signal_variant, NULL);
2417     }
2418   g_variant_unref (signal_variant);
2419   g_list_free_full (connections, g_object_unref);
2420 }
2421
2422 static void
2423 _gsignond_dbus_remote_plugin_v1_on_signal_store (
2424     GSignondDbusRemotePluginV1 *object,
2425     GVariant *arg_sessionData)
2426 {
2427   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2428
2429   GList      *connections, *l;
2430   GVariant   *signal_variant;
2431   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2432
2433   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2434                    arg_sessionData));
2435   for (l = connections; l != NULL; l = l->next)
2436     {
2437       GDBusConnection *connection = l->data;
2438       g_dbus_connection_emit_signal (connection,
2439         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "store",
2440         signal_variant, NULL);
2441     }
2442   g_variant_unref (signal_variant);
2443   g_list_free_full (connections, g_object_unref);
2444 }
2445
2446 static void
2447 _gsignond_dbus_remote_plugin_v1_on_signal_error (
2448     GSignondDbusRemotePluginV1 *object,
2449     GVariant *arg_error)
2450 {
2451   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2452
2453   GList      *connections, *l;
2454   GVariant   *signal_variant;
2455   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2456
2457   signal_variant = g_variant_ref_sink (g_variant_new ("(@(uis))",
2458                    arg_error));
2459   for (l = connections; l != NULL; l = l->next)
2460     {
2461       GDBusConnection *connection = l->data;
2462       g_dbus_connection_emit_signal (connection,
2463         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "error",
2464         signal_variant, NULL);
2465     }
2466   g_variant_unref (signal_variant);
2467   g_list_free_full (connections, g_object_unref);
2468 }
2469
2470 static void
2471 _gsignond_dbus_remote_plugin_v1_on_signal_user_action_required (
2472     GSignondDbusRemotePluginV1 *object,
2473     GVariant *arg_uiData)
2474 {
2475   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2476
2477   GList      *connections, *l;
2478   GVariant   *signal_variant;
2479   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2480
2481   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2482                    arg_uiData));
2483   for (l = connections; l != NULL; l = l->next)
2484     {
2485       GDBusConnection *connection = l->data;
2486       g_dbus_connection_emit_signal (connection,
2487         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "userActionRequired",
2488         signal_variant, NULL);
2489     }
2490   g_variant_unref (signal_variant);
2491   g_list_free_full (connections, g_object_unref);
2492 }
2493
2494 static void
2495 _gsignond_dbus_remote_plugin_v1_on_signal_refreshed (
2496     GSignondDbusRemotePluginV1 *object,
2497     GVariant *arg_uiData)
2498 {
2499   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2500
2501   GList      *connections, *l;
2502   GVariant   *signal_variant;
2503   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2504
2505   signal_variant = g_variant_ref_sink (g_variant_new ("(@a{sv})",
2506                    arg_uiData));
2507   for (l = connections; l != NULL; l = l->next)
2508     {
2509       GDBusConnection *connection = l->data;
2510       g_dbus_connection_emit_signal (connection,
2511         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "refreshed",
2512         signal_variant, NULL);
2513     }
2514   g_variant_unref (signal_variant);
2515   g_list_free_full (connections, g_object_unref);
2516 }
2517
2518 static void
2519 _gsignond_dbus_remote_plugin_v1_on_signal_status_changed (
2520     GSignondDbusRemotePluginV1 *object,
2521     gint arg_state,
2522     const gchar *arg_message)
2523 {
2524   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2525
2526   GList      *connections, *l;
2527   GVariant   *signal_variant;
2528   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2529
2530   signal_variant = g_variant_ref_sink (g_variant_new ("(is)",
2531                    arg_state,
2532                    arg_message));
2533   for (l = connections; l != NULL; l = l->next)
2534     {
2535       GDBusConnection *connection = l->data;
2536       g_dbus_connection_emit_signal (connection,
2537         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1", "statusChanged",
2538         signal_variant, NULL);
2539     }
2540   g_variant_unref (signal_variant);
2541   g_list_free_full (connections, g_object_unref);
2542 }
2543
2544 static void gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface);
2545 G_DEFINE_TYPE_WITH_CODE (GSignondDbusRemotePluginV1Skeleton, gsignond_dbus_remote_plugin_v1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2546                          G_IMPLEMENT_INTERFACE (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1, gsignond_dbus_remote_plugin_v1_skeleton_iface_init));
2547
2548 static void
2549 gsignond_dbus_remote_plugin_v1_skeleton_finalize (GObject *object)
2550 {
2551   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2552   guint n;
2553   for (n = 0; n < 2; n++)
2554     g_value_unset (&skeleton->priv->properties[n]);
2555   g_free (skeleton->priv->properties);
2556   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2557   if (skeleton->priv->changed_properties_idle_source != NULL)
2558     g_source_destroy (skeleton->priv->changed_properties_idle_source);
2559   g_main_context_unref (skeleton->priv->context);
2560   g_mutex_clear (&skeleton->priv->lock);
2561   G_OBJECT_CLASS (gsignond_dbus_remote_plugin_v1_skeleton_parent_class)->finalize (object);
2562 }
2563
2564 static void
2565 gsignond_dbus_remote_plugin_v1_skeleton_get_property (GObject      *object,
2566   guint         prop_id,
2567   GValue       *value,
2568   GParamSpec   *pspec)
2569 {
2570   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2571   g_assert (prop_id != 0 && prop_id - 1 < 2);
2572   g_mutex_lock (&skeleton->priv->lock);
2573   g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
2574   g_mutex_unlock (&skeleton->priv->lock);
2575 }
2576
2577 static gboolean
2578 _gsignond_dbus_remote_plugin_v1_emit_changed (gpointer user_data)
2579 {
2580   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (user_data);
2581   GList *l;
2582   GVariantBuilder builder;
2583   GVariantBuilder invalidated_builder;
2584   guint num_changes;
2585
2586   g_mutex_lock (&skeleton->priv->lock);
2587   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2588   g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
2589   for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
2590     {
2591       ChangedProperty *cp = l->data;
2592       GVariant *variant;
2593       const GValue *cur_value;
2594
2595       cur_value = &skeleton->priv->properties[cp->prop_id - 1];
2596       if (!_g_value_equal (cur_value, &cp->orig_value))
2597         {
2598           variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
2599           g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
2600           g_variant_unref (variant);
2601           num_changes++;
2602         }
2603     }
2604   if (num_changes > 0)
2605     {
2606       GList *connections, *l;
2607       GVariant *signal_variant;
2608       signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1",
2609                                            &builder, &invalidated_builder));
2610       connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2611       for (l = connections; l != NULL; l = l->next)
2612         {
2613           GDBusConnection *connection = l->data;
2614
2615           g_dbus_connection_emit_signal (connection,
2616                                          NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
2617                                          "org.freedesktop.DBus.Properties",
2618                                          "PropertiesChanged",
2619                                          signal_variant,
2620                                          NULL);
2621         }
2622       g_variant_unref (signal_variant);
2623       g_list_free_full (connections, g_object_unref);
2624     }
2625   else
2626     {
2627       g_variant_builder_clear (&builder);
2628       g_variant_builder_clear (&invalidated_builder);
2629     }
2630   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2631   skeleton->priv->changed_properties = NULL;
2632   skeleton->priv->changed_properties_idle_source = NULL;
2633   g_mutex_unlock (&skeleton->priv->lock);
2634   return FALSE;
2635 }
2636
2637 static void
2638 _gsignond_dbus_remote_plugin_v1_schedule_emit_changed (GSignondDbusRemotePluginV1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
2639 {
2640   ChangedProperty *cp;
2641   GList *l;
2642   cp = NULL;
2643   for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
2644     {
2645       ChangedProperty *i_cp = l->data;
2646       if (i_cp->info == info)
2647         {
2648           cp = i_cp;
2649           break;
2650         }
2651     }
2652   if (cp == NULL)
2653     {
2654       cp = g_new0 (ChangedProperty, 1);
2655       cp->prop_id = prop_id;
2656       cp->info = info;
2657       skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
2658       g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
2659       g_value_copy (orig_value, &cp->orig_value);
2660     }
2661 }
2662
2663 static void
2664 gsignond_dbus_remote_plugin_v1_skeleton_notify (GObject      *object,
2665   GParamSpec *pspec)
2666 {
2667   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2668   g_mutex_lock (&skeleton->priv->lock);
2669   if (skeleton->priv->changed_properties != NULL &&
2670       skeleton->priv->changed_properties_idle_source == NULL)
2671     {
2672       skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
2673       g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
2674       g_source_set_callback (skeleton->priv->changed_properties_idle_source, _gsignond_dbus_remote_plugin_v1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
2675       g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
2676       g_source_unref (skeleton->priv->changed_properties_idle_source);
2677     }
2678   g_mutex_unlock (&skeleton->priv->lock);
2679 }
2680
2681 static void
2682 gsignond_dbus_remote_plugin_v1_skeleton_set_property (GObject      *object,
2683   guint         prop_id,
2684   const GValue *value,
2685   GParamSpec   *pspec)
2686 {
2687   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2688   g_assert (prop_id != 0 && prop_id - 1 < 2);
2689   g_mutex_lock (&skeleton->priv->lock);
2690   g_object_freeze_notify (object);
2691   if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
2692     {
2693       if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
2694         _gsignond_dbus_remote_plugin_v1_schedule_emit_changed (skeleton, _gsignond_dbus_remote_plugin_v1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
2695       g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
2696       g_object_notify_by_pspec (object, pspec);
2697     }
2698   g_mutex_unlock (&skeleton->priv->lock);
2699   g_object_thaw_notify (object);
2700 }
2701
2702 static void
2703 gsignond_dbus_remote_plugin_v1_skeleton_init (GSignondDbusRemotePluginV1Skeleton *skeleton)
2704 {
2705   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, GSignondDbusRemotePluginV1SkeletonPrivate);
2706   g_mutex_init (&skeleton->priv->lock);
2707   skeleton->priv->context = g_main_context_ref_thread_default ();
2708   skeleton->priv->properties = g_new0 (GValue, 2);
2709   g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
2710   g_value_init (&skeleton->priv->properties[1], G_TYPE_STRV);
2711 }
2712
2713 static const gchar *
2714 gsignond_dbus_remote_plugin_v1_skeleton_get_method (GSignondDbusRemotePluginV1 *object)
2715 {
2716   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2717   const gchar *value;
2718   g_mutex_lock (&skeleton->priv->lock);
2719   value = g_value_get_string (&(skeleton->priv->properties[0]));
2720   g_mutex_unlock (&skeleton->priv->lock);
2721   return value;
2722 }
2723
2724 static const gchar *const *
2725 gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms (GSignondDbusRemotePluginV1 *object)
2726 {
2727   GSignondDbusRemotePluginV1Skeleton *skeleton = GSIGNOND_DBUS_REMOTE_PLUGIN_V1_SKELETON (object);
2728   const gchar *const *value;
2729   g_mutex_lock (&skeleton->priv->lock);
2730   value = g_value_get_boxed (&(skeleton->priv->properties[1]));
2731   g_mutex_unlock (&skeleton->priv->lock);
2732   return value;
2733 }
2734
2735 static void
2736 gsignond_dbus_remote_plugin_v1_skeleton_class_init (GSignondDbusRemotePluginV1SkeletonClass *klass)
2737 {
2738   GObjectClass *gobject_class;
2739   GDBusInterfaceSkeletonClass *skeleton_class;
2740
2741   g_type_class_add_private (klass, sizeof (GSignondDbusRemotePluginV1SkeletonPrivate));
2742
2743   gobject_class = G_OBJECT_CLASS (klass);
2744   gobject_class->finalize = gsignond_dbus_remote_plugin_v1_skeleton_finalize;
2745   gobject_class->get_property = gsignond_dbus_remote_plugin_v1_skeleton_get_property;
2746   gobject_class->set_property = gsignond_dbus_remote_plugin_v1_skeleton_set_property;
2747   gobject_class->notify       = gsignond_dbus_remote_plugin_v1_skeleton_notify;
2748
2749
2750   gsignond_dbus_remote_plugin_v1_override_properties (gobject_class, 1);
2751
2752   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
2753   skeleton_class->get_info = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_info;
2754   skeleton_class->get_properties = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_properties;
2755   skeleton_class->flush = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_flush;
2756   skeleton_class->get_vtable = gsignond_dbus_remote_plugin_v1_skeleton_dbus_interface_get_vtable;
2757 }
2758
2759 static void
2760 gsignond_dbus_remote_plugin_v1_skeleton_iface_init (GSignondDbusRemotePluginV1Iface *iface)
2761 {
2762   iface->response = _gsignond_dbus_remote_plugin_v1_on_signal_response;
2763   iface->response_final = _gsignond_dbus_remote_plugin_v1_on_signal_response_final;
2764   iface->store = _gsignond_dbus_remote_plugin_v1_on_signal_store;
2765   iface->error = _gsignond_dbus_remote_plugin_v1_on_signal_error;
2766   iface->user_action_required = _gsignond_dbus_remote_plugin_v1_on_signal_user_action_required;
2767   iface->refreshed = _gsignond_dbus_remote_plugin_v1_on_signal_refreshed;
2768   iface->status_changed = _gsignond_dbus_remote_plugin_v1_on_signal_status_changed;
2769   iface->get_method = gsignond_dbus_remote_plugin_v1_skeleton_get_method;
2770   iface->get_mechanisms = gsignond_dbus_remote_plugin_v1_skeleton_get_mechanisms;
2771 }
2772
2773 /**
2774  * gsignond_dbus_remote_plugin_v1_skeleton_new:
2775  *
2776  * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-google-code-AccountsSSO-gSingleSignOn-RemotePlugin-V1.top_of_page">com.google.code.AccountsSSO.gSingleSignOn.RemotePlugin.V1</link>.
2777  *
2778  * Returns: (transfer full) (type GSignondDbusRemotePluginV1Skeleton): The skeleton object.
2779  */
2780 GSignondDbusRemotePluginV1 *
2781 gsignond_dbus_remote_plugin_v1_skeleton_new (void)
2782 {
2783   return GSIGNOND_DBUS_REMOTE_PLUGIN_V1 (g_object_new (GSIGNOND_DBUS_TYPE_REMOTE_PLUGIN_V1_SKELETON, NULL));
2784 }
2785