• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is generated by gdbus-codegen, do not modify it.
3  *
4  * The license of this code is the same as for the D-Bus interface description
5  * it was derived from. Note that it links to GLib, so must comply with the
6  * LGPL linking clauses.
7  */
8 
9 #ifdef HAVE_CONFIG_H
10 #  include "config.h"
11 #endif
12 
13 #include "gdbus-daemon-generated.h"
14 
15 #include <string.h>
16 #ifdef G_OS_UNIX
17 #  include <gio/gunixfdlist.h>
18 #endif
19 
20 typedef struct
21 {
22   GDBusArgInfo parent_struct;
23   gboolean use_gvariant;
24 } _ExtendedGDBusArgInfo;
25 
26 typedef struct
27 {
28   GDBusMethodInfo parent_struct;
29   const gchar *signal_name;
30   gboolean pass_fdlist;
31 } _ExtendedGDBusMethodInfo;
32 
33 typedef struct
34 {
35   GDBusSignalInfo parent_struct;
36   const gchar *signal_name;
37 } _ExtendedGDBusSignalInfo;
38 
39 typedef struct
40 {
41   GDBusPropertyInfo parent_struct;
42   const gchar *hyphen_name;
43   guint use_gvariant : 1;
44   guint emits_changed_signal : 1;
45 } _ExtendedGDBusPropertyInfo;
46 
47 typedef struct
48 {
49   GDBusInterfaceInfo parent_struct;
50   const gchar *hyphen_name;
51 } _ExtendedGDBusInterfaceInfo;
52 
53 typedef struct
54 {
55   const _ExtendedGDBusPropertyInfo *info;
56   guint prop_id;
57   GValue orig_value; /* the value before the change */
58 } ChangedProperty;
59 
60 static void
_changed_property_free(ChangedProperty * data)61 _changed_property_free (ChangedProperty *data)
62 {
63   g_value_unset (&data->orig_value);
64   g_free (data);
65 }
66 
67 static gboolean
_g_strv_equal0(gchar ** a,gchar ** b)68 _g_strv_equal0 (gchar **a, gchar **b)
69 {
70   gboolean ret = FALSE;
71   guint n;
72   if (a == NULL && b == NULL)
73     {
74       ret = TRUE;
75       goto out;
76     }
77   if (a == NULL || b == NULL)
78     goto out;
79   if (g_strv_length (a) != g_strv_length (b))
80     goto out;
81   for (n = 0; a[n] != NULL; n++)
82     if (g_strcmp0 (a[n], b[n]) != 0)
83       goto out;
84   ret = TRUE;
85 out:
86   return ret;
87 }
88 
89 static gboolean
_g_variant_equal0(GVariant * a,GVariant * b)90 _g_variant_equal0 (GVariant *a, GVariant *b)
91 {
92   gboolean ret = FALSE;
93   if (a == NULL && b == NULL)
94     {
95       ret = TRUE;
96       goto out;
97     }
98   if (a == NULL || b == NULL)
99     goto out;
100   ret = g_variant_equal (a, b);
101 out:
102   return ret;
103 }
104 
105 G_GNUC_UNUSED static gboolean
_g_value_equal(const GValue * a,const GValue * b)106 _g_value_equal (const GValue *a, const GValue *b)
107 {
108   gboolean ret = FALSE;
109   g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
110   switch (G_VALUE_TYPE (a))
111     {
112       case G_TYPE_BOOLEAN:
113         ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
114         break;
115       case G_TYPE_UCHAR:
116         ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
117         break;
118       case G_TYPE_INT:
119         ret = (g_value_get_int (a) == g_value_get_int (b));
120         break;
121       case G_TYPE_UINT:
122         ret = (g_value_get_uint (a) == g_value_get_uint (b));
123         break;
124       case G_TYPE_INT64:
125         ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
126         break;
127       case G_TYPE_UINT64:
128         ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
129         break;
130       case G_TYPE_DOUBLE:
131         {
132           /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
133           gdouble da = g_value_get_double (a);
134           gdouble db = g_value_get_double (b);
135           ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
136         }
137         break;
138       case G_TYPE_STRING:
139         ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
140         break;
141       case G_TYPE_VARIANT:
142         ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
143         break;
144       default:
145         if (G_VALUE_TYPE (a) == G_TYPE_STRV)
146           ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
147         else
148           g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
149         break;
150     }
151   return ret;
152 }
153 
154 /* ------------------------------------------------------------------------
155  * Code for interface org.freedesktop.DBus
156  * ------------------------------------------------------------------------
157  */
158 
159 /**
160  * SECTION:_GFreedesktopDBus
161  * @title: _GFreedesktopDBus
162  * @short_description: Generated C code for the org.freedesktop.DBus D-Bus interface
163  *
164  * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link> D-Bus interface in C.
165  */
166 
167 /* ---- Introspection data for org.freedesktop.DBus ---- */
168 
169 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_hello_OUT_ARG_assigned_name =
170 {
171   {
172     -1,
173     (gchar *) "assigned_name",
174     (gchar *) "s",
175     NULL
176   },
177   FALSE
178 };
179 
180 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_hello_OUT_ARG_pointers[] =
181 {
182   &__g_freedesktop_dbus_method_info_hello_OUT_ARG_assigned_name.parent_struct,
183   NULL
184 };
185 
186 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_hello =
187 {
188   {
189     -1,
190     (gchar *) "Hello",
191     NULL,
192     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_hello_OUT_ARG_pointers,
193     NULL
194   },
195   "handle-hello",
196   FALSE
197 };
198 
199 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_request_name_IN_ARG_name =
200 {
201   {
202     -1,
203     (gchar *) "name",
204     (gchar *) "s",
205     NULL
206   },
207   FALSE
208 };
209 
210 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_request_name_IN_ARG_flags =
211 {
212   {
213     -1,
214     (gchar *) "flags",
215     (gchar *) "u",
216     NULL
217   },
218   FALSE
219 };
220 
221 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_request_name_IN_ARG_pointers[] =
222 {
223   &__g_freedesktop_dbus_method_info_request_name_IN_ARG_name.parent_struct,
224   &__g_freedesktop_dbus_method_info_request_name_IN_ARG_flags.parent_struct,
225   NULL
226 };
227 
228 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_request_name_OUT_ARG_value =
229 {
230   {
231     -1,
232     (gchar *) "value",
233     (gchar *) "u",
234     NULL
235   },
236   FALSE
237 };
238 
239 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_request_name_OUT_ARG_pointers[] =
240 {
241   &__g_freedesktop_dbus_method_info_request_name_OUT_ARG_value.parent_struct,
242   NULL
243 };
244 
245 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_request_name =
246 {
247   {
248     -1,
249     (gchar *) "RequestName",
250     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_request_name_IN_ARG_pointers,
251     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_request_name_OUT_ARG_pointers,
252     NULL
253   },
254   "handle-request-name",
255   FALSE
256 };
257 
258 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_release_name_IN_ARG_name =
259 {
260   {
261     -1,
262     (gchar *) "name",
263     (gchar *) "s",
264     NULL
265   },
266   FALSE
267 };
268 
269 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_release_name_IN_ARG_pointers[] =
270 {
271   &__g_freedesktop_dbus_method_info_release_name_IN_ARG_name.parent_struct,
272   NULL
273 };
274 
275 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_release_name_OUT_ARG_value =
276 {
277   {
278     -1,
279     (gchar *) "value",
280     (gchar *) "u",
281     NULL
282   },
283   FALSE
284 };
285 
286 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_release_name_OUT_ARG_pointers[] =
287 {
288   &__g_freedesktop_dbus_method_info_release_name_OUT_ARG_value.parent_struct,
289   NULL
290 };
291 
292 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_release_name =
293 {
294   {
295     -1,
296     (gchar *) "ReleaseName",
297     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_release_name_IN_ARG_pointers,
298     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_release_name_OUT_ARG_pointers,
299     NULL
300   },
301   "handle-release-name",
302   FALSE
303 };
304 
305 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_name =
306 {
307   {
308     -1,
309     (gchar *) "name",
310     (gchar *) "s",
311     NULL
312   },
313   FALSE
314 };
315 
316 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_flags =
317 {
318   {
319     -1,
320     (gchar *) "flags",
321     (gchar *) "u",
322     NULL
323   },
324   FALSE
325 };
326 
327 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_pointers[] =
328 {
329   &__g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_name.parent_struct,
330   &__g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_flags.parent_struct,
331   NULL
332 };
333 
334 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_start_service_by_name_OUT_ARG_value =
335 {
336   {
337     -1,
338     (gchar *) "value",
339     (gchar *) "u",
340     NULL
341   },
342   FALSE
343 };
344 
345 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_start_service_by_name_OUT_ARG_pointers[] =
346 {
347   &__g_freedesktop_dbus_method_info_start_service_by_name_OUT_ARG_value.parent_struct,
348   NULL
349 };
350 
351 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_start_service_by_name =
352 {
353   {
354     -1,
355     (gchar *) "StartServiceByName",
356     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_start_service_by_name_IN_ARG_pointers,
357     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_start_service_by_name_OUT_ARG_pointers,
358     NULL
359   },
360   "handle-start-service-by-name",
361   FALSE
362 };
363 
364 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_name_has_owner_IN_ARG_name =
365 {
366   {
367     -1,
368     (gchar *) "name",
369     (gchar *) "s",
370     NULL
371   },
372   FALSE
373 };
374 
375 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_name_has_owner_IN_ARG_pointers[] =
376 {
377   &__g_freedesktop_dbus_method_info_name_has_owner_IN_ARG_name.parent_struct,
378   NULL
379 };
380 
381 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_name_has_owner_OUT_ARG_has_owner =
382 {
383   {
384     -1,
385     (gchar *) "has_owner",
386     (gchar *) "b",
387     NULL
388   },
389   FALSE
390 };
391 
392 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_name_has_owner_OUT_ARG_pointers[] =
393 {
394   &__g_freedesktop_dbus_method_info_name_has_owner_OUT_ARG_has_owner.parent_struct,
395   NULL
396 };
397 
398 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_name_has_owner =
399 {
400   {
401     -1,
402     (gchar *) "NameHasOwner",
403     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_name_has_owner_IN_ARG_pointers,
404     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_name_has_owner_OUT_ARG_pointers,
405     NULL
406   },
407   "handle-name-has-owner",
408   FALSE
409 };
410 
411 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_list_names_OUT_ARG_names =
412 {
413   {
414     -1,
415     (gchar *) "names",
416     (gchar *) "as",
417     NULL
418   },
419   FALSE
420 };
421 
422 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_list_names_OUT_ARG_pointers[] =
423 {
424   &__g_freedesktop_dbus_method_info_list_names_OUT_ARG_names.parent_struct,
425   NULL
426 };
427 
428 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_list_names =
429 {
430   {
431     -1,
432     (gchar *) "ListNames",
433     NULL,
434     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_list_names_OUT_ARG_pointers,
435     NULL
436   },
437   "handle-list-names",
438   FALSE
439 };
440 
441 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_list_activatable_names_OUT_ARG_activatable_names =
442 {
443   {
444     -1,
445     (gchar *) "activatable_names",
446     (gchar *) "as",
447     NULL
448   },
449   FALSE
450 };
451 
452 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_list_activatable_names_OUT_ARG_pointers[] =
453 {
454   &__g_freedesktop_dbus_method_info_list_activatable_names_OUT_ARG_activatable_names.parent_struct,
455   NULL
456 };
457 
458 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_list_activatable_names =
459 {
460   {
461     -1,
462     (gchar *) "ListActivatableNames",
463     NULL,
464     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_list_activatable_names_OUT_ARG_pointers,
465     NULL
466   },
467   "handle-list-activatable-names",
468   FALSE
469 };
470 
471 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_add_match_IN_ARG_rule =
472 {
473   {
474     -1,
475     (gchar *) "rule",
476     (gchar *) "s",
477     NULL
478   },
479   FALSE
480 };
481 
482 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_add_match_IN_ARG_pointers[] =
483 {
484   &__g_freedesktop_dbus_method_info_add_match_IN_ARG_rule.parent_struct,
485   NULL
486 };
487 
488 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_add_match =
489 {
490   {
491     -1,
492     (gchar *) "AddMatch",
493     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_add_match_IN_ARG_pointers,
494     NULL,
495     NULL
496   },
497   "handle-add-match",
498   FALSE
499 };
500 
501 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_remove_match_IN_ARG_rule =
502 {
503   {
504     -1,
505     (gchar *) "rule",
506     (gchar *) "s",
507     NULL
508   },
509   FALSE
510 };
511 
512 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_remove_match_IN_ARG_pointers[] =
513 {
514   &__g_freedesktop_dbus_method_info_remove_match_IN_ARG_rule.parent_struct,
515   NULL
516 };
517 
518 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_remove_match =
519 {
520   {
521     -1,
522     (gchar *) "RemoveMatch",
523     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_remove_match_IN_ARG_pointers,
524     NULL,
525     NULL
526   },
527   "handle-remove-match",
528   FALSE
529 };
530 
531 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_name_owner_IN_ARG_name =
532 {
533   {
534     -1,
535     (gchar *) "name",
536     (gchar *) "s",
537     NULL
538   },
539   FALSE
540 };
541 
542 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_name_owner_IN_ARG_pointers[] =
543 {
544   &__g_freedesktop_dbus_method_info_get_name_owner_IN_ARG_name.parent_struct,
545   NULL
546 };
547 
548 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_name_owner_OUT_ARG_unique_name =
549 {
550   {
551     -1,
552     (gchar *) "unique_name",
553     (gchar *) "s",
554     NULL
555   },
556   FALSE
557 };
558 
559 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_name_owner_OUT_ARG_pointers[] =
560 {
561   &__g_freedesktop_dbus_method_info_get_name_owner_OUT_ARG_unique_name.parent_struct,
562   NULL
563 };
564 
565 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_get_name_owner =
566 {
567   {
568     -1,
569     (gchar *) "GetNameOwner",
570     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_name_owner_IN_ARG_pointers,
571     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_name_owner_OUT_ARG_pointers,
572     NULL
573   },
574   "handle-get-name-owner",
575   FALSE
576 };
577 
578 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_list_queued_owners_IN_ARG_name =
579 {
580   {
581     -1,
582     (gchar *) "name",
583     (gchar *) "s",
584     NULL
585   },
586   FALSE
587 };
588 
589 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_list_queued_owners_IN_ARG_pointers[] =
590 {
591   &__g_freedesktop_dbus_method_info_list_queued_owners_IN_ARG_name.parent_struct,
592   NULL
593 };
594 
595 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_list_queued_owners_OUT_ARG_queued_owners =
596 {
597   {
598     -1,
599     (gchar *) "queued_owners",
600     (gchar *) "as",
601     NULL
602   },
603   FALSE
604 };
605 
606 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_list_queued_owners_OUT_ARG_pointers[] =
607 {
608   &__g_freedesktop_dbus_method_info_list_queued_owners_OUT_ARG_queued_owners.parent_struct,
609   NULL
610 };
611 
612 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_list_queued_owners =
613 {
614   {
615     -1,
616     (gchar *) "ListQueuedOwners",
617     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_list_queued_owners_IN_ARG_pointers,
618     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_list_queued_owners_OUT_ARG_pointers,
619     NULL
620   },
621   "handle-list-queued-owners",
622   FALSE
623 };
624 
625 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_unix_user_IN_ARG_name =
626 {
627   {
628     -1,
629     (gchar *) "name",
630     (gchar *) "s",
631     NULL
632   },
633   FALSE
634 };
635 
636 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_unix_user_IN_ARG_pointers[] =
637 {
638   &__g_freedesktop_dbus_method_info_get_connection_unix_user_IN_ARG_name.parent_struct,
639   NULL
640 };
641 
642 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_unix_user_OUT_ARG_uid =
643 {
644   {
645     -1,
646     (gchar *) "uid",
647     (gchar *) "u",
648     NULL
649   },
650   FALSE
651 };
652 
653 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_unix_user_OUT_ARG_pointers[] =
654 {
655   &__g_freedesktop_dbus_method_info_get_connection_unix_user_OUT_ARG_uid.parent_struct,
656   NULL
657 };
658 
659 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_get_connection_unix_user =
660 {
661   {
662     -1,
663     (gchar *) "GetConnectionUnixUser",
664     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_unix_user_IN_ARG_pointers,
665     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_unix_user_OUT_ARG_pointers,
666     NULL
667   },
668   "handle-get-connection-unix-user",
669   FALSE
670 };
671 
672 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_unix_process_id_IN_ARG_name =
673 {
674   {
675     -1,
676     (gchar *) "name",
677     (gchar *) "s",
678     NULL
679   },
680   FALSE
681 };
682 
683 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_unix_process_id_IN_ARG_pointers[] =
684 {
685   &__g_freedesktop_dbus_method_info_get_connection_unix_process_id_IN_ARG_name.parent_struct,
686   NULL
687 };
688 
689 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_unix_process_id_OUT_ARG_pid =
690 {
691   {
692     -1,
693     (gchar *) "pid",
694     (gchar *) "u",
695     NULL
696   },
697   FALSE
698 };
699 
700 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_unix_process_id_OUT_ARG_pointers[] =
701 {
702   &__g_freedesktop_dbus_method_info_get_connection_unix_process_id_OUT_ARG_pid.parent_struct,
703   NULL
704 };
705 
706 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_get_connection_unix_process_id =
707 {
708   {
709     -1,
710     (gchar *) "GetConnectionUnixProcessID",
711     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_unix_process_id_IN_ARG_pointers,
712     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_unix_process_id_OUT_ARG_pointers,
713     NULL
714   },
715   "handle-get-connection-unix-process-id",
716   FALSE
717 };
718 
719 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_selinux_security_context_IN_ARG_name =
720 {
721   {
722     -1,
723     (gchar *) "name",
724     (gchar *) "s",
725     NULL
726   },
727   FALSE
728 };
729 
730 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_selinux_security_context_IN_ARG_pointers[] =
731 {
732   &__g_freedesktop_dbus_method_info_get_connection_selinux_security_context_IN_ARG_name.parent_struct,
733   NULL
734 };
735 
736 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_connection_selinux_security_context_OUT_ARG_security_context =
737 {
738   {
739     -1,
740     (gchar *) "security_context",
741     (gchar *) "ay",
742     NULL
743   },
744   FALSE
745 };
746 
747 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_connection_selinux_security_context_OUT_ARG_pointers[] =
748 {
749   &__g_freedesktop_dbus_method_info_get_connection_selinux_security_context_OUT_ARG_security_context.parent_struct,
750   NULL
751 };
752 
753 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_get_connection_selinux_security_context =
754 {
755   {
756     -1,
757     (gchar *) "GetConnectionSELinuxSecurityContext",
758     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_selinux_security_context_IN_ARG_pointers,
759     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_connection_selinux_security_context_OUT_ARG_pointers,
760     NULL
761   },
762   "handle-get-connection-selinux-security-context",
763   FALSE
764 };
765 
766 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_update_activation_environment_IN_ARG_environment =
767 {
768   {
769     -1,
770     (gchar *) "environment",
771     (gchar *) "a{ss}",
772     NULL
773   },
774   FALSE
775 };
776 
777 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_update_activation_environment_IN_ARG_pointers[] =
778 {
779   &__g_freedesktop_dbus_method_info_update_activation_environment_IN_ARG_environment.parent_struct,
780   NULL
781 };
782 
783 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_update_activation_environment =
784 {
785   {
786     -1,
787     (gchar *) "UpdateActivationEnvironment",
788     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_update_activation_environment_IN_ARG_pointers,
789     NULL,
790     NULL
791   },
792   "handle-update-activation-environment",
793   FALSE
794 };
795 
796 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_reload_config =
797 {
798   {
799     -1,
800     (gchar *) "ReloadConfig",
801     NULL,
802     NULL,
803     NULL
804   },
805   "handle-reload-config",
806   FALSE
807 };
808 
809 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_method_info_get_id_OUT_ARG_unique_id =
810 {
811   {
812     -1,
813     (gchar *) "unique_id",
814     (gchar *) "s",
815     NULL
816   },
817   FALSE
818 };
819 
820 static const GDBusArgInfo * const __g_freedesktop_dbus_method_info_get_id_OUT_ARG_pointers[] =
821 {
822   &__g_freedesktop_dbus_method_info_get_id_OUT_ARG_unique_id.parent_struct,
823   NULL
824 };
825 
826 static const _ExtendedGDBusMethodInfo __g_freedesktop_dbus_method_info_get_id =
827 {
828   {
829     -1,
830     (gchar *) "GetId",
831     NULL,
832     (GDBusArgInfo **) &__g_freedesktop_dbus_method_info_get_id_OUT_ARG_pointers,
833     NULL
834   },
835   "handle-get-id",
836   FALSE
837 };
838 
839 static const GDBusMethodInfo * const __g_freedesktop_dbus_method_info_pointers[] =
840 {
841   &__g_freedesktop_dbus_method_info_hello.parent_struct,
842   &__g_freedesktop_dbus_method_info_request_name.parent_struct,
843   &__g_freedesktop_dbus_method_info_release_name.parent_struct,
844   &__g_freedesktop_dbus_method_info_start_service_by_name.parent_struct,
845   &__g_freedesktop_dbus_method_info_name_has_owner.parent_struct,
846   &__g_freedesktop_dbus_method_info_list_names.parent_struct,
847   &__g_freedesktop_dbus_method_info_list_activatable_names.parent_struct,
848   &__g_freedesktop_dbus_method_info_add_match.parent_struct,
849   &__g_freedesktop_dbus_method_info_remove_match.parent_struct,
850   &__g_freedesktop_dbus_method_info_get_name_owner.parent_struct,
851   &__g_freedesktop_dbus_method_info_list_queued_owners.parent_struct,
852   &__g_freedesktop_dbus_method_info_get_connection_unix_user.parent_struct,
853   &__g_freedesktop_dbus_method_info_get_connection_unix_process_id.parent_struct,
854   &__g_freedesktop_dbus_method_info_get_connection_selinux_security_context.parent_struct,
855   &__g_freedesktop_dbus_method_info_update_activation_environment.parent_struct,
856   &__g_freedesktop_dbus_method_info_reload_config.parent_struct,
857   &__g_freedesktop_dbus_method_info_get_id.parent_struct,
858   NULL
859 };
860 
861 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_signal_info_name_owner_changed_ARG_name =
862 {
863   {
864     -1,
865     (gchar *) "name",
866     (gchar *) "s",
867     NULL
868   },
869   FALSE
870 };
871 
872 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_signal_info_name_owner_changed_ARG_old_owner =
873 {
874   {
875     -1,
876     (gchar *) "old_owner",
877     (gchar *) "s",
878     NULL
879   },
880   FALSE
881 };
882 
883 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_signal_info_name_owner_changed_ARG_new_owner =
884 {
885   {
886     -1,
887     (gchar *) "new_owner",
888     (gchar *) "s",
889     NULL
890   },
891   FALSE
892 };
893 
894 static const GDBusArgInfo * const __g_freedesktop_dbus_signal_info_name_owner_changed_ARG_pointers[] =
895 {
896   &__g_freedesktop_dbus_signal_info_name_owner_changed_ARG_name.parent_struct,
897   &__g_freedesktop_dbus_signal_info_name_owner_changed_ARG_old_owner.parent_struct,
898   &__g_freedesktop_dbus_signal_info_name_owner_changed_ARG_new_owner.parent_struct,
899   NULL
900 };
901 
902 static const _ExtendedGDBusSignalInfo __g_freedesktop_dbus_signal_info_name_owner_changed =
903 {
904   {
905     -1,
906     (gchar *) "NameOwnerChanged",
907     (GDBusArgInfo **) &__g_freedesktop_dbus_signal_info_name_owner_changed_ARG_pointers,
908     NULL
909   },
910   "name-owner-changed"
911 };
912 
913 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_signal_info_name_lost_ARG_name =
914 {
915   {
916     -1,
917     (gchar *) "name",
918     (gchar *) "s",
919     NULL
920   },
921   FALSE
922 };
923 
924 static const GDBusArgInfo * const __g_freedesktop_dbus_signal_info_name_lost_ARG_pointers[] =
925 {
926   &__g_freedesktop_dbus_signal_info_name_lost_ARG_name.parent_struct,
927   NULL
928 };
929 
930 static const _ExtendedGDBusSignalInfo __g_freedesktop_dbus_signal_info_name_lost =
931 {
932   {
933     -1,
934     (gchar *) "NameLost",
935     (GDBusArgInfo **) &__g_freedesktop_dbus_signal_info_name_lost_ARG_pointers,
936     NULL
937   },
938   "name-lost"
939 };
940 
941 static const _ExtendedGDBusArgInfo __g_freedesktop_dbus_signal_info_name_acquired_ARG_name =
942 {
943   {
944     -1,
945     (gchar *) "name",
946     (gchar *) "s",
947     NULL
948   },
949   FALSE
950 };
951 
952 static const GDBusArgInfo * const __g_freedesktop_dbus_signal_info_name_acquired_ARG_pointers[] =
953 {
954   &__g_freedesktop_dbus_signal_info_name_acquired_ARG_name.parent_struct,
955   NULL
956 };
957 
958 static const _ExtendedGDBusSignalInfo __g_freedesktop_dbus_signal_info_name_acquired =
959 {
960   {
961     -1,
962     (gchar *) "NameAcquired",
963     (GDBusArgInfo **) &__g_freedesktop_dbus_signal_info_name_acquired_ARG_pointers,
964     NULL
965   },
966   "name-acquired"
967 };
968 
969 static const GDBusSignalInfo * const __g_freedesktop_dbus_signal_info_pointers[] =
970 {
971   &__g_freedesktop_dbus_signal_info_name_owner_changed.parent_struct,
972   &__g_freedesktop_dbus_signal_info_name_lost.parent_struct,
973   &__g_freedesktop_dbus_signal_info_name_acquired.parent_struct,
974   NULL
975 };
976 
977 static const _ExtendedGDBusInterfaceInfo __g_freedesktop_dbus_interface_info =
978 {
979   {
980     -1,
981     (gchar *) "org.freedesktop.DBus",
982     (GDBusMethodInfo **) &__g_freedesktop_dbus_method_info_pointers,
983     (GDBusSignalInfo **) &__g_freedesktop_dbus_signal_info_pointers,
984     NULL,
985     NULL
986   },
987   "freedesktop-dbus",
988 };
989 
990 
991 /**
992  * _g_freedesktop_dbus_interface_info:
993  *
994  * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link> D-Bus interface.
995  *
996  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
997  */
998 GDBusInterfaceInfo *
_g_freedesktop_dbus_interface_info(void)999 _g_freedesktop_dbus_interface_info (void)
1000 {
1001   return (GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct;
1002 }
1003 
1004 /**
1005  * _g_freedesktop_dbus_override_properties:
1006  * @klass: The class structure for a #GObject derived class.
1007  * @property_id_begin: The property id to assign to the first overridden property.
1008  *
1009  * Overrides all #GObject properties in the #_GFreedesktopDBus interface for a concrete class.
1010  * The properties are overridden in the order they are defined.
1011  *
1012  * Returns: The last property id.
1013  */
1014 guint
_g_freedesktop_dbus_override_properties(GObjectClass * klass G_GNUC_UNUSED,guint property_id_begin)1015 _g_freedesktop_dbus_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
1016 {
1017   return property_id_begin - 1;
1018 }
1019 
1020 
1021 
1022 /**
1023  * _GFreedesktopDBus:
1024  *
1025  * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link>.
1026  */
1027 
1028 /**
1029  * _GFreedesktopDBusIface:
1030  * @parent_iface: The parent interface.
1031  * @handle_add_match: Handler for the #_GFreedesktopDBus::handle-add-match signal.
1032  * @handle_get_connection_selinux_security_context: Handler for the #_GFreedesktopDBus::handle-get-connection-selinux-security-context signal.
1033  * @handle_get_connection_unix_process_id: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-process-id signal.
1034  * @handle_get_connection_unix_user: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-user signal.
1035  * @handle_get_id: Handler for the #_GFreedesktopDBus::handle-get-id signal.
1036  * @handle_get_name_owner: Handler for the #_GFreedesktopDBus::handle-get-name-owner signal.
1037  * @handle_hello: Handler for the #_GFreedesktopDBus::handle-hello signal.
1038  * @handle_list_activatable_names: Handler for the #_GFreedesktopDBus::handle-list-activatable-names signal.
1039  * @handle_list_names: Handler for the #_GFreedesktopDBus::handle-list-names signal.
1040  * @handle_list_queued_owners: Handler for the #_GFreedesktopDBus::handle-list-queued-owners signal.
1041  * @handle_name_has_owner: Handler for the #_GFreedesktopDBus::handle-name-has-owner signal.
1042  * @handle_release_name: Handler for the #_GFreedesktopDBus::handle-release-name signal.
1043  * @handle_reload_config: Handler for the #_GFreedesktopDBus::handle-reload-config signal.
1044  * @handle_remove_match: Handler for the #_GFreedesktopDBus::handle-remove-match signal.
1045  * @handle_request_name: Handler for the #_GFreedesktopDBus::handle-request-name signal.
1046  * @handle_start_service_by_name: Handler for the #_GFreedesktopDBus::handle-start-service-by-name signal.
1047  * @handle_update_activation_environment: Handler for the #_GFreedesktopDBus::handle-update-activation-environment signal.
1048  * @name_acquired: Handler for the #_GFreedesktopDBus::name-acquired signal.
1049  * @name_lost: Handler for the #_GFreedesktopDBus::name-lost signal.
1050  * @name_owner_changed: Handler for the #_GFreedesktopDBus::name-owner-changed signal.
1051  *
1052  * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link>.
1053  */
1054 
1055 typedef _GFreedesktopDBusIface _GFreedesktopDBusInterface;
G_DEFINE_INTERFACE(_GFreedesktopDBus,_g_freedesktop_dbus,G_TYPE_OBJECT)1056 G_DEFINE_INTERFACE (_GFreedesktopDBus, _g_freedesktop_dbus, G_TYPE_OBJECT)
1057 
1058 static void
1059 _g_freedesktop_dbus_default_init (_GFreedesktopDBusIface *iface)
1060 {
1061   /* GObject signals for incoming D-Bus method calls: */
1062   /**
1063    * _GFreedesktopDBus::handle-hello:
1064    * @object: A #_GFreedesktopDBus.
1065    * @invocation: A #GDBusMethodInvocation.
1066    *
1067    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.Hello">Hello()</link> D-Bus method.
1068    *
1069    * 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 _g_freedesktop_dbus_complete_hello() 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.
1070    *
1071    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1072    */
1073   g_signal_new ("handle-hello",
1074     G_TYPE_FROM_INTERFACE (iface),
1075     G_SIGNAL_RUN_LAST,
1076     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_hello),
1077     g_signal_accumulator_true_handled,
1078     NULL,
1079     g_cclosure_marshal_generic,
1080     G_TYPE_BOOLEAN,
1081     1,
1082     G_TYPE_DBUS_METHOD_INVOCATION);
1083 
1084   /**
1085    * _GFreedesktopDBus::handle-request-name:
1086    * @object: A #_GFreedesktopDBus.
1087    * @invocation: A #GDBusMethodInvocation.
1088    * @arg_name: Argument passed by remote caller.
1089    * @arg_flags: Argument passed by remote caller.
1090    *
1091    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.RequestName">RequestName()</link> D-Bus method.
1092    *
1093    * 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 _g_freedesktop_dbus_complete_request_name() 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.
1094    *
1095    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1096    */
1097   g_signal_new ("handle-request-name",
1098     G_TYPE_FROM_INTERFACE (iface),
1099     G_SIGNAL_RUN_LAST,
1100     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_request_name),
1101     g_signal_accumulator_true_handled,
1102     NULL,
1103     g_cclosure_marshal_generic,
1104     G_TYPE_BOOLEAN,
1105     3,
1106     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT);
1107 
1108   /**
1109    * _GFreedesktopDBus::handle-release-name:
1110    * @object: A #_GFreedesktopDBus.
1111    * @invocation: A #GDBusMethodInvocation.
1112    * @arg_name: Argument passed by remote caller.
1113    *
1114    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.ReleaseName">ReleaseName()</link> D-Bus method.
1115    *
1116    * 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 _g_freedesktop_dbus_complete_release_name() 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.
1117    *
1118    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1119    */
1120   g_signal_new ("handle-release-name",
1121     G_TYPE_FROM_INTERFACE (iface),
1122     G_SIGNAL_RUN_LAST,
1123     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_release_name),
1124     g_signal_accumulator_true_handled,
1125     NULL,
1126     g_cclosure_marshal_generic,
1127     G_TYPE_BOOLEAN,
1128     2,
1129     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1130 
1131   /**
1132    * _GFreedesktopDBus::handle-start-service-by-name:
1133    * @object: A #_GFreedesktopDBus.
1134    * @invocation: A #GDBusMethodInvocation.
1135    * @arg_name: Argument passed by remote caller.
1136    * @arg_flags: Argument passed by remote caller.
1137    *
1138    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.StartServiceByName">StartServiceByName()</link> D-Bus method.
1139    *
1140    * 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 _g_freedesktop_dbus_complete_start_service_by_name() 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.
1141    *
1142    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1143    */
1144   g_signal_new ("handle-start-service-by-name",
1145     G_TYPE_FROM_INTERFACE (iface),
1146     G_SIGNAL_RUN_LAST,
1147     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_start_service_by_name),
1148     g_signal_accumulator_true_handled,
1149     NULL,
1150     g_cclosure_marshal_generic,
1151     G_TYPE_BOOLEAN,
1152     3,
1153     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_UINT);
1154 
1155   /**
1156    * _GFreedesktopDBus::handle-name-has-owner:
1157    * @object: A #_GFreedesktopDBus.
1158    * @invocation: A #GDBusMethodInvocation.
1159    * @arg_name: Argument passed by remote caller.
1160    *
1161    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.NameHasOwner">NameHasOwner()</link> D-Bus method.
1162    *
1163    * 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 _g_freedesktop_dbus_complete_name_has_owner() 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.
1164    *
1165    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1166    */
1167   g_signal_new ("handle-name-has-owner",
1168     G_TYPE_FROM_INTERFACE (iface),
1169     G_SIGNAL_RUN_LAST,
1170     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_name_has_owner),
1171     g_signal_accumulator_true_handled,
1172     NULL,
1173     g_cclosure_marshal_generic,
1174     G_TYPE_BOOLEAN,
1175     2,
1176     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1177 
1178   /**
1179    * _GFreedesktopDBus::handle-list-names:
1180    * @object: A #_GFreedesktopDBus.
1181    * @invocation: A #GDBusMethodInvocation.
1182    *
1183    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.ListNames">ListNames()</link> D-Bus method.
1184    *
1185    * 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 _g_freedesktop_dbus_complete_list_names() 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.
1186    *
1187    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1188    */
1189   g_signal_new ("handle-list-names",
1190     G_TYPE_FROM_INTERFACE (iface),
1191     G_SIGNAL_RUN_LAST,
1192     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_list_names),
1193     g_signal_accumulator_true_handled,
1194     NULL,
1195     g_cclosure_marshal_generic,
1196     G_TYPE_BOOLEAN,
1197     1,
1198     G_TYPE_DBUS_METHOD_INVOCATION);
1199 
1200   /**
1201    * _GFreedesktopDBus::handle-list-activatable-names:
1202    * @object: A #_GFreedesktopDBus.
1203    * @invocation: A #GDBusMethodInvocation.
1204    *
1205    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.ListActivatableNames">ListActivatableNames()</link> D-Bus method.
1206    *
1207    * 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 _g_freedesktop_dbus_complete_list_activatable_names() 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.
1208    *
1209    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1210    */
1211   g_signal_new ("handle-list-activatable-names",
1212     G_TYPE_FROM_INTERFACE (iface),
1213     G_SIGNAL_RUN_LAST,
1214     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_list_activatable_names),
1215     g_signal_accumulator_true_handled,
1216     NULL,
1217     g_cclosure_marshal_generic,
1218     G_TYPE_BOOLEAN,
1219     1,
1220     G_TYPE_DBUS_METHOD_INVOCATION);
1221 
1222   /**
1223    * _GFreedesktopDBus::handle-add-match:
1224    * @object: A #_GFreedesktopDBus.
1225    * @invocation: A #GDBusMethodInvocation.
1226    * @arg_rule: Argument passed by remote caller.
1227    *
1228    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.AddMatch">AddMatch()</link> D-Bus method.
1229    *
1230    * 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 _g_freedesktop_dbus_complete_add_match() 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.
1231    *
1232    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1233    */
1234   g_signal_new ("handle-add-match",
1235     G_TYPE_FROM_INTERFACE (iface),
1236     G_SIGNAL_RUN_LAST,
1237     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_add_match),
1238     g_signal_accumulator_true_handled,
1239     NULL,
1240     g_cclosure_marshal_generic,
1241     G_TYPE_BOOLEAN,
1242     2,
1243     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1244 
1245   /**
1246    * _GFreedesktopDBus::handle-remove-match:
1247    * @object: A #_GFreedesktopDBus.
1248    * @invocation: A #GDBusMethodInvocation.
1249    * @arg_rule: Argument passed by remote caller.
1250    *
1251    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.RemoveMatch">RemoveMatch()</link> D-Bus method.
1252    *
1253    * 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 _g_freedesktop_dbus_complete_remove_match() 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.
1254    *
1255    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1256    */
1257   g_signal_new ("handle-remove-match",
1258     G_TYPE_FROM_INTERFACE (iface),
1259     G_SIGNAL_RUN_LAST,
1260     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_remove_match),
1261     g_signal_accumulator_true_handled,
1262     NULL,
1263     g_cclosure_marshal_generic,
1264     G_TYPE_BOOLEAN,
1265     2,
1266     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1267 
1268   /**
1269    * _GFreedesktopDBus::handle-get-name-owner:
1270    * @object: A #_GFreedesktopDBus.
1271    * @invocation: A #GDBusMethodInvocation.
1272    * @arg_name: Argument passed by remote caller.
1273    *
1274    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.GetNameOwner">GetNameOwner()</link> D-Bus method.
1275    *
1276    * 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 _g_freedesktop_dbus_complete_get_name_owner() 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.
1277    *
1278    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1279    */
1280   g_signal_new ("handle-get-name-owner",
1281     G_TYPE_FROM_INTERFACE (iface),
1282     G_SIGNAL_RUN_LAST,
1283     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_get_name_owner),
1284     g_signal_accumulator_true_handled,
1285     NULL,
1286     g_cclosure_marshal_generic,
1287     G_TYPE_BOOLEAN,
1288     2,
1289     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1290 
1291   /**
1292    * _GFreedesktopDBus::handle-list-queued-owners:
1293    * @object: A #_GFreedesktopDBus.
1294    * @invocation: A #GDBusMethodInvocation.
1295    * @arg_name: Argument passed by remote caller.
1296    *
1297    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.ListQueuedOwners">ListQueuedOwners()</link> D-Bus method.
1298    *
1299    * 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 _g_freedesktop_dbus_complete_list_queued_owners() 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.
1300    *
1301    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1302    */
1303   g_signal_new ("handle-list-queued-owners",
1304     G_TYPE_FROM_INTERFACE (iface),
1305     G_SIGNAL_RUN_LAST,
1306     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_list_queued_owners),
1307     g_signal_accumulator_true_handled,
1308     NULL,
1309     g_cclosure_marshal_generic,
1310     G_TYPE_BOOLEAN,
1311     2,
1312     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1313 
1314   /**
1315    * _GFreedesktopDBus::handle-get-connection-unix-user:
1316    * @object: A #_GFreedesktopDBus.
1317    * @invocation: A #GDBusMethodInvocation.
1318    * @arg_name: Argument passed by remote caller.
1319    *
1320    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixUser">GetConnectionUnixUser()</link> D-Bus method.
1321    *
1322    * 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 _g_freedesktop_dbus_complete_get_connection_unix_user() 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.
1323    *
1324    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1325    */
1326   g_signal_new ("handle-get-connection-unix-user",
1327     G_TYPE_FROM_INTERFACE (iface),
1328     G_SIGNAL_RUN_LAST,
1329     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_get_connection_unix_user),
1330     g_signal_accumulator_true_handled,
1331     NULL,
1332     g_cclosure_marshal_generic,
1333     G_TYPE_BOOLEAN,
1334     2,
1335     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1336 
1337   /**
1338    * _GFreedesktopDBus::handle-get-connection-unix-process-id:
1339    * @object: A #_GFreedesktopDBus.
1340    * @invocation: A #GDBusMethodInvocation.
1341    * @arg_name: Argument passed by remote caller.
1342    *
1343    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixProcessID">GetConnectionUnixProcessID()</link> D-Bus method.
1344    *
1345    * 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 _g_freedesktop_dbus_complete_get_connection_unix_process_id() 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.
1346    *
1347    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1348    */
1349   g_signal_new ("handle-get-connection-unix-process-id",
1350     G_TYPE_FROM_INTERFACE (iface),
1351     G_SIGNAL_RUN_LAST,
1352     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_get_connection_unix_process_id),
1353     g_signal_accumulator_true_handled,
1354     NULL,
1355     g_cclosure_marshal_generic,
1356     G_TYPE_BOOLEAN,
1357     2,
1358     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1359 
1360   /**
1361    * _GFreedesktopDBus::handle-get-connection-selinux-security-context:
1362    * @object: A #_GFreedesktopDBus.
1363    * @invocation: A #GDBusMethodInvocation.
1364    * @arg_name: Argument passed by remote caller.
1365    *
1366    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionSELinuxSecurityContext">GetConnectionSELinuxSecurityContext()</link> D-Bus method.
1367    *
1368    * 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 _g_freedesktop_dbus_complete_get_connection_selinux_security_context() 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.
1369    *
1370    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1371    */
1372   g_signal_new ("handle-get-connection-selinux-security-context",
1373     G_TYPE_FROM_INTERFACE (iface),
1374     G_SIGNAL_RUN_LAST,
1375     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_get_connection_selinux_security_context),
1376     g_signal_accumulator_true_handled,
1377     NULL,
1378     g_cclosure_marshal_generic,
1379     G_TYPE_BOOLEAN,
1380     2,
1381     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
1382 
1383   /**
1384    * _GFreedesktopDBus::handle-update-activation-environment:
1385    * @object: A #_GFreedesktopDBus.
1386    * @invocation: A #GDBusMethodInvocation.
1387    * @arg_environment: Argument passed by remote caller.
1388    *
1389    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.UpdateActivationEnvironment">UpdateActivationEnvironment()</link> D-Bus method.
1390    *
1391    * 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 _g_freedesktop_dbus_complete_update_activation_environment() 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.
1392    *
1393    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1394    */
1395   g_signal_new ("handle-update-activation-environment",
1396     G_TYPE_FROM_INTERFACE (iface),
1397     G_SIGNAL_RUN_LAST,
1398     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_update_activation_environment),
1399     g_signal_accumulator_true_handled,
1400     NULL,
1401     g_cclosure_marshal_generic,
1402     G_TYPE_BOOLEAN,
1403     2,
1404     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
1405 
1406   /**
1407    * _GFreedesktopDBus::handle-reload-config:
1408    * @object: A #_GFreedesktopDBus.
1409    * @invocation: A #GDBusMethodInvocation.
1410    *
1411    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.ReloadConfig">ReloadConfig()</link> D-Bus method.
1412    *
1413    * 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 _g_freedesktop_dbus_complete_reload_config() 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.
1414    *
1415    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1416    */
1417   g_signal_new ("handle-reload-config",
1418     G_TYPE_FROM_INTERFACE (iface),
1419     G_SIGNAL_RUN_LAST,
1420     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_reload_config),
1421     g_signal_accumulator_true_handled,
1422     NULL,
1423     g_cclosure_marshal_generic,
1424     G_TYPE_BOOLEAN,
1425     1,
1426     G_TYPE_DBUS_METHOD_INVOCATION);
1427 
1428   /**
1429    * _GFreedesktopDBus::handle-get-id:
1430    * @object: A #_GFreedesktopDBus.
1431    * @invocation: A #GDBusMethodInvocation.
1432    *
1433    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DBus.GetId">GetId()</link> D-Bus method.
1434    *
1435    * 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 _g_freedesktop_dbus_complete_get_id() 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.
1436    *
1437    * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
1438    */
1439   g_signal_new ("handle-get-id",
1440     G_TYPE_FROM_INTERFACE (iface),
1441     G_SIGNAL_RUN_LAST,
1442     G_STRUCT_OFFSET (_GFreedesktopDBusIface, handle_get_id),
1443     g_signal_accumulator_true_handled,
1444     NULL,
1445     g_cclosure_marshal_generic,
1446     G_TYPE_BOOLEAN,
1447     1,
1448     G_TYPE_DBUS_METHOD_INVOCATION);
1449 
1450   /* GObject signals for received D-Bus signals: */
1451   /**
1452    * _GFreedesktopDBus::name-owner-changed:
1453    * @object: A #_GFreedesktopDBus.
1454    * @arg_name: Argument.
1455    * @arg_old_owner: Argument.
1456    * @arg_new_owner: Argument.
1457    *
1458    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-DBus.NameOwnerChanged">"NameOwnerChanged"</link> is received.
1459    *
1460    * 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.
1461    */
1462   g_signal_new ("name-owner-changed",
1463     G_TYPE_FROM_INTERFACE (iface),
1464     G_SIGNAL_RUN_LAST,
1465     G_STRUCT_OFFSET (_GFreedesktopDBusIface, name_owner_changed),
1466     NULL,
1467     NULL,
1468     g_cclosure_marshal_generic,
1469     G_TYPE_NONE,
1470     3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
1471 
1472   /**
1473    * _GFreedesktopDBus::name-lost:
1474    * @object: A #_GFreedesktopDBus.
1475    * @arg_name: Argument.
1476    *
1477    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-DBus.NameLost">"NameLost"</link> is received.
1478    *
1479    * 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.
1480    */
1481   g_signal_new ("name-lost",
1482     G_TYPE_FROM_INTERFACE (iface),
1483     G_SIGNAL_RUN_LAST,
1484     G_STRUCT_OFFSET (_GFreedesktopDBusIface, name_lost),
1485     NULL,
1486     NULL,
1487     g_cclosure_marshal_generic,
1488     G_TYPE_NONE,
1489     1, G_TYPE_STRING);
1490 
1491   /**
1492    * _GFreedesktopDBus::name-acquired:
1493    * @object: A #_GFreedesktopDBus.
1494    * @arg_name: Argument.
1495    *
1496    * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-DBus.NameAcquired">"NameAcquired"</link> is received.
1497    *
1498    * 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.
1499    */
1500   g_signal_new ("name-acquired",
1501     G_TYPE_FROM_INTERFACE (iface),
1502     G_SIGNAL_RUN_LAST,
1503     G_STRUCT_OFFSET (_GFreedesktopDBusIface, name_acquired),
1504     NULL,
1505     NULL,
1506     g_cclosure_marshal_generic,
1507     G_TYPE_NONE,
1508     1, G_TYPE_STRING);
1509 
1510 }
1511 
1512 /**
1513  * _g_freedesktop_dbus_emit_name_owner_changed:
1514  * @object: A #_GFreedesktopDBus.
1515  * @arg_name: Argument to pass with the signal.
1516  * @arg_old_owner: Argument to pass with the signal.
1517  * @arg_new_owner: Argument to pass with the signal.
1518  *
1519  * Emits the <link linkend="gdbus-signal-org-freedesktop-DBus.NameOwnerChanged">"NameOwnerChanged"</link> D-Bus signal.
1520  */
1521 void
_g_freedesktop_dbus_emit_name_owner_changed(_GFreedesktopDBus * object,const gchar * arg_name,const gchar * arg_old_owner,const gchar * arg_new_owner)1522 _g_freedesktop_dbus_emit_name_owner_changed (
1523     _GFreedesktopDBus *object,
1524     const gchar *arg_name,
1525     const gchar *arg_old_owner,
1526     const gchar *arg_new_owner)
1527 {
1528   g_signal_emit_by_name (object, "name-owner-changed", arg_name, arg_old_owner, arg_new_owner);
1529 }
1530 
1531 /**
1532  * _g_freedesktop_dbus_emit_name_lost:
1533  * @object: A #_GFreedesktopDBus.
1534  * @arg_name: Argument to pass with the signal.
1535  *
1536  * Emits the <link linkend="gdbus-signal-org-freedesktop-DBus.NameLost">"NameLost"</link> D-Bus signal.
1537  */
1538 void
_g_freedesktop_dbus_emit_name_lost(_GFreedesktopDBus * object,const gchar * arg_name)1539 _g_freedesktop_dbus_emit_name_lost (
1540     _GFreedesktopDBus *object,
1541     const gchar *arg_name)
1542 {
1543   g_signal_emit_by_name (object, "name-lost", arg_name);
1544 }
1545 
1546 /**
1547  * _g_freedesktop_dbus_emit_name_acquired:
1548  * @object: A #_GFreedesktopDBus.
1549  * @arg_name: Argument to pass with the signal.
1550  *
1551  * Emits the <link linkend="gdbus-signal-org-freedesktop-DBus.NameAcquired">"NameAcquired"</link> D-Bus signal.
1552  */
1553 void
_g_freedesktop_dbus_emit_name_acquired(_GFreedesktopDBus * object,const gchar * arg_name)1554 _g_freedesktop_dbus_emit_name_acquired (
1555     _GFreedesktopDBus *object,
1556     const gchar *arg_name)
1557 {
1558   g_signal_emit_by_name (object, "name-acquired", arg_name);
1559 }
1560 
1561 /**
1562  * _g_freedesktop_dbus_call_hello:
1563  * @proxy: A #_GFreedesktopDBusProxy.
1564  * @cancellable: (nullable): A #GCancellable or %NULL.
1565  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1566  * @user_data: User data to pass to @callback.
1567  *
1568  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.Hello">Hello()</link> D-Bus method on @proxy.
1569  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
1570  * You can then call _g_freedesktop_dbus_call_hello_finish() to get the result of the operation.
1571  *
1572  * See _g_freedesktop_dbus_call_hello_sync() for the synchronous, blocking version of this method.
1573  */
1574 void
_g_freedesktop_dbus_call_hello(_GFreedesktopDBus * proxy,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)1575 _g_freedesktop_dbus_call_hello (
1576     _GFreedesktopDBus *proxy,
1577     GCancellable *cancellable,
1578     GAsyncReadyCallback callback,
1579     gpointer user_data)
1580 {
1581   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1582     "Hello",
1583     g_variant_new ("()"),
1584     G_DBUS_CALL_FLAGS_NONE,
1585     -1,
1586     cancellable,
1587     callback,
1588     user_data);
1589 }
1590 
1591 /**
1592  * _g_freedesktop_dbus_call_hello_finish:
1593  * @proxy: A #_GFreedesktopDBusProxy.
1594  * @out_assigned_name: (out) (optional): Return location for return parameter or %NULL to ignore.
1595  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_hello().
1596  * @error: Return location for error or %NULL.
1597  *
1598  * Finishes an operation started with _g_freedesktop_dbus_call_hello().
1599  *
1600  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1601  */
1602 gboolean
_g_freedesktop_dbus_call_hello_finish(_GFreedesktopDBus * proxy,gchar ** out_assigned_name,GAsyncResult * res,GError ** error)1603 _g_freedesktop_dbus_call_hello_finish (
1604     _GFreedesktopDBus *proxy,
1605     gchar **out_assigned_name,
1606     GAsyncResult *res,
1607     GError **error)
1608 {
1609   GVariant *_ret;
1610   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1611   if (_ret == NULL)
1612     goto _out;
1613   g_variant_get (_ret,
1614                  "(s)",
1615                  out_assigned_name);
1616   g_variant_unref (_ret);
1617 _out:
1618   return _ret != NULL;
1619 }
1620 
1621 /**
1622  * _g_freedesktop_dbus_call_hello_sync:
1623  * @proxy: A #_GFreedesktopDBusProxy.
1624  * @out_assigned_name: (out) (optional): Return location for return parameter or %NULL to ignore.
1625  * @cancellable: (nullable): A #GCancellable or %NULL.
1626  * @error: Return location for error or %NULL.
1627  *
1628  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.Hello">Hello()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1629  *
1630  * See _g_freedesktop_dbus_call_hello() for the asynchronous version of this method.
1631  *
1632  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1633  */
1634 gboolean
_g_freedesktop_dbus_call_hello_sync(_GFreedesktopDBus * proxy,gchar ** out_assigned_name,GCancellable * cancellable,GError ** error)1635 _g_freedesktop_dbus_call_hello_sync (
1636     _GFreedesktopDBus *proxy,
1637     gchar **out_assigned_name,
1638     GCancellable *cancellable,
1639     GError **error)
1640 {
1641   GVariant *_ret;
1642   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1643     "Hello",
1644     g_variant_new ("()"),
1645     G_DBUS_CALL_FLAGS_NONE,
1646     -1,
1647     cancellable,
1648     error);
1649   if (_ret == NULL)
1650     goto _out;
1651   g_variant_get (_ret,
1652                  "(s)",
1653                  out_assigned_name);
1654   g_variant_unref (_ret);
1655 _out:
1656   return _ret != NULL;
1657 }
1658 
1659 /**
1660  * _g_freedesktop_dbus_call_request_name:
1661  * @proxy: A #_GFreedesktopDBusProxy.
1662  * @arg_name: Argument to pass with the method invocation.
1663  * @arg_flags: Argument to pass with the method invocation.
1664  * @cancellable: (nullable): A #GCancellable or %NULL.
1665  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1666  * @user_data: User data to pass to @callback.
1667  *
1668  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.RequestName">RequestName()</link> D-Bus method on @proxy.
1669  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
1670  * You can then call _g_freedesktop_dbus_call_request_name_finish() to get the result of the operation.
1671  *
1672  * See _g_freedesktop_dbus_call_request_name_sync() for the synchronous, blocking version of this method.
1673  */
1674 void
_g_freedesktop_dbus_call_request_name(_GFreedesktopDBus * proxy,const gchar * arg_name,guint arg_flags,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)1675 _g_freedesktop_dbus_call_request_name (
1676     _GFreedesktopDBus *proxy,
1677     const gchar *arg_name,
1678     guint arg_flags,
1679     GCancellable *cancellable,
1680     GAsyncReadyCallback callback,
1681     gpointer user_data)
1682 {
1683   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1684     "RequestName",
1685     g_variant_new ("(su)",
1686                    arg_name,
1687                    arg_flags),
1688     G_DBUS_CALL_FLAGS_NONE,
1689     -1,
1690     cancellable,
1691     callback,
1692     user_data);
1693 }
1694 
1695 /**
1696  * _g_freedesktop_dbus_call_request_name_finish:
1697  * @proxy: A #_GFreedesktopDBusProxy.
1698  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1699  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_request_name().
1700  * @error: Return location for error or %NULL.
1701  *
1702  * Finishes an operation started with _g_freedesktop_dbus_call_request_name().
1703  *
1704  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1705  */
1706 gboolean
_g_freedesktop_dbus_call_request_name_finish(_GFreedesktopDBus * proxy,guint * out_value,GAsyncResult * res,GError ** error)1707 _g_freedesktop_dbus_call_request_name_finish (
1708     _GFreedesktopDBus *proxy,
1709     guint *out_value,
1710     GAsyncResult *res,
1711     GError **error)
1712 {
1713   GVariant *_ret;
1714   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1715   if (_ret == NULL)
1716     goto _out;
1717   g_variant_get (_ret,
1718                  "(u)",
1719                  out_value);
1720   g_variant_unref (_ret);
1721 _out:
1722   return _ret != NULL;
1723 }
1724 
1725 /**
1726  * _g_freedesktop_dbus_call_request_name_sync:
1727  * @proxy: A #_GFreedesktopDBusProxy.
1728  * @arg_name: Argument to pass with the method invocation.
1729  * @arg_flags: Argument to pass with the method invocation.
1730  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1731  * @cancellable: (nullable): A #GCancellable or %NULL.
1732  * @error: Return location for error or %NULL.
1733  *
1734  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.RequestName">RequestName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1735  *
1736  * See _g_freedesktop_dbus_call_request_name() for the asynchronous version of this method.
1737  *
1738  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1739  */
1740 gboolean
_g_freedesktop_dbus_call_request_name_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,guint arg_flags,guint * out_value,GCancellable * cancellable,GError ** error)1741 _g_freedesktop_dbus_call_request_name_sync (
1742     _GFreedesktopDBus *proxy,
1743     const gchar *arg_name,
1744     guint arg_flags,
1745     guint *out_value,
1746     GCancellable *cancellable,
1747     GError **error)
1748 {
1749   GVariant *_ret;
1750   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1751     "RequestName",
1752     g_variant_new ("(su)",
1753                    arg_name,
1754                    arg_flags),
1755     G_DBUS_CALL_FLAGS_NONE,
1756     -1,
1757     cancellable,
1758     error);
1759   if (_ret == NULL)
1760     goto _out;
1761   g_variant_get (_ret,
1762                  "(u)",
1763                  out_value);
1764   g_variant_unref (_ret);
1765 _out:
1766   return _ret != NULL;
1767 }
1768 
1769 /**
1770  * _g_freedesktop_dbus_call_release_name:
1771  * @proxy: A #_GFreedesktopDBusProxy.
1772  * @arg_name: Argument to pass with the method invocation.
1773  * @cancellable: (nullable): A #GCancellable or %NULL.
1774  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1775  * @user_data: User data to pass to @callback.
1776  *
1777  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ReleaseName">ReleaseName()</link> D-Bus method on @proxy.
1778  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
1779  * You can then call _g_freedesktop_dbus_call_release_name_finish() to get the result of the operation.
1780  *
1781  * See _g_freedesktop_dbus_call_release_name_sync() for the synchronous, blocking version of this method.
1782  */
1783 void
_g_freedesktop_dbus_call_release_name(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)1784 _g_freedesktop_dbus_call_release_name (
1785     _GFreedesktopDBus *proxy,
1786     const gchar *arg_name,
1787     GCancellable *cancellable,
1788     GAsyncReadyCallback callback,
1789     gpointer user_data)
1790 {
1791   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1792     "ReleaseName",
1793     g_variant_new ("(s)",
1794                    arg_name),
1795     G_DBUS_CALL_FLAGS_NONE,
1796     -1,
1797     cancellable,
1798     callback,
1799     user_data);
1800 }
1801 
1802 /**
1803  * _g_freedesktop_dbus_call_release_name_finish:
1804  * @proxy: A #_GFreedesktopDBusProxy.
1805  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1806  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_release_name().
1807  * @error: Return location for error or %NULL.
1808  *
1809  * Finishes an operation started with _g_freedesktop_dbus_call_release_name().
1810  *
1811  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1812  */
1813 gboolean
_g_freedesktop_dbus_call_release_name_finish(_GFreedesktopDBus * proxy,guint * out_value,GAsyncResult * res,GError ** error)1814 _g_freedesktop_dbus_call_release_name_finish (
1815     _GFreedesktopDBus *proxy,
1816     guint *out_value,
1817     GAsyncResult *res,
1818     GError **error)
1819 {
1820   GVariant *_ret;
1821   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1822   if (_ret == NULL)
1823     goto _out;
1824   g_variant_get (_ret,
1825                  "(u)",
1826                  out_value);
1827   g_variant_unref (_ret);
1828 _out:
1829   return _ret != NULL;
1830 }
1831 
1832 /**
1833  * _g_freedesktop_dbus_call_release_name_sync:
1834  * @proxy: A #_GFreedesktopDBusProxy.
1835  * @arg_name: Argument to pass with the method invocation.
1836  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1837  * @cancellable: (nullable): A #GCancellable or %NULL.
1838  * @error: Return location for error or %NULL.
1839  *
1840  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ReleaseName">ReleaseName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1841  *
1842  * See _g_freedesktop_dbus_call_release_name() for the asynchronous version of this method.
1843  *
1844  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1845  */
1846 gboolean
_g_freedesktop_dbus_call_release_name_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,guint * out_value,GCancellable * cancellable,GError ** error)1847 _g_freedesktop_dbus_call_release_name_sync (
1848     _GFreedesktopDBus *proxy,
1849     const gchar *arg_name,
1850     guint *out_value,
1851     GCancellable *cancellable,
1852     GError **error)
1853 {
1854   GVariant *_ret;
1855   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1856     "ReleaseName",
1857     g_variant_new ("(s)",
1858                    arg_name),
1859     G_DBUS_CALL_FLAGS_NONE,
1860     -1,
1861     cancellable,
1862     error);
1863   if (_ret == NULL)
1864     goto _out;
1865   g_variant_get (_ret,
1866                  "(u)",
1867                  out_value);
1868   g_variant_unref (_ret);
1869 _out:
1870   return _ret != NULL;
1871 }
1872 
1873 /**
1874  * _g_freedesktop_dbus_call_start_service_by_name:
1875  * @proxy: A #_GFreedesktopDBusProxy.
1876  * @arg_name: Argument to pass with the method invocation.
1877  * @arg_flags: Argument to pass with the method invocation.
1878  * @cancellable: (nullable): A #GCancellable or %NULL.
1879  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1880  * @user_data: User data to pass to @callback.
1881  *
1882  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.StartServiceByName">StartServiceByName()</link> D-Bus method on @proxy.
1883  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
1884  * You can then call _g_freedesktop_dbus_call_start_service_by_name_finish() to get the result of the operation.
1885  *
1886  * See _g_freedesktop_dbus_call_start_service_by_name_sync() for the synchronous, blocking version of this method.
1887  */
1888 void
_g_freedesktop_dbus_call_start_service_by_name(_GFreedesktopDBus * proxy,const gchar * arg_name,guint arg_flags,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)1889 _g_freedesktop_dbus_call_start_service_by_name (
1890     _GFreedesktopDBus *proxy,
1891     const gchar *arg_name,
1892     guint arg_flags,
1893     GCancellable *cancellable,
1894     GAsyncReadyCallback callback,
1895     gpointer user_data)
1896 {
1897   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1898     "StartServiceByName",
1899     g_variant_new ("(su)",
1900                    arg_name,
1901                    arg_flags),
1902     G_DBUS_CALL_FLAGS_NONE,
1903     -1,
1904     cancellable,
1905     callback,
1906     user_data);
1907 }
1908 
1909 /**
1910  * _g_freedesktop_dbus_call_start_service_by_name_finish:
1911  * @proxy: A #_GFreedesktopDBusProxy.
1912  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1913  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_start_service_by_name().
1914  * @error: Return location for error or %NULL.
1915  *
1916  * Finishes an operation started with _g_freedesktop_dbus_call_start_service_by_name().
1917  *
1918  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1919  */
1920 gboolean
_g_freedesktop_dbus_call_start_service_by_name_finish(_GFreedesktopDBus * proxy,guint * out_value,GAsyncResult * res,GError ** error)1921 _g_freedesktop_dbus_call_start_service_by_name_finish (
1922     _GFreedesktopDBus *proxy,
1923     guint *out_value,
1924     GAsyncResult *res,
1925     GError **error)
1926 {
1927   GVariant *_ret;
1928   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1929   if (_ret == NULL)
1930     goto _out;
1931   g_variant_get (_ret,
1932                  "(u)",
1933                  out_value);
1934   g_variant_unref (_ret);
1935 _out:
1936   return _ret != NULL;
1937 }
1938 
1939 /**
1940  * _g_freedesktop_dbus_call_start_service_by_name_sync:
1941  * @proxy: A #_GFreedesktopDBusProxy.
1942  * @arg_name: Argument to pass with the method invocation.
1943  * @arg_flags: Argument to pass with the method invocation.
1944  * @out_value: (out) (optional): Return location for return parameter or %NULL to ignore.
1945  * @cancellable: (nullable): A #GCancellable or %NULL.
1946  * @error: Return location for error or %NULL.
1947  *
1948  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.StartServiceByName">StartServiceByName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1949  *
1950  * See _g_freedesktop_dbus_call_start_service_by_name() for the asynchronous version of this method.
1951  *
1952  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
1953  */
1954 gboolean
_g_freedesktop_dbus_call_start_service_by_name_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,guint arg_flags,guint * out_value,GCancellable * cancellable,GError ** error)1955 _g_freedesktop_dbus_call_start_service_by_name_sync (
1956     _GFreedesktopDBus *proxy,
1957     const gchar *arg_name,
1958     guint arg_flags,
1959     guint *out_value,
1960     GCancellable *cancellable,
1961     GError **error)
1962 {
1963   GVariant *_ret;
1964   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1965     "StartServiceByName",
1966     g_variant_new ("(su)",
1967                    arg_name,
1968                    arg_flags),
1969     G_DBUS_CALL_FLAGS_NONE,
1970     -1,
1971     cancellable,
1972     error);
1973   if (_ret == NULL)
1974     goto _out;
1975   g_variant_get (_ret,
1976                  "(u)",
1977                  out_value);
1978   g_variant_unref (_ret);
1979 _out:
1980   return _ret != NULL;
1981 }
1982 
1983 /**
1984  * _g_freedesktop_dbus_call_name_has_owner:
1985  * @proxy: A #_GFreedesktopDBusProxy.
1986  * @arg_name: Argument to pass with the method invocation.
1987  * @cancellable: (nullable): A #GCancellable or %NULL.
1988  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1989  * @user_data: User data to pass to @callback.
1990  *
1991  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.NameHasOwner">NameHasOwner()</link> D-Bus method on @proxy.
1992  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
1993  * You can then call _g_freedesktop_dbus_call_name_has_owner_finish() to get the result of the operation.
1994  *
1995  * See _g_freedesktop_dbus_call_name_has_owner_sync() for the synchronous, blocking version of this method.
1996  */
1997 void
_g_freedesktop_dbus_call_name_has_owner(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)1998 _g_freedesktop_dbus_call_name_has_owner (
1999     _GFreedesktopDBus *proxy,
2000     const gchar *arg_name,
2001     GCancellable *cancellable,
2002     GAsyncReadyCallback callback,
2003     gpointer user_data)
2004 {
2005   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2006     "NameHasOwner",
2007     g_variant_new ("(s)",
2008                    arg_name),
2009     G_DBUS_CALL_FLAGS_NONE,
2010     -1,
2011     cancellable,
2012     callback,
2013     user_data);
2014 }
2015 
2016 /**
2017  * _g_freedesktop_dbus_call_name_has_owner_finish:
2018  * @proxy: A #_GFreedesktopDBusProxy.
2019  * @out_has_owner: (out) (optional): Return location for return parameter or %NULL to ignore.
2020  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_name_has_owner().
2021  * @error: Return location for error or %NULL.
2022  *
2023  * Finishes an operation started with _g_freedesktop_dbus_call_name_has_owner().
2024  *
2025  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2026  */
2027 gboolean
_g_freedesktop_dbus_call_name_has_owner_finish(_GFreedesktopDBus * proxy,gboolean * out_has_owner,GAsyncResult * res,GError ** error)2028 _g_freedesktop_dbus_call_name_has_owner_finish (
2029     _GFreedesktopDBus *proxy,
2030     gboolean *out_has_owner,
2031     GAsyncResult *res,
2032     GError **error)
2033 {
2034   GVariant *_ret;
2035   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2036   if (_ret == NULL)
2037     goto _out;
2038   g_variant_get (_ret,
2039                  "(b)",
2040                  out_has_owner);
2041   g_variant_unref (_ret);
2042 _out:
2043   return _ret != NULL;
2044 }
2045 
2046 /**
2047  * _g_freedesktop_dbus_call_name_has_owner_sync:
2048  * @proxy: A #_GFreedesktopDBusProxy.
2049  * @arg_name: Argument to pass with the method invocation.
2050  * @out_has_owner: (out) (optional): Return location for return parameter or %NULL to ignore.
2051  * @cancellable: (nullable): A #GCancellable or %NULL.
2052  * @error: Return location for error or %NULL.
2053  *
2054  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.NameHasOwner">NameHasOwner()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2055  *
2056  * See _g_freedesktop_dbus_call_name_has_owner() for the asynchronous version of this method.
2057  *
2058  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2059  */
2060 gboolean
_g_freedesktop_dbus_call_name_has_owner_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,gboolean * out_has_owner,GCancellable * cancellable,GError ** error)2061 _g_freedesktop_dbus_call_name_has_owner_sync (
2062     _GFreedesktopDBus *proxy,
2063     const gchar *arg_name,
2064     gboolean *out_has_owner,
2065     GCancellable *cancellable,
2066     GError **error)
2067 {
2068   GVariant *_ret;
2069   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2070     "NameHasOwner",
2071     g_variant_new ("(s)",
2072                    arg_name),
2073     G_DBUS_CALL_FLAGS_NONE,
2074     -1,
2075     cancellable,
2076     error);
2077   if (_ret == NULL)
2078     goto _out;
2079   g_variant_get (_ret,
2080                  "(b)",
2081                  out_has_owner);
2082   g_variant_unref (_ret);
2083 _out:
2084   return _ret != NULL;
2085 }
2086 
2087 /**
2088  * _g_freedesktop_dbus_call_list_names:
2089  * @proxy: A #_GFreedesktopDBusProxy.
2090  * @cancellable: (nullable): A #GCancellable or %NULL.
2091  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2092  * @user_data: User data to pass to @callback.
2093  *
2094  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListNames">ListNames()</link> D-Bus method on @proxy.
2095  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2096  * You can then call _g_freedesktop_dbus_call_list_names_finish() to get the result of the operation.
2097  *
2098  * See _g_freedesktop_dbus_call_list_names_sync() for the synchronous, blocking version of this method.
2099  */
2100 void
_g_freedesktop_dbus_call_list_names(_GFreedesktopDBus * proxy,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2101 _g_freedesktop_dbus_call_list_names (
2102     _GFreedesktopDBus *proxy,
2103     GCancellable *cancellable,
2104     GAsyncReadyCallback callback,
2105     gpointer user_data)
2106 {
2107   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2108     "ListNames",
2109     g_variant_new ("()"),
2110     G_DBUS_CALL_FLAGS_NONE,
2111     -1,
2112     cancellable,
2113     callback,
2114     user_data);
2115 }
2116 
2117 /**
2118  * _g_freedesktop_dbus_call_list_names_finish:
2119  * @proxy: A #_GFreedesktopDBusProxy.
2120  * @out_names: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2121  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_names().
2122  * @error: Return location for error or %NULL.
2123  *
2124  * Finishes an operation started with _g_freedesktop_dbus_call_list_names().
2125  *
2126  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2127  */
2128 gboolean
_g_freedesktop_dbus_call_list_names_finish(_GFreedesktopDBus * proxy,gchar *** out_names,GAsyncResult * res,GError ** error)2129 _g_freedesktop_dbus_call_list_names_finish (
2130     _GFreedesktopDBus *proxy,
2131     gchar ***out_names,
2132     GAsyncResult *res,
2133     GError **error)
2134 {
2135   GVariant *_ret;
2136   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2137   if (_ret == NULL)
2138     goto _out;
2139   g_variant_get (_ret,
2140                  "(^as)",
2141                  out_names);
2142   g_variant_unref (_ret);
2143 _out:
2144   return _ret != NULL;
2145 }
2146 
2147 /**
2148  * _g_freedesktop_dbus_call_list_names_sync:
2149  * @proxy: A #_GFreedesktopDBusProxy.
2150  * @out_names: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2151  * @cancellable: (nullable): A #GCancellable or %NULL.
2152  * @error: Return location for error or %NULL.
2153  *
2154  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListNames">ListNames()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2155  *
2156  * See _g_freedesktop_dbus_call_list_names() for the asynchronous version of this method.
2157  *
2158  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2159  */
2160 gboolean
_g_freedesktop_dbus_call_list_names_sync(_GFreedesktopDBus * proxy,gchar *** out_names,GCancellable * cancellable,GError ** error)2161 _g_freedesktop_dbus_call_list_names_sync (
2162     _GFreedesktopDBus *proxy,
2163     gchar ***out_names,
2164     GCancellable *cancellable,
2165     GError **error)
2166 {
2167   GVariant *_ret;
2168   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2169     "ListNames",
2170     g_variant_new ("()"),
2171     G_DBUS_CALL_FLAGS_NONE,
2172     -1,
2173     cancellable,
2174     error);
2175   if (_ret == NULL)
2176     goto _out;
2177   g_variant_get (_ret,
2178                  "(^as)",
2179                  out_names);
2180   g_variant_unref (_ret);
2181 _out:
2182   return _ret != NULL;
2183 }
2184 
2185 /**
2186  * _g_freedesktop_dbus_call_list_activatable_names:
2187  * @proxy: A #_GFreedesktopDBusProxy.
2188  * @cancellable: (nullable): A #GCancellable or %NULL.
2189  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2190  * @user_data: User data to pass to @callback.
2191  *
2192  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListActivatableNames">ListActivatableNames()</link> D-Bus method on @proxy.
2193  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2194  * You can then call _g_freedesktop_dbus_call_list_activatable_names_finish() to get the result of the operation.
2195  *
2196  * See _g_freedesktop_dbus_call_list_activatable_names_sync() for the synchronous, blocking version of this method.
2197  */
2198 void
_g_freedesktop_dbus_call_list_activatable_names(_GFreedesktopDBus * proxy,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2199 _g_freedesktop_dbus_call_list_activatable_names (
2200     _GFreedesktopDBus *proxy,
2201     GCancellable *cancellable,
2202     GAsyncReadyCallback callback,
2203     gpointer user_data)
2204 {
2205   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2206     "ListActivatableNames",
2207     g_variant_new ("()"),
2208     G_DBUS_CALL_FLAGS_NONE,
2209     -1,
2210     cancellable,
2211     callback,
2212     user_data);
2213 }
2214 
2215 /**
2216  * _g_freedesktop_dbus_call_list_activatable_names_finish:
2217  * @proxy: A #_GFreedesktopDBusProxy.
2218  * @out_activatable_names: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2219  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_activatable_names().
2220  * @error: Return location for error or %NULL.
2221  *
2222  * Finishes an operation started with _g_freedesktop_dbus_call_list_activatable_names().
2223  *
2224  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2225  */
2226 gboolean
_g_freedesktop_dbus_call_list_activatable_names_finish(_GFreedesktopDBus * proxy,gchar *** out_activatable_names,GAsyncResult * res,GError ** error)2227 _g_freedesktop_dbus_call_list_activatable_names_finish (
2228     _GFreedesktopDBus *proxy,
2229     gchar ***out_activatable_names,
2230     GAsyncResult *res,
2231     GError **error)
2232 {
2233   GVariant *_ret;
2234   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2235   if (_ret == NULL)
2236     goto _out;
2237   g_variant_get (_ret,
2238                  "(^as)",
2239                  out_activatable_names);
2240   g_variant_unref (_ret);
2241 _out:
2242   return _ret != NULL;
2243 }
2244 
2245 /**
2246  * _g_freedesktop_dbus_call_list_activatable_names_sync:
2247  * @proxy: A #_GFreedesktopDBusProxy.
2248  * @out_activatable_names: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2249  * @cancellable: (nullable): A #GCancellable or %NULL.
2250  * @error: Return location for error or %NULL.
2251  *
2252  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListActivatableNames">ListActivatableNames()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2253  *
2254  * See _g_freedesktop_dbus_call_list_activatable_names() for the asynchronous version of this method.
2255  *
2256  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2257  */
2258 gboolean
_g_freedesktop_dbus_call_list_activatable_names_sync(_GFreedesktopDBus * proxy,gchar *** out_activatable_names,GCancellable * cancellable,GError ** error)2259 _g_freedesktop_dbus_call_list_activatable_names_sync (
2260     _GFreedesktopDBus *proxy,
2261     gchar ***out_activatable_names,
2262     GCancellable *cancellable,
2263     GError **error)
2264 {
2265   GVariant *_ret;
2266   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2267     "ListActivatableNames",
2268     g_variant_new ("()"),
2269     G_DBUS_CALL_FLAGS_NONE,
2270     -1,
2271     cancellable,
2272     error);
2273   if (_ret == NULL)
2274     goto _out;
2275   g_variant_get (_ret,
2276                  "(^as)",
2277                  out_activatable_names);
2278   g_variant_unref (_ret);
2279 _out:
2280   return _ret != NULL;
2281 }
2282 
2283 /**
2284  * _g_freedesktop_dbus_call_add_match:
2285  * @proxy: A #_GFreedesktopDBusProxy.
2286  * @arg_rule: Argument to pass with the method invocation.
2287  * @cancellable: (nullable): A #GCancellable or %NULL.
2288  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2289  * @user_data: User data to pass to @callback.
2290  *
2291  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.AddMatch">AddMatch()</link> D-Bus method on @proxy.
2292  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2293  * You can then call _g_freedesktop_dbus_call_add_match_finish() to get the result of the operation.
2294  *
2295  * See _g_freedesktop_dbus_call_add_match_sync() for the synchronous, blocking version of this method.
2296  */
2297 void
_g_freedesktop_dbus_call_add_match(_GFreedesktopDBus * proxy,const gchar * arg_rule,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2298 _g_freedesktop_dbus_call_add_match (
2299     _GFreedesktopDBus *proxy,
2300     const gchar *arg_rule,
2301     GCancellable *cancellable,
2302     GAsyncReadyCallback callback,
2303     gpointer user_data)
2304 {
2305   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2306     "AddMatch",
2307     g_variant_new ("(s)",
2308                    arg_rule),
2309     G_DBUS_CALL_FLAGS_NONE,
2310     -1,
2311     cancellable,
2312     callback,
2313     user_data);
2314 }
2315 
2316 /**
2317  * _g_freedesktop_dbus_call_add_match_finish:
2318  * @proxy: A #_GFreedesktopDBusProxy.
2319  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_add_match().
2320  * @error: Return location for error or %NULL.
2321  *
2322  * Finishes an operation started with _g_freedesktop_dbus_call_add_match().
2323  *
2324  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2325  */
2326 gboolean
_g_freedesktop_dbus_call_add_match_finish(_GFreedesktopDBus * proxy,GAsyncResult * res,GError ** error)2327 _g_freedesktop_dbus_call_add_match_finish (
2328     _GFreedesktopDBus *proxy,
2329     GAsyncResult *res,
2330     GError **error)
2331 {
2332   GVariant *_ret;
2333   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2334   if (_ret == NULL)
2335     goto _out;
2336   g_variant_get (_ret,
2337                  "()");
2338   g_variant_unref (_ret);
2339 _out:
2340   return _ret != NULL;
2341 }
2342 
2343 /**
2344  * _g_freedesktop_dbus_call_add_match_sync:
2345  * @proxy: A #_GFreedesktopDBusProxy.
2346  * @arg_rule: Argument to pass with the method invocation.
2347  * @cancellable: (nullable): A #GCancellable or %NULL.
2348  * @error: Return location for error or %NULL.
2349  *
2350  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.AddMatch">AddMatch()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2351  *
2352  * See _g_freedesktop_dbus_call_add_match() for the asynchronous version of this method.
2353  *
2354  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2355  */
2356 gboolean
_g_freedesktop_dbus_call_add_match_sync(_GFreedesktopDBus * proxy,const gchar * arg_rule,GCancellable * cancellable,GError ** error)2357 _g_freedesktop_dbus_call_add_match_sync (
2358     _GFreedesktopDBus *proxy,
2359     const gchar *arg_rule,
2360     GCancellable *cancellable,
2361     GError **error)
2362 {
2363   GVariant *_ret;
2364   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2365     "AddMatch",
2366     g_variant_new ("(s)",
2367                    arg_rule),
2368     G_DBUS_CALL_FLAGS_NONE,
2369     -1,
2370     cancellable,
2371     error);
2372   if (_ret == NULL)
2373     goto _out;
2374   g_variant_get (_ret,
2375                  "()");
2376   g_variant_unref (_ret);
2377 _out:
2378   return _ret != NULL;
2379 }
2380 
2381 /**
2382  * _g_freedesktop_dbus_call_remove_match:
2383  * @proxy: A #_GFreedesktopDBusProxy.
2384  * @arg_rule: Argument to pass with the method invocation.
2385  * @cancellable: (nullable): A #GCancellable or %NULL.
2386  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2387  * @user_data: User data to pass to @callback.
2388  *
2389  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.RemoveMatch">RemoveMatch()</link> D-Bus method on @proxy.
2390  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2391  * You can then call _g_freedesktop_dbus_call_remove_match_finish() to get the result of the operation.
2392  *
2393  * See _g_freedesktop_dbus_call_remove_match_sync() for the synchronous, blocking version of this method.
2394  */
2395 void
_g_freedesktop_dbus_call_remove_match(_GFreedesktopDBus * proxy,const gchar * arg_rule,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2396 _g_freedesktop_dbus_call_remove_match (
2397     _GFreedesktopDBus *proxy,
2398     const gchar *arg_rule,
2399     GCancellable *cancellable,
2400     GAsyncReadyCallback callback,
2401     gpointer user_data)
2402 {
2403   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2404     "RemoveMatch",
2405     g_variant_new ("(s)",
2406                    arg_rule),
2407     G_DBUS_CALL_FLAGS_NONE,
2408     -1,
2409     cancellable,
2410     callback,
2411     user_data);
2412 }
2413 
2414 /**
2415  * _g_freedesktop_dbus_call_remove_match_finish:
2416  * @proxy: A #_GFreedesktopDBusProxy.
2417  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_remove_match().
2418  * @error: Return location for error or %NULL.
2419  *
2420  * Finishes an operation started with _g_freedesktop_dbus_call_remove_match().
2421  *
2422  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2423  */
2424 gboolean
_g_freedesktop_dbus_call_remove_match_finish(_GFreedesktopDBus * proxy,GAsyncResult * res,GError ** error)2425 _g_freedesktop_dbus_call_remove_match_finish (
2426     _GFreedesktopDBus *proxy,
2427     GAsyncResult *res,
2428     GError **error)
2429 {
2430   GVariant *_ret;
2431   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2432   if (_ret == NULL)
2433     goto _out;
2434   g_variant_get (_ret,
2435                  "()");
2436   g_variant_unref (_ret);
2437 _out:
2438   return _ret != NULL;
2439 }
2440 
2441 /**
2442  * _g_freedesktop_dbus_call_remove_match_sync:
2443  * @proxy: A #_GFreedesktopDBusProxy.
2444  * @arg_rule: Argument to pass with the method invocation.
2445  * @cancellable: (nullable): A #GCancellable or %NULL.
2446  * @error: Return location for error or %NULL.
2447  *
2448  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.RemoveMatch">RemoveMatch()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2449  *
2450  * See _g_freedesktop_dbus_call_remove_match() for the asynchronous version of this method.
2451  *
2452  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2453  */
2454 gboolean
_g_freedesktop_dbus_call_remove_match_sync(_GFreedesktopDBus * proxy,const gchar * arg_rule,GCancellable * cancellable,GError ** error)2455 _g_freedesktop_dbus_call_remove_match_sync (
2456     _GFreedesktopDBus *proxy,
2457     const gchar *arg_rule,
2458     GCancellable *cancellable,
2459     GError **error)
2460 {
2461   GVariant *_ret;
2462   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2463     "RemoveMatch",
2464     g_variant_new ("(s)",
2465                    arg_rule),
2466     G_DBUS_CALL_FLAGS_NONE,
2467     -1,
2468     cancellable,
2469     error);
2470   if (_ret == NULL)
2471     goto _out;
2472   g_variant_get (_ret,
2473                  "()");
2474   g_variant_unref (_ret);
2475 _out:
2476   return _ret != NULL;
2477 }
2478 
2479 /**
2480  * _g_freedesktop_dbus_call_get_name_owner:
2481  * @proxy: A #_GFreedesktopDBusProxy.
2482  * @arg_name: Argument to pass with the method invocation.
2483  * @cancellable: (nullable): A #GCancellable or %NULL.
2484  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2485  * @user_data: User data to pass to @callback.
2486  *
2487  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetNameOwner">GetNameOwner()</link> D-Bus method on @proxy.
2488  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2489  * You can then call _g_freedesktop_dbus_call_get_name_owner_finish() to get the result of the operation.
2490  *
2491  * See _g_freedesktop_dbus_call_get_name_owner_sync() for the synchronous, blocking version of this method.
2492  */
2493 void
_g_freedesktop_dbus_call_get_name_owner(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2494 _g_freedesktop_dbus_call_get_name_owner (
2495     _GFreedesktopDBus *proxy,
2496     const gchar *arg_name,
2497     GCancellable *cancellable,
2498     GAsyncReadyCallback callback,
2499     gpointer user_data)
2500 {
2501   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2502     "GetNameOwner",
2503     g_variant_new ("(s)",
2504                    arg_name),
2505     G_DBUS_CALL_FLAGS_NONE,
2506     -1,
2507     cancellable,
2508     callback,
2509     user_data);
2510 }
2511 
2512 /**
2513  * _g_freedesktop_dbus_call_get_name_owner_finish:
2514  * @proxy: A #_GFreedesktopDBusProxy.
2515  * @out_unique_name: (out) (optional): Return location for return parameter or %NULL to ignore.
2516  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_name_owner().
2517  * @error: Return location for error or %NULL.
2518  *
2519  * Finishes an operation started with _g_freedesktop_dbus_call_get_name_owner().
2520  *
2521  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2522  */
2523 gboolean
_g_freedesktop_dbus_call_get_name_owner_finish(_GFreedesktopDBus * proxy,gchar ** out_unique_name,GAsyncResult * res,GError ** error)2524 _g_freedesktop_dbus_call_get_name_owner_finish (
2525     _GFreedesktopDBus *proxy,
2526     gchar **out_unique_name,
2527     GAsyncResult *res,
2528     GError **error)
2529 {
2530   GVariant *_ret;
2531   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2532   if (_ret == NULL)
2533     goto _out;
2534   g_variant_get (_ret,
2535                  "(s)",
2536                  out_unique_name);
2537   g_variant_unref (_ret);
2538 _out:
2539   return _ret != NULL;
2540 }
2541 
2542 /**
2543  * _g_freedesktop_dbus_call_get_name_owner_sync:
2544  * @proxy: A #_GFreedesktopDBusProxy.
2545  * @arg_name: Argument to pass with the method invocation.
2546  * @out_unique_name: (out) (optional): Return location for return parameter or %NULL to ignore.
2547  * @cancellable: (nullable): A #GCancellable or %NULL.
2548  * @error: Return location for error or %NULL.
2549  *
2550  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetNameOwner">GetNameOwner()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2551  *
2552  * See _g_freedesktop_dbus_call_get_name_owner() for the asynchronous version of this method.
2553  *
2554  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2555  */
2556 gboolean
_g_freedesktop_dbus_call_get_name_owner_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,gchar ** out_unique_name,GCancellable * cancellable,GError ** error)2557 _g_freedesktop_dbus_call_get_name_owner_sync (
2558     _GFreedesktopDBus *proxy,
2559     const gchar *arg_name,
2560     gchar **out_unique_name,
2561     GCancellable *cancellable,
2562     GError **error)
2563 {
2564   GVariant *_ret;
2565   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2566     "GetNameOwner",
2567     g_variant_new ("(s)",
2568                    arg_name),
2569     G_DBUS_CALL_FLAGS_NONE,
2570     -1,
2571     cancellable,
2572     error);
2573   if (_ret == NULL)
2574     goto _out;
2575   g_variant_get (_ret,
2576                  "(s)",
2577                  out_unique_name);
2578   g_variant_unref (_ret);
2579 _out:
2580   return _ret != NULL;
2581 }
2582 
2583 /**
2584  * _g_freedesktop_dbus_call_list_queued_owners:
2585  * @proxy: A #_GFreedesktopDBusProxy.
2586  * @arg_name: Argument to pass with the method invocation.
2587  * @cancellable: (nullable): A #GCancellable or %NULL.
2588  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2589  * @user_data: User data to pass to @callback.
2590  *
2591  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListQueuedOwners">ListQueuedOwners()</link> D-Bus method on @proxy.
2592  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2593  * You can then call _g_freedesktop_dbus_call_list_queued_owners_finish() to get the result of the operation.
2594  *
2595  * See _g_freedesktop_dbus_call_list_queued_owners_sync() for the synchronous, blocking version of this method.
2596  */
2597 void
_g_freedesktop_dbus_call_list_queued_owners(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2598 _g_freedesktop_dbus_call_list_queued_owners (
2599     _GFreedesktopDBus *proxy,
2600     const gchar *arg_name,
2601     GCancellable *cancellable,
2602     GAsyncReadyCallback callback,
2603     gpointer user_data)
2604 {
2605   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2606     "ListQueuedOwners",
2607     g_variant_new ("(s)",
2608                    arg_name),
2609     G_DBUS_CALL_FLAGS_NONE,
2610     -1,
2611     cancellable,
2612     callback,
2613     user_data);
2614 }
2615 
2616 /**
2617  * _g_freedesktop_dbus_call_list_queued_owners_finish:
2618  * @proxy: A #_GFreedesktopDBusProxy.
2619  * @out_queued_owners: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2620  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_queued_owners().
2621  * @error: Return location for error or %NULL.
2622  *
2623  * Finishes an operation started with _g_freedesktop_dbus_call_list_queued_owners().
2624  *
2625  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2626  */
2627 gboolean
_g_freedesktop_dbus_call_list_queued_owners_finish(_GFreedesktopDBus * proxy,gchar *** out_queued_owners,GAsyncResult * res,GError ** error)2628 _g_freedesktop_dbus_call_list_queued_owners_finish (
2629     _GFreedesktopDBus *proxy,
2630     gchar ***out_queued_owners,
2631     GAsyncResult *res,
2632     GError **error)
2633 {
2634   GVariant *_ret;
2635   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2636   if (_ret == NULL)
2637     goto _out;
2638   g_variant_get (_ret,
2639                  "(^as)",
2640                  out_queued_owners);
2641   g_variant_unref (_ret);
2642 _out:
2643   return _ret != NULL;
2644 }
2645 
2646 /**
2647  * _g_freedesktop_dbus_call_list_queued_owners_sync:
2648  * @proxy: A #_GFreedesktopDBusProxy.
2649  * @arg_name: Argument to pass with the method invocation.
2650  * @out_queued_owners: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
2651  * @cancellable: (nullable): A #GCancellable or %NULL.
2652  * @error: Return location for error or %NULL.
2653  *
2654  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ListQueuedOwners">ListQueuedOwners()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2655  *
2656  * See _g_freedesktop_dbus_call_list_queued_owners() for the asynchronous version of this method.
2657  *
2658  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2659  */
2660 gboolean
_g_freedesktop_dbus_call_list_queued_owners_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,gchar *** out_queued_owners,GCancellable * cancellable,GError ** error)2661 _g_freedesktop_dbus_call_list_queued_owners_sync (
2662     _GFreedesktopDBus *proxy,
2663     const gchar *arg_name,
2664     gchar ***out_queued_owners,
2665     GCancellable *cancellable,
2666     GError **error)
2667 {
2668   GVariant *_ret;
2669   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2670     "ListQueuedOwners",
2671     g_variant_new ("(s)",
2672                    arg_name),
2673     G_DBUS_CALL_FLAGS_NONE,
2674     -1,
2675     cancellable,
2676     error);
2677   if (_ret == NULL)
2678     goto _out;
2679   g_variant_get (_ret,
2680                  "(^as)",
2681                  out_queued_owners);
2682   g_variant_unref (_ret);
2683 _out:
2684   return _ret != NULL;
2685 }
2686 
2687 /**
2688  * _g_freedesktop_dbus_call_get_connection_unix_user:
2689  * @proxy: A #_GFreedesktopDBusProxy.
2690  * @arg_name: Argument to pass with the method invocation.
2691  * @cancellable: (nullable): A #GCancellable or %NULL.
2692  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2693  * @user_data: User data to pass to @callback.
2694  *
2695  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixUser">GetConnectionUnixUser()</link> D-Bus method on @proxy.
2696  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2697  * You can then call _g_freedesktop_dbus_call_get_connection_unix_user_finish() to get the result of the operation.
2698  *
2699  * See _g_freedesktop_dbus_call_get_connection_unix_user_sync() for the synchronous, blocking version of this method.
2700  */
2701 void
_g_freedesktop_dbus_call_get_connection_unix_user(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2702 _g_freedesktop_dbus_call_get_connection_unix_user (
2703     _GFreedesktopDBus *proxy,
2704     const gchar *arg_name,
2705     GCancellable *cancellable,
2706     GAsyncReadyCallback callback,
2707     gpointer user_data)
2708 {
2709   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2710     "GetConnectionUnixUser",
2711     g_variant_new ("(s)",
2712                    arg_name),
2713     G_DBUS_CALL_FLAGS_NONE,
2714     -1,
2715     cancellable,
2716     callback,
2717     user_data);
2718 }
2719 
2720 /**
2721  * _g_freedesktop_dbus_call_get_connection_unix_user_finish:
2722  * @proxy: A #_GFreedesktopDBusProxy.
2723  * @out_uid: (out) (optional): Return location for return parameter or %NULL to ignore.
2724  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_user().
2725  * @error: Return location for error or %NULL.
2726  *
2727  * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_user().
2728  *
2729  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2730  */
2731 gboolean
_g_freedesktop_dbus_call_get_connection_unix_user_finish(_GFreedesktopDBus * proxy,guint * out_uid,GAsyncResult * res,GError ** error)2732 _g_freedesktop_dbus_call_get_connection_unix_user_finish (
2733     _GFreedesktopDBus *proxy,
2734     guint *out_uid,
2735     GAsyncResult *res,
2736     GError **error)
2737 {
2738   GVariant *_ret;
2739   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2740   if (_ret == NULL)
2741     goto _out;
2742   g_variant_get (_ret,
2743                  "(u)",
2744                  out_uid);
2745   g_variant_unref (_ret);
2746 _out:
2747   return _ret != NULL;
2748 }
2749 
2750 /**
2751  * _g_freedesktop_dbus_call_get_connection_unix_user_sync:
2752  * @proxy: A #_GFreedesktopDBusProxy.
2753  * @arg_name: Argument to pass with the method invocation.
2754  * @out_uid: (out) (optional): Return location for return parameter or %NULL to ignore.
2755  * @cancellable: (nullable): A #GCancellable or %NULL.
2756  * @error: Return location for error or %NULL.
2757  *
2758  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixUser">GetConnectionUnixUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2759  *
2760  * See _g_freedesktop_dbus_call_get_connection_unix_user() for the asynchronous version of this method.
2761  *
2762  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2763  */
2764 gboolean
_g_freedesktop_dbus_call_get_connection_unix_user_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,guint * out_uid,GCancellable * cancellable,GError ** error)2765 _g_freedesktop_dbus_call_get_connection_unix_user_sync (
2766     _GFreedesktopDBus *proxy,
2767     const gchar *arg_name,
2768     guint *out_uid,
2769     GCancellable *cancellable,
2770     GError **error)
2771 {
2772   GVariant *_ret;
2773   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2774     "GetConnectionUnixUser",
2775     g_variant_new ("(s)",
2776                    arg_name),
2777     G_DBUS_CALL_FLAGS_NONE,
2778     -1,
2779     cancellable,
2780     error);
2781   if (_ret == NULL)
2782     goto _out;
2783   g_variant_get (_ret,
2784                  "(u)",
2785                  out_uid);
2786   g_variant_unref (_ret);
2787 _out:
2788   return _ret != NULL;
2789 }
2790 
2791 /**
2792  * _g_freedesktop_dbus_call_get_connection_unix_process_id:
2793  * @proxy: A #_GFreedesktopDBusProxy.
2794  * @arg_name: Argument to pass with the method invocation.
2795  * @cancellable: (nullable): A #GCancellable or %NULL.
2796  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2797  * @user_data: User data to pass to @callback.
2798  *
2799  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixProcessID">GetConnectionUnixProcessID()</link> D-Bus method on @proxy.
2800  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2801  * You can then call _g_freedesktop_dbus_call_get_connection_unix_process_id_finish() to get the result of the operation.
2802  *
2803  * See _g_freedesktop_dbus_call_get_connection_unix_process_id_sync() for the synchronous, blocking version of this method.
2804  */
2805 void
_g_freedesktop_dbus_call_get_connection_unix_process_id(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2806 _g_freedesktop_dbus_call_get_connection_unix_process_id (
2807     _GFreedesktopDBus *proxy,
2808     const gchar *arg_name,
2809     GCancellable *cancellable,
2810     GAsyncReadyCallback callback,
2811     gpointer user_data)
2812 {
2813   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2814     "GetConnectionUnixProcessID",
2815     g_variant_new ("(s)",
2816                    arg_name),
2817     G_DBUS_CALL_FLAGS_NONE,
2818     -1,
2819     cancellable,
2820     callback,
2821     user_data);
2822 }
2823 
2824 /**
2825  * _g_freedesktop_dbus_call_get_connection_unix_process_id_finish:
2826  * @proxy: A #_GFreedesktopDBusProxy.
2827  * @out_pid: (out) (optional): Return location for return parameter or %NULL to ignore.
2828  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_process_id().
2829  * @error: Return location for error or %NULL.
2830  *
2831  * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_process_id().
2832  *
2833  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2834  */
2835 gboolean
_g_freedesktop_dbus_call_get_connection_unix_process_id_finish(_GFreedesktopDBus * proxy,guint * out_pid,GAsyncResult * res,GError ** error)2836 _g_freedesktop_dbus_call_get_connection_unix_process_id_finish (
2837     _GFreedesktopDBus *proxy,
2838     guint *out_pid,
2839     GAsyncResult *res,
2840     GError **error)
2841 {
2842   GVariant *_ret;
2843   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2844   if (_ret == NULL)
2845     goto _out;
2846   g_variant_get (_ret,
2847                  "(u)",
2848                  out_pid);
2849   g_variant_unref (_ret);
2850 _out:
2851   return _ret != NULL;
2852 }
2853 
2854 /**
2855  * _g_freedesktop_dbus_call_get_connection_unix_process_id_sync:
2856  * @proxy: A #_GFreedesktopDBusProxy.
2857  * @arg_name: Argument to pass with the method invocation.
2858  * @out_pid: (out) (optional): Return location for return parameter or %NULL to ignore.
2859  * @cancellable: (nullable): A #GCancellable or %NULL.
2860  * @error: Return location for error or %NULL.
2861  *
2862  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixProcessID">GetConnectionUnixProcessID()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2863  *
2864  * See _g_freedesktop_dbus_call_get_connection_unix_process_id() for the asynchronous version of this method.
2865  *
2866  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2867  */
2868 gboolean
_g_freedesktop_dbus_call_get_connection_unix_process_id_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,guint * out_pid,GCancellable * cancellable,GError ** error)2869 _g_freedesktop_dbus_call_get_connection_unix_process_id_sync (
2870     _GFreedesktopDBus *proxy,
2871     const gchar *arg_name,
2872     guint *out_pid,
2873     GCancellable *cancellable,
2874     GError **error)
2875 {
2876   GVariant *_ret;
2877   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2878     "GetConnectionUnixProcessID",
2879     g_variant_new ("(s)",
2880                    arg_name),
2881     G_DBUS_CALL_FLAGS_NONE,
2882     -1,
2883     cancellable,
2884     error);
2885   if (_ret == NULL)
2886     goto _out;
2887   g_variant_get (_ret,
2888                  "(u)",
2889                  out_pid);
2890   g_variant_unref (_ret);
2891 _out:
2892   return _ret != NULL;
2893 }
2894 
2895 /**
2896  * _g_freedesktop_dbus_call_get_connection_selinux_security_context:
2897  * @proxy: A #_GFreedesktopDBusProxy.
2898  * @arg_name: Argument to pass with the method invocation.
2899  * @cancellable: (nullable): A #GCancellable or %NULL.
2900  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
2901  * @user_data: User data to pass to @callback.
2902  *
2903  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionSELinuxSecurityContext">GetConnectionSELinuxSecurityContext()</link> D-Bus method on @proxy.
2904  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
2905  * You can then call _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish() to get the result of the operation.
2906  *
2907  * See _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync() for the synchronous, blocking version of this method.
2908  */
2909 void
_g_freedesktop_dbus_call_get_connection_selinux_security_context(_GFreedesktopDBus * proxy,const gchar * arg_name,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)2910 _g_freedesktop_dbus_call_get_connection_selinux_security_context (
2911     _GFreedesktopDBus *proxy,
2912     const gchar *arg_name,
2913     GCancellable *cancellable,
2914     GAsyncReadyCallback callback,
2915     gpointer user_data)
2916 {
2917   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
2918     "GetConnectionSELinuxSecurityContext",
2919     g_variant_new ("(s)",
2920                    arg_name),
2921     G_DBUS_CALL_FLAGS_NONE,
2922     -1,
2923     cancellable,
2924     callback,
2925     user_data);
2926 }
2927 
2928 /**
2929  * _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish:
2930  * @proxy: A #_GFreedesktopDBusProxy.
2931  * @out_security_context: (out) (optional): Return location for return parameter or %NULL to ignore.
2932  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_selinux_security_context().
2933  * @error: Return location for error or %NULL.
2934  *
2935  * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_selinux_security_context().
2936  *
2937  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2938  */
2939 gboolean
_g_freedesktop_dbus_call_get_connection_selinux_security_context_finish(_GFreedesktopDBus * proxy,gchar ** out_security_context,GAsyncResult * res,GError ** error)2940 _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish (
2941     _GFreedesktopDBus *proxy,
2942     gchar **out_security_context,
2943     GAsyncResult *res,
2944     GError **error)
2945 {
2946   GVariant *_ret;
2947   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
2948   if (_ret == NULL)
2949     goto _out;
2950   g_variant_get (_ret,
2951                  "(^ay)",
2952                  out_security_context);
2953   g_variant_unref (_ret);
2954 _out:
2955   return _ret != NULL;
2956 }
2957 
2958 /**
2959  * _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync:
2960  * @proxy: A #_GFreedesktopDBusProxy.
2961  * @arg_name: Argument to pass with the method invocation.
2962  * @out_security_context: (out) (optional): Return location for return parameter or %NULL to ignore.
2963  * @cancellable: (nullable): A #GCancellable or %NULL.
2964  * @error: Return location for error or %NULL.
2965  *
2966  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionSELinuxSecurityContext">GetConnectionSELinuxSecurityContext()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
2967  *
2968  * See _g_freedesktop_dbus_call_get_connection_selinux_security_context() for the asynchronous version of this method.
2969  *
2970  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
2971  */
2972 gboolean
_g_freedesktop_dbus_call_get_connection_selinux_security_context_sync(_GFreedesktopDBus * proxy,const gchar * arg_name,gchar ** out_security_context,GCancellable * cancellable,GError ** error)2973 _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync (
2974     _GFreedesktopDBus *proxy,
2975     const gchar *arg_name,
2976     gchar **out_security_context,
2977     GCancellable *cancellable,
2978     GError **error)
2979 {
2980   GVariant *_ret;
2981   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
2982     "GetConnectionSELinuxSecurityContext",
2983     g_variant_new ("(s)",
2984                    arg_name),
2985     G_DBUS_CALL_FLAGS_NONE,
2986     -1,
2987     cancellable,
2988     error);
2989   if (_ret == NULL)
2990     goto _out;
2991   g_variant_get (_ret,
2992                  "(^ay)",
2993                  out_security_context);
2994   g_variant_unref (_ret);
2995 _out:
2996   return _ret != NULL;
2997 }
2998 
2999 /**
3000  * _g_freedesktop_dbus_call_update_activation_environment:
3001  * @proxy: A #_GFreedesktopDBusProxy.
3002  * @arg_environment: Argument to pass with the method invocation.
3003  * @cancellable: (nullable): A #GCancellable or %NULL.
3004  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3005  * @user_data: User data to pass to @callback.
3006  *
3007  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.UpdateActivationEnvironment">UpdateActivationEnvironment()</link> D-Bus method on @proxy.
3008  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
3009  * You can then call _g_freedesktop_dbus_call_update_activation_environment_finish() to get the result of the operation.
3010  *
3011  * See _g_freedesktop_dbus_call_update_activation_environment_sync() for the synchronous, blocking version of this method.
3012  */
3013 void
_g_freedesktop_dbus_call_update_activation_environment(_GFreedesktopDBus * proxy,GVariant * arg_environment,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)3014 _g_freedesktop_dbus_call_update_activation_environment (
3015     _GFreedesktopDBus *proxy,
3016     GVariant *arg_environment,
3017     GCancellable *cancellable,
3018     GAsyncReadyCallback callback,
3019     gpointer user_data)
3020 {
3021   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3022     "UpdateActivationEnvironment",
3023     g_variant_new ("(@a{ss})",
3024                    arg_environment),
3025     G_DBUS_CALL_FLAGS_NONE,
3026     -1,
3027     cancellable,
3028     callback,
3029     user_data);
3030 }
3031 
3032 /**
3033  * _g_freedesktop_dbus_call_update_activation_environment_finish:
3034  * @proxy: A #_GFreedesktopDBusProxy.
3035  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_update_activation_environment().
3036  * @error: Return location for error or %NULL.
3037  *
3038  * Finishes an operation started with _g_freedesktop_dbus_call_update_activation_environment().
3039  *
3040  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3041  */
3042 gboolean
_g_freedesktop_dbus_call_update_activation_environment_finish(_GFreedesktopDBus * proxy,GAsyncResult * res,GError ** error)3043 _g_freedesktop_dbus_call_update_activation_environment_finish (
3044     _GFreedesktopDBus *proxy,
3045     GAsyncResult *res,
3046     GError **error)
3047 {
3048   GVariant *_ret;
3049   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3050   if (_ret == NULL)
3051     goto _out;
3052   g_variant_get (_ret,
3053                  "()");
3054   g_variant_unref (_ret);
3055 _out:
3056   return _ret != NULL;
3057 }
3058 
3059 /**
3060  * _g_freedesktop_dbus_call_update_activation_environment_sync:
3061  * @proxy: A #_GFreedesktopDBusProxy.
3062  * @arg_environment: Argument to pass with the method invocation.
3063  * @cancellable: (nullable): A #GCancellable or %NULL.
3064  * @error: Return location for error or %NULL.
3065  *
3066  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.UpdateActivationEnvironment">UpdateActivationEnvironment()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3067  *
3068  * See _g_freedesktop_dbus_call_update_activation_environment() for the asynchronous version of this method.
3069  *
3070  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3071  */
3072 gboolean
_g_freedesktop_dbus_call_update_activation_environment_sync(_GFreedesktopDBus * proxy,GVariant * arg_environment,GCancellable * cancellable,GError ** error)3073 _g_freedesktop_dbus_call_update_activation_environment_sync (
3074     _GFreedesktopDBus *proxy,
3075     GVariant *arg_environment,
3076     GCancellable *cancellable,
3077     GError **error)
3078 {
3079   GVariant *_ret;
3080   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3081     "UpdateActivationEnvironment",
3082     g_variant_new ("(@a{ss})",
3083                    arg_environment),
3084     G_DBUS_CALL_FLAGS_NONE,
3085     -1,
3086     cancellable,
3087     error);
3088   if (_ret == NULL)
3089     goto _out;
3090   g_variant_get (_ret,
3091                  "()");
3092   g_variant_unref (_ret);
3093 _out:
3094   return _ret != NULL;
3095 }
3096 
3097 /**
3098  * _g_freedesktop_dbus_call_reload_config:
3099  * @proxy: A #_GFreedesktopDBusProxy.
3100  * @cancellable: (nullable): A #GCancellable or %NULL.
3101  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3102  * @user_data: User data to pass to @callback.
3103  *
3104  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ReloadConfig">ReloadConfig()</link> D-Bus method on @proxy.
3105  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
3106  * You can then call _g_freedesktop_dbus_call_reload_config_finish() to get the result of the operation.
3107  *
3108  * See _g_freedesktop_dbus_call_reload_config_sync() for the synchronous, blocking version of this method.
3109  */
3110 void
_g_freedesktop_dbus_call_reload_config(_GFreedesktopDBus * proxy,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)3111 _g_freedesktop_dbus_call_reload_config (
3112     _GFreedesktopDBus *proxy,
3113     GCancellable *cancellable,
3114     GAsyncReadyCallback callback,
3115     gpointer user_data)
3116 {
3117   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3118     "ReloadConfig",
3119     g_variant_new ("()"),
3120     G_DBUS_CALL_FLAGS_NONE,
3121     -1,
3122     cancellable,
3123     callback,
3124     user_data);
3125 }
3126 
3127 /**
3128  * _g_freedesktop_dbus_call_reload_config_finish:
3129  * @proxy: A #_GFreedesktopDBusProxy.
3130  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_reload_config().
3131  * @error: Return location for error or %NULL.
3132  *
3133  * Finishes an operation started with _g_freedesktop_dbus_call_reload_config().
3134  *
3135  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3136  */
3137 gboolean
_g_freedesktop_dbus_call_reload_config_finish(_GFreedesktopDBus * proxy,GAsyncResult * res,GError ** error)3138 _g_freedesktop_dbus_call_reload_config_finish (
3139     _GFreedesktopDBus *proxy,
3140     GAsyncResult *res,
3141     GError **error)
3142 {
3143   GVariant *_ret;
3144   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3145   if (_ret == NULL)
3146     goto _out;
3147   g_variant_get (_ret,
3148                  "()");
3149   g_variant_unref (_ret);
3150 _out:
3151   return _ret != NULL;
3152 }
3153 
3154 /**
3155  * _g_freedesktop_dbus_call_reload_config_sync:
3156  * @proxy: A #_GFreedesktopDBusProxy.
3157  * @cancellable: (nullable): A #GCancellable or %NULL.
3158  * @error: Return location for error or %NULL.
3159  *
3160  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.ReloadConfig">ReloadConfig()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3161  *
3162  * See _g_freedesktop_dbus_call_reload_config() for the asynchronous version of this method.
3163  *
3164  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3165  */
3166 gboolean
_g_freedesktop_dbus_call_reload_config_sync(_GFreedesktopDBus * proxy,GCancellable * cancellable,GError ** error)3167 _g_freedesktop_dbus_call_reload_config_sync (
3168     _GFreedesktopDBus *proxy,
3169     GCancellable *cancellable,
3170     GError **error)
3171 {
3172   GVariant *_ret;
3173   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3174     "ReloadConfig",
3175     g_variant_new ("()"),
3176     G_DBUS_CALL_FLAGS_NONE,
3177     -1,
3178     cancellable,
3179     error);
3180   if (_ret == NULL)
3181     goto _out;
3182   g_variant_get (_ret,
3183                  "()");
3184   g_variant_unref (_ret);
3185 _out:
3186   return _ret != NULL;
3187 }
3188 
3189 /**
3190  * _g_freedesktop_dbus_call_get_id:
3191  * @proxy: A #_GFreedesktopDBusProxy.
3192  * @cancellable: (nullable): A #GCancellable or %NULL.
3193  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3194  * @user_data: User data to pass to @callback.
3195  *
3196  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetId">GetId()</link> D-Bus method on @proxy.
3197  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
3198  * You can then call _g_freedesktop_dbus_call_get_id_finish() to get the result of the operation.
3199  *
3200  * See _g_freedesktop_dbus_call_get_id_sync() for the synchronous, blocking version of this method.
3201  */
3202 void
_g_freedesktop_dbus_call_get_id(_GFreedesktopDBus * proxy,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)3203 _g_freedesktop_dbus_call_get_id (
3204     _GFreedesktopDBus *proxy,
3205     GCancellable *cancellable,
3206     GAsyncReadyCallback callback,
3207     gpointer user_data)
3208 {
3209   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3210     "GetId",
3211     g_variant_new ("()"),
3212     G_DBUS_CALL_FLAGS_NONE,
3213     -1,
3214     cancellable,
3215     callback,
3216     user_data);
3217 }
3218 
3219 /**
3220  * _g_freedesktop_dbus_call_get_id_finish:
3221  * @proxy: A #_GFreedesktopDBusProxy.
3222  * @out_unique_id: (out) (optional): Return location for return parameter or %NULL to ignore.
3223  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_id().
3224  * @error: Return location for error or %NULL.
3225  *
3226  * Finishes an operation started with _g_freedesktop_dbus_call_get_id().
3227  *
3228  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3229  */
3230 gboolean
_g_freedesktop_dbus_call_get_id_finish(_GFreedesktopDBus * proxy,gchar ** out_unique_id,GAsyncResult * res,GError ** error)3231 _g_freedesktop_dbus_call_get_id_finish (
3232     _GFreedesktopDBus *proxy,
3233     gchar **out_unique_id,
3234     GAsyncResult *res,
3235     GError **error)
3236 {
3237   GVariant *_ret;
3238   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3239   if (_ret == NULL)
3240     goto _out;
3241   g_variant_get (_ret,
3242                  "(s)",
3243                  out_unique_id);
3244   g_variant_unref (_ret);
3245 _out:
3246   return _ret != NULL;
3247 }
3248 
3249 /**
3250  * _g_freedesktop_dbus_call_get_id_sync:
3251  * @proxy: A #_GFreedesktopDBusProxy.
3252  * @out_unique_id: (out) (optional): Return location for return parameter or %NULL to ignore.
3253  * @cancellable: (nullable): A #GCancellable or %NULL.
3254  * @error: Return location for error or %NULL.
3255  *
3256  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DBus.GetId">GetId()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3257  *
3258  * See _g_freedesktop_dbus_call_get_id() for the asynchronous version of this method.
3259  *
3260  * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
3261  */
3262 gboolean
_g_freedesktop_dbus_call_get_id_sync(_GFreedesktopDBus * proxy,gchar ** out_unique_id,GCancellable * cancellable,GError ** error)3263 _g_freedesktop_dbus_call_get_id_sync (
3264     _GFreedesktopDBus *proxy,
3265     gchar **out_unique_id,
3266     GCancellable *cancellable,
3267     GError **error)
3268 {
3269   GVariant *_ret;
3270   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3271     "GetId",
3272     g_variant_new ("()"),
3273     G_DBUS_CALL_FLAGS_NONE,
3274     -1,
3275     cancellable,
3276     error);
3277   if (_ret == NULL)
3278     goto _out;
3279   g_variant_get (_ret,
3280                  "(s)",
3281                  out_unique_id);
3282   g_variant_unref (_ret);
3283 _out:
3284   return _ret != NULL;
3285 }
3286 
3287 /**
3288  * _g_freedesktop_dbus_complete_hello:
3289  * @object: A #_GFreedesktopDBus.
3290  * @invocation: (transfer full): A #GDBusMethodInvocation.
3291  * @assigned_name: Parameter to return.
3292  *
3293  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.Hello">Hello()</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.
3294  *
3295  * This method will free @invocation, you cannot use it afterwards.
3296  */
3297 void
_g_freedesktop_dbus_complete_hello(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * assigned_name)3298 _g_freedesktop_dbus_complete_hello (
3299     _GFreedesktopDBus *object G_GNUC_UNUSED,
3300     GDBusMethodInvocation *invocation,
3301     const gchar *assigned_name)
3302 {
3303   g_dbus_method_invocation_return_value (invocation,
3304     g_variant_new ("(s)",
3305                    assigned_name));
3306 }
3307 
3308 /**
3309  * _g_freedesktop_dbus_complete_request_name:
3310  * @object: A #_GFreedesktopDBus.
3311  * @invocation: (transfer full): A #GDBusMethodInvocation.
3312  * @value: Parameter to return.
3313  *
3314  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.RequestName">RequestName()</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.
3315  *
3316  * This method will free @invocation, you cannot use it afterwards.
3317  */
3318 void
_g_freedesktop_dbus_complete_request_name(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,guint value)3319 _g_freedesktop_dbus_complete_request_name (
3320     _GFreedesktopDBus *object G_GNUC_UNUSED,
3321     GDBusMethodInvocation *invocation,
3322     guint value)
3323 {
3324   g_dbus_method_invocation_return_value (invocation,
3325     g_variant_new ("(u)",
3326                    value));
3327 }
3328 
3329 /**
3330  * _g_freedesktop_dbus_complete_release_name:
3331  * @object: A #_GFreedesktopDBus.
3332  * @invocation: (transfer full): A #GDBusMethodInvocation.
3333  * @value: Parameter to return.
3334  *
3335  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.ReleaseName">ReleaseName()</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.
3336  *
3337  * This method will free @invocation, you cannot use it afterwards.
3338  */
3339 void
_g_freedesktop_dbus_complete_release_name(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,guint value)3340 _g_freedesktop_dbus_complete_release_name (
3341     _GFreedesktopDBus *object G_GNUC_UNUSED,
3342     GDBusMethodInvocation *invocation,
3343     guint value)
3344 {
3345   g_dbus_method_invocation_return_value (invocation,
3346     g_variant_new ("(u)",
3347                    value));
3348 }
3349 
3350 /**
3351  * _g_freedesktop_dbus_complete_start_service_by_name:
3352  * @object: A #_GFreedesktopDBus.
3353  * @invocation: (transfer full): A #GDBusMethodInvocation.
3354  * @value: Parameter to return.
3355  *
3356  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.StartServiceByName">StartServiceByName()</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.
3357  *
3358  * This method will free @invocation, you cannot use it afterwards.
3359  */
3360 void
_g_freedesktop_dbus_complete_start_service_by_name(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,guint value)3361 _g_freedesktop_dbus_complete_start_service_by_name (
3362     _GFreedesktopDBus *object G_GNUC_UNUSED,
3363     GDBusMethodInvocation *invocation,
3364     guint value)
3365 {
3366   g_dbus_method_invocation_return_value (invocation,
3367     g_variant_new ("(u)",
3368                    value));
3369 }
3370 
3371 /**
3372  * _g_freedesktop_dbus_complete_name_has_owner:
3373  * @object: A #_GFreedesktopDBus.
3374  * @invocation: (transfer full): A #GDBusMethodInvocation.
3375  * @has_owner: Parameter to return.
3376  *
3377  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.NameHasOwner">NameHasOwner()</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.
3378  *
3379  * This method will free @invocation, you cannot use it afterwards.
3380  */
3381 void
_g_freedesktop_dbus_complete_name_has_owner(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,gboolean has_owner)3382 _g_freedesktop_dbus_complete_name_has_owner (
3383     _GFreedesktopDBus *object G_GNUC_UNUSED,
3384     GDBusMethodInvocation *invocation,
3385     gboolean has_owner)
3386 {
3387   g_dbus_method_invocation_return_value (invocation,
3388     g_variant_new ("(b)",
3389                    has_owner));
3390 }
3391 
3392 /**
3393  * _g_freedesktop_dbus_complete_list_names:
3394  * @object: A #_GFreedesktopDBus.
3395  * @invocation: (transfer full): A #GDBusMethodInvocation.
3396  * @names: Parameter to return.
3397  *
3398  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.ListNames">ListNames()</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.
3399  *
3400  * This method will free @invocation, you cannot use it afterwards.
3401  */
3402 void
_g_freedesktop_dbus_complete_list_names(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * const * names)3403 _g_freedesktop_dbus_complete_list_names (
3404     _GFreedesktopDBus *object G_GNUC_UNUSED,
3405     GDBusMethodInvocation *invocation,
3406     const gchar *const *names)
3407 {
3408   g_dbus_method_invocation_return_value (invocation,
3409     g_variant_new ("(^as)",
3410                    names));
3411 }
3412 
3413 /**
3414  * _g_freedesktop_dbus_complete_list_activatable_names:
3415  * @object: A #_GFreedesktopDBus.
3416  * @invocation: (transfer full): A #GDBusMethodInvocation.
3417  * @activatable_names: Parameter to return.
3418  *
3419  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.ListActivatableNames">ListActivatableNames()</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.
3420  *
3421  * This method will free @invocation, you cannot use it afterwards.
3422  */
3423 void
_g_freedesktop_dbus_complete_list_activatable_names(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * const * activatable_names)3424 _g_freedesktop_dbus_complete_list_activatable_names (
3425     _GFreedesktopDBus *object G_GNUC_UNUSED,
3426     GDBusMethodInvocation *invocation,
3427     const gchar *const *activatable_names)
3428 {
3429   g_dbus_method_invocation_return_value (invocation,
3430     g_variant_new ("(^as)",
3431                    activatable_names));
3432 }
3433 
3434 /**
3435  * _g_freedesktop_dbus_complete_add_match:
3436  * @object: A #_GFreedesktopDBus.
3437  * @invocation: (transfer full): A #GDBusMethodInvocation.
3438  *
3439  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.AddMatch">AddMatch()</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.
3440  *
3441  * This method will free @invocation, you cannot use it afterwards.
3442  */
3443 void
_g_freedesktop_dbus_complete_add_match(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation)3444 _g_freedesktop_dbus_complete_add_match (
3445     _GFreedesktopDBus *object G_GNUC_UNUSED,
3446     GDBusMethodInvocation *invocation)
3447 {
3448   g_dbus_method_invocation_return_value (invocation,
3449     g_variant_new ("()"));
3450 }
3451 
3452 /**
3453  * _g_freedesktop_dbus_complete_remove_match:
3454  * @object: A #_GFreedesktopDBus.
3455  * @invocation: (transfer full): A #GDBusMethodInvocation.
3456  *
3457  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.RemoveMatch">RemoveMatch()</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.
3458  *
3459  * This method will free @invocation, you cannot use it afterwards.
3460  */
3461 void
_g_freedesktop_dbus_complete_remove_match(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation)3462 _g_freedesktop_dbus_complete_remove_match (
3463     _GFreedesktopDBus *object G_GNUC_UNUSED,
3464     GDBusMethodInvocation *invocation)
3465 {
3466   g_dbus_method_invocation_return_value (invocation,
3467     g_variant_new ("()"));
3468 }
3469 
3470 /**
3471  * _g_freedesktop_dbus_complete_get_name_owner:
3472  * @object: A #_GFreedesktopDBus.
3473  * @invocation: (transfer full): A #GDBusMethodInvocation.
3474  * @unique_name: Parameter to return.
3475  *
3476  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.GetNameOwner">GetNameOwner()</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.
3477  *
3478  * This method will free @invocation, you cannot use it afterwards.
3479  */
3480 void
_g_freedesktop_dbus_complete_get_name_owner(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * unique_name)3481 _g_freedesktop_dbus_complete_get_name_owner (
3482     _GFreedesktopDBus *object G_GNUC_UNUSED,
3483     GDBusMethodInvocation *invocation,
3484     const gchar *unique_name)
3485 {
3486   g_dbus_method_invocation_return_value (invocation,
3487     g_variant_new ("(s)",
3488                    unique_name));
3489 }
3490 
3491 /**
3492  * _g_freedesktop_dbus_complete_list_queued_owners:
3493  * @object: A #_GFreedesktopDBus.
3494  * @invocation: (transfer full): A #GDBusMethodInvocation.
3495  * @queued_owners: Parameter to return.
3496  *
3497  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.ListQueuedOwners">ListQueuedOwners()</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.
3498  *
3499  * This method will free @invocation, you cannot use it afterwards.
3500  */
3501 void
_g_freedesktop_dbus_complete_list_queued_owners(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * const * queued_owners)3502 _g_freedesktop_dbus_complete_list_queued_owners (
3503     _GFreedesktopDBus *object G_GNUC_UNUSED,
3504     GDBusMethodInvocation *invocation,
3505     const gchar *const *queued_owners)
3506 {
3507   g_dbus_method_invocation_return_value (invocation,
3508     g_variant_new ("(^as)",
3509                    queued_owners));
3510 }
3511 
3512 /**
3513  * _g_freedesktop_dbus_complete_get_connection_unix_user:
3514  * @object: A #_GFreedesktopDBus.
3515  * @invocation: (transfer full): A #GDBusMethodInvocation.
3516  * @uid: Parameter to return.
3517  *
3518  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixUser">GetConnectionUnixUser()</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.
3519  *
3520  * This method will free @invocation, you cannot use it afterwards.
3521  */
3522 void
_g_freedesktop_dbus_complete_get_connection_unix_user(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,guint uid)3523 _g_freedesktop_dbus_complete_get_connection_unix_user (
3524     _GFreedesktopDBus *object G_GNUC_UNUSED,
3525     GDBusMethodInvocation *invocation,
3526     guint uid)
3527 {
3528   g_dbus_method_invocation_return_value (invocation,
3529     g_variant_new ("(u)",
3530                    uid));
3531 }
3532 
3533 /**
3534  * _g_freedesktop_dbus_complete_get_connection_unix_process_id:
3535  * @object: A #_GFreedesktopDBus.
3536  * @invocation: (transfer full): A #GDBusMethodInvocation.
3537  * @pid: Parameter to return.
3538  *
3539  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionUnixProcessID">GetConnectionUnixProcessID()</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.
3540  *
3541  * This method will free @invocation, you cannot use it afterwards.
3542  */
3543 void
_g_freedesktop_dbus_complete_get_connection_unix_process_id(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,guint pid)3544 _g_freedesktop_dbus_complete_get_connection_unix_process_id (
3545     _GFreedesktopDBus *object G_GNUC_UNUSED,
3546     GDBusMethodInvocation *invocation,
3547     guint pid)
3548 {
3549   g_dbus_method_invocation_return_value (invocation,
3550     g_variant_new ("(u)",
3551                    pid));
3552 }
3553 
3554 /**
3555  * _g_freedesktop_dbus_complete_get_connection_selinux_security_context:
3556  * @object: A #_GFreedesktopDBus.
3557  * @invocation: (transfer full): A #GDBusMethodInvocation.
3558  * @security_context: Parameter to return.
3559  *
3560  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.GetConnectionSELinuxSecurityContext">GetConnectionSELinuxSecurityContext()</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.
3561  *
3562  * This method will free @invocation, you cannot use it afterwards.
3563  */
3564 void
_g_freedesktop_dbus_complete_get_connection_selinux_security_context(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * security_context)3565 _g_freedesktop_dbus_complete_get_connection_selinux_security_context (
3566     _GFreedesktopDBus *object G_GNUC_UNUSED,
3567     GDBusMethodInvocation *invocation,
3568     const gchar *security_context)
3569 {
3570   g_dbus_method_invocation_return_value (invocation,
3571     g_variant_new ("(^ay)",
3572                    security_context));
3573 }
3574 
3575 /**
3576  * _g_freedesktop_dbus_complete_update_activation_environment:
3577  * @object: A #_GFreedesktopDBus.
3578  * @invocation: (transfer full): A #GDBusMethodInvocation.
3579  *
3580  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.UpdateActivationEnvironment">UpdateActivationEnvironment()</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.
3581  *
3582  * This method will free @invocation, you cannot use it afterwards.
3583  */
3584 void
_g_freedesktop_dbus_complete_update_activation_environment(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation)3585 _g_freedesktop_dbus_complete_update_activation_environment (
3586     _GFreedesktopDBus *object G_GNUC_UNUSED,
3587     GDBusMethodInvocation *invocation)
3588 {
3589   g_dbus_method_invocation_return_value (invocation,
3590     g_variant_new ("()"));
3591 }
3592 
3593 /**
3594  * _g_freedesktop_dbus_complete_reload_config:
3595  * @object: A #_GFreedesktopDBus.
3596  * @invocation: (transfer full): A #GDBusMethodInvocation.
3597  *
3598  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.ReloadConfig">ReloadConfig()</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.
3599  *
3600  * This method will free @invocation, you cannot use it afterwards.
3601  */
3602 void
_g_freedesktop_dbus_complete_reload_config(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation)3603 _g_freedesktop_dbus_complete_reload_config (
3604     _GFreedesktopDBus *object G_GNUC_UNUSED,
3605     GDBusMethodInvocation *invocation)
3606 {
3607   g_dbus_method_invocation_return_value (invocation,
3608     g_variant_new ("()"));
3609 }
3610 
3611 /**
3612  * _g_freedesktop_dbus_complete_get_id:
3613  * @object: A #_GFreedesktopDBus.
3614  * @invocation: (transfer full): A #GDBusMethodInvocation.
3615  * @unique_id: Parameter to return.
3616  *
3617  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DBus.GetId">GetId()</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.
3618  *
3619  * This method will free @invocation, you cannot use it afterwards.
3620  */
3621 void
_g_freedesktop_dbus_complete_get_id(_GFreedesktopDBus * object G_GNUC_UNUSED,GDBusMethodInvocation * invocation,const gchar * unique_id)3622 _g_freedesktop_dbus_complete_get_id (
3623     _GFreedesktopDBus *object G_GNUC_UNUSED,
3624     GDBusMethodInvocation *invocation,
3625     const gchar *unique_id)
3626 {
3627   g_dbus_method_invocation_return_value (invocation,
3628     g_variant_new ("(s)",
3629                    unique_id));
3630 }
3631 
3632 /* ------------------------------------------------------------------------ */
3633 
3634 /**
3635  * _GFreedesktopDBusProxy:
3636  *
3637  * The #_GFreedesktopDBusProxy structure contains only private data and should only be accessed using the provided API.
3638  */
3639 
3640 /**
3641  * _GFreedesktopDBusProxyClass:
3642  * @parent_class: The parent class.
3643  *
3644  * Class structure for #_GFreedesktopDBusProxy.
3645  */
3646 
3647 struct __GFreedesktopDBusProxyPrivate
3648 {
3649   GData *qdata;
3650 };
3651 
3652 static void _g_freedesktop_dbus_proxy_iface_init (_GFreedesktopDBusIface *iface);
3653 
3654 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE(_GFreedesktopDBusProxy,_g_freedesktop_dbus_proxy,G_TYPE_DBUS_PROXY,G_ADD_PRIVATE (_GFreedesktopDBusProxy)G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS,_g_freedesktop_dbus_proxy_iface_init))3655 G_DEFINE_TYPE_WITH_CODE (_GFreedesktopDBusProxy, _g_freedesktop_dbus_proxy, G_TYPE_DBUS_PROXY,
3656                          G_ADD_PRIVATE (_GFreedesktopDBusProxy)
3657                          G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS, _g_freedesktop_dbus_proxy_iface_init))
3658 
3659 #else
3660 G_DEFINE_TYPE_WITH_CODE (_GFreedesktopDBusProxy, _g_freedesktop_dbus_proxy, G_TYPE_DBUS_PROXY,
3661                          G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS, _g_freedesktop_dbus_proxy_iface_init))
3662 
3663 #endif
3664 static void
3665 _g_freedesktop_dbus_proxy_finalize (GObject *object)
3666 {
3667   _GFreedesktopDBusProxy *proxy = _G_FREEDESKTOP_DBUS_PROXY (object);
3668   g_datalist_clear (&proxy->priv->qdata);
3669   G_OBJECT_CLASS (_g_freedesktop_dbus_proxy_parent_class)->finalize (object);
3670 }
3671 
3672 static void
_g_freedesktop_dbus_proxy_get_property(GObject * object G_GNUC_UNUSED,guint prop_id G_GNUC_UNUSED,GValue * value G_GNUC_UNUSED,GParamSpec * pspec G_GNUC_UNUSED)3673 _g_freedesktop_dbus_proxy_get_property (GObject      *object G_GNUC_UNUSED,
3674   guint         prop_id G_GNUC_UNUSED,
3675   GValue       *value G_GNUC_UNUSED,
3676   GParamSpec   *pspec G_GNUC_UNUSED)
3677 {
3678 }
3679 
3680 static void
_g_freedesktop_dbus_proxy_set_property(GObject * object G_GNUC_UNUSED,guint prop_id G_GNUC_UNUSED,const GValue * value G_GNUC_UNUSED,GParamSpec * pspec G_GNUC_UNUSED)3681 _g_freedesktop_dbus_proxy_set_property (GObject      *object G_GNUC_UNUSED,
3682   guint         prop_id G_GNUC_UNUSED,
3683   const GValue *value G_GNUC_UNUSED,
3684   GParamSpec   *pspec G_GNUC_UNUSED)
3685 {
3686 }
3687 
3688 static void
_g_freedesktop_dbus_proxy_g_signal(GDBusProxy * proxy,const gchar * sender_name G_GNUC_UNUSED,const gchar * signal_name,GVariant * parameters)3689 _g_freedesktop_dbus_proxy_g_signal (GDBusProxy *proxy,
3690   const gchar *sender_name G_GNUC_UNUSED,
3691   const gchar *signal_name,
3692   GVariant *parameters)
3693 {
3694   _ExtendedGDBusSignalInfo *info;
3695   GVariantIter iter;
3696   GVariant *child;
3697   GValue *paramv;
3698   gsize num_params;
3699   gsize n;
3700   guint signal_id;
3701   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct, signal_name);
3702   if (info == NULL)
3703     return;
3704   num_params = g_variant_n_children (parameters);
3705   paramv = g_new0 (GValue, num_params + 1);
3706   g_value_init (&paramv[0], _G_TYPE_FREEDESKTOP_DBUS);
3707   g_value_set_object (&paramv[0], proxy);
3708   g_variant_iter_init (&iter, parameters);
3709   n = 1;
3710   while ((child = g_variant_iter_next_value (&iter)) != NULL)
3711     {
3712       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
3713       if (arg_info->use_gvariant)
3714         {
3715           g_value_init (&paramv[n], G_TYPE_VARIANT);
3716           g_value_set_variant (&paramv[n], child);
3717           n++;
3718         }
3719       else
3720         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
3721       g_variant_unref (child);
3722     }
3723   signal_id = g_signal_lookup (info->signal_name, _G_TYPE_FREEDESKTOP_DBUS);
3724   g_signal_emitv (paramv, signal_id, 0, NULL);
3725   for (n = 0; n < num_params + 1; n++)
3726     g_value_unset (&paramv[n]);
3727   g_free (paramv);
3728 }
3729 
3730 static void
_g_freedesktop_dbus_proxy_g_properties_changed(GDBusProxy * _proxy,GVariant * changed_properties,const gchar * const * invalidated_properties)3731 _g_freedesktop_dbus_proxy_g_properties_changed (GDBusProxy *_proxy,
3732   GVariant *changed_properties,
3733   const gchar *const *invalidated_properties)
3734 {
3735   _GFreedesktopDBusProxy *proxy = _G_FREEDESKTOP_DBUS_PROXY (_proxy);
3736   guint n;
3737   const gchar *key;
3738   GVariantIter *iter;
3739   _ExtendedGDBusPropertyInfo *info;
3740   g_variant_get (changed_properties, "a{sv}", &iter);
3741   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
3742     {
3743       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct, key);
3744       g_datalist_remove_data (&proxy->priv->qdata, key);
3745       if (info != NULL)
3746         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
3747     }
3748   g_variant_iter_free (iter);
3749   for (n = 0; invalidated_properties[n] != NULL; n++)
3750     {
3751       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct, invalidated_properties[n]);
3752       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
3753       if (info != NULL)
3754         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
3755     }
3756 }
3757 
3758 static void
_g_freedesktop_dbus_proxy_init(_GFreedesktopDBusProxy * proxy)3759 _g_freedesktop_dbus_proxy_init (_GFreedesktopDBusProxy *proxy)
3760 {
3761 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
3762   proxy->priv = _g_freedesktop_dbus_proxy_get_instance_private (proxy);
3763 #else
3764   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, _G_TYPE_FREEDESKTOP_DBUS_PROXY, _GFreedesktopDBusProxyPrivate);
3765 #endif
3766 
3767   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), _g_freedesktop_dbus_interface_info ());
3768 }
3769 
3770 static void
_g_freedesktop_dbus_proxy_class_init(_GFreedesktopDBusProxyClass * klass)3771 _g_freedesktop_dbus_proxy_class_init (_GFreedesktopDBusProxyClass *klass)
3772 {
3773   GObjectClass *gobject_class;
3774   GDBusProxyClass *proxy_class;
3775 
3776   gobject_class = G_OBJECT_CLASS (klass);
3777   gobject_class->finalize     = _g_freedesktop_dbus_proxy_finalize;
3778   gobject_class->get_property = _g_freedesktop_dbus_proxy_get_property;
3779   gobject_class->set_property = _g_freedesktop_dbus_proxy_set_property;
3780 
3781   proxy_class = G_DBUS_PROXY_CLASS (klass);
3782   proxy_class->g_signal = _g_freedesktop_dbus_proxy_g_signal;
3783   proxy_class->g_properties_changed = _g_freedesktop_dbus_proxy_g_properties_changed;
3784 
3785 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
3786   g_type_class_add_private (klass, sizeof (_GFreedesktopDBusProxyPrivate));
3787 #endif
3788 }
3789 
3790 static void
_g_freedesktop_dbus_proxy_iface_init(_GFreedesktopDBusIface * iface G_GNUC_UNUSED)3791 _g_freedesktop_dbus_proxy_iface_init (_GFreedesktopDBusIface *iface G_GNUC_UNUSED)
3792 {
3793 }
3794 
3795 /**
3796  * _g_freedesktop_dbus_proxy_new:
3797  * @connection: A #GDBusConnection.
3798  * @flags: Flags from the #GDBusProxyFlags enumeration.
3799  * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3800  * @object_path: An object path.
3801  * @cancellable: (nullable): A #GCancellable or %NULL.
3802  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
3803  * @user_data: User data to pass to @callback.
3804  *
3805  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link>. See g_dbus_proxy_new() for more details.
3806  *
3807  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
3808  * You can then call _g_freedesktop_dbus_proxy_new_finish() to get the result of the operation.
3809  *
3810  * See _g_freedesktop_dbus_proxy_new_sync() for the synchronous, blocking version of this constructor.
3811  */
3812 void
_g_freedesktop_dbus_proxy_new(GDBusConnection * connection,GDBusProxyFlags flags,const gchar * name,const gchar * object_path,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)3813 _g_freedesktop_dbus_proxy_new (
3814     GDBusConnection     *connection,
3815     GDBusProxyFlags      flags,
3816     const gchar         *name,
3817     const gchar         *object_path,
3818     GCancellable        *cancellable,
3819     GAsyncReadyCallback  callback,
3820     gpointer             user_data)
3821 {
3822   g_async_initable_new_async (_G_TYPE_FREEDESKTOP_DBUS_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", "org.freedesktop.DBus", NULL);
3823 }
3824 
3825 /**
3826  * _g_freedesktop_dbus_proxy_new_finish:
3827  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new().
3828  * @error: Return location for error or %NULL
3829  *
3830  * Finishes an operation started with _g_freedesktop_dbus_proxy_new().
3831  *
3832  * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set.
3833  */
3834 _GFreedesktopDBus *
_g_freedesktop_dbus_proxy_new_finish(GAsyncResult * res,GError ** error)3835 _g_freedesktop_dbus_proxy_new_finish (
3836     GAsyncResult        *res,
3837     GError             **error)
3838 {
3839   GObject *ret;
3840   GObject *source_object;
3841   source_object = g_async_result_get_source_object (res);
3842   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
3843   g_object_unref (source_object);
3844   if (ret != NULL)
3845     return _G_FREEDESKTOP_DBUS (ret);
3846   else
3847     return NULL;
3848 }
3849 
3850 /**
3851  * _g_freedesktop_dbus_proxy_new_sync:
3852  * @connection: A #GDBusConnection.
3853  * @flags: Flags from the #GDBusProxyFlags enumeration.
3854  * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3855  * @object_path: An object path.
3856  * @cancellable: (nullable): A #GCancellable or %NULL.
3857  * @error: Return location for error or %NULL
3858  *
3859  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link>. See g_dbus_proxy_new_sync() for more details.
3860  *
3861  * The calling thread is blocked until a reply is received.
3862  *
3863  * See _g_freedesktop_dbus_proxy_new() for the asynchronous version of this constructor.
3864  *
3865  * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set.
3866  */
3867 _GFreedesktopDBus *
_g_freedesktop_dbus_proxy_new_sync(GDBusConnection * connection,GDBusProxyFlags flags,const gchar * name,const gchar * object_path,GCancellable * cancellable,GError ** error)3868 _g_freedesktop_dbus_proxy_new_sync (
3869     GDBusConnection     *connection,
3870     GDBusProxyFlags      flags,
3871     const gchar         *name,
3872     const gchar         *object_path,
3873     GCancellable        *cancellable,
3874     GError             **error)
3875 {
3876   GInitable *ret;
3877   ret = g_initable_new (_G_TYPE_FREEDESKTOP_DBUS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DBus", NULL);
3878   if (ret != NULL)
3879     return _G_FREEDESKTOP_DBUS (ret);
3880   else
3881     return NULL;
3882 }
3883 
3884 
3885 /**
3886  * _g_freedesktop_dbus_proxy_new_for_bus:
3887  * @bus_type: A #GBusType.
3888  * @flags: Flags from the #GDBusProxyFlags enumeration.
3889  * @name: A bus name (well-known or unique).
3890  * @object_path: An object path.
3891  * @cancellable: (nullable): A #GCancellable or %NULL.
3892  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
3893  * @user_data: User data to pass to @callback.
3894  *
3895  * Like _g_freedesktop_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
3896  *
3897  * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()).
3898  * You can then call _g_freedesktop_dbus_proxy_new_for_bus_finish() to get the result of the operation.
3899  *
3900  * See _g_freedesktop_dbus_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
3901  */
3902 void
_g_freedesktop_dbus_proxy_new_for_bus(GBusType bus_type,GDBusProxyFlags flags,const gchar * name,const gchar * object_path,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)3903 _g_freedesktop_dbus_proxy_new_for_bus (
3904     GBusType             bus_type,
3905     GDBusProxyFlags      flags,
3906     const gchar         *name,
3907     const gchar         *object_path,
3908     GCancellable        *cancellable,
3909     GAsyncReadyCallback  callback,
3910     gpointer             user_data)
3911 {
3912   g_async_initable_new_async (_G_TYPE_FREEDESKTOP_DBUS_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", "org.freedesktop.DBus", NULL);
3913 }
3914 
3915 /**
3916  * _g_freedesktop_dbus_proxy_new_for_bus_finish:
3917  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new_for_bus().
3918  * @error: Return location for error or %NULL
3919  *
3920  * Finishes an operation started with _g_freedesktop_dbus_proxy_new_for_bus().
3921  *
3922  * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set.
3923  */
3924 _GFreedesktopDBus *
_g_freedesktop_dbus_proxy_new_for_bus_finish(GAsyncResult * res,GError ** error)3925 _g_freedesktop_dbus_proxy_new_for_bus_finish (
3926     GAsyncResult        *res,
3927     GError             **error)
3928 {
3929   GObject *ret;
3930   GObject *source_object;
3931   source_object = g_async_result_get_source_object (res);
3932   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
3933   g_object_unref (source_object);
3934   if (ret != NULL)
3935     return _G_FREEDESKTOP_DBUS (ret);
3936   else
3937     return NULL;
3938 }
3939 
3940 /**
3941  * _g_freedesktop_dbus_proxy_new_for_bus_sync:
3942  * @bus_type: A #GBusType.
3943  * @flags: Flags from the #GDBusProxyFlags enumeration.
3944  * @name: A bus name (well-known or unique).
3945  * @object_path: An object path.
3946  * @cancellable: (nullable): A #GCancellable or %NULL.
3947  * @error: Return location for error or %NULL
3948  *
3949  * Like _g_freedesktop_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
3950  *
3951  * The calling thread is blocked until a reply is received.
3952  *
3953  * See _g_freedesktop_dbus_proxy_new_for_bus() for the asynchronous version of this constructor.
3954  *
3955  * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set.
3956  */
3957 _GFreedesktopDBus *
_g_freedesktop_dbus_proxy_new_for_bus_sync(GBusType bus_type,GDBusProxyFlags flags,const gchar * name,const gchar * object_path,GCancellable * cancellable,GError ** error)3958 _g_freedesktop_dbus_proxy_new_for_bus_sync (
3959     GBusType             bus_type,
3960     GDBusProxyFlags      flags,
3961     const gchar         *name,
3962     const gchar         *object_path,
3963     GCancellable        *cancellable,
3964     GError             **error)
3965 {
3966   GInitable *ret;
3967   ret = g_initable_new (_G_TYPE_FREEDESKTOP_DBUS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DBus", NULL);
3968   if (ret != NULL)
3969     return _G_FREEDESKTOP_DBUS (ret);
3970   else
3971     return NULL;
3972 }
3973 
3974 
3975 /* ------------------------------------------------------------------------ */
3976 
3977 /**
3978  * _GFreedesktopDBusSkeleton:
3979  *
3980  * The #_GFreedesktopDBusSkeleton structure contains only private data and should only be accessed using the provided API.
3981  */
3982 
3983 /**
3984  * _GFreedesktopDBusSkeletonClass:
3985  * @parent_class: The parent class.
3986  *
3987  * Class structure for #_GFreedesktopDBusSkeleton.
3988  */
3989 
3990 struct __GFreedesktopDBusSkeletonPrivate
3991 {
3992   GValue *properties;
3993   GList *changed_properties;
3994   GSource *changed_properties_idle_source;
3995   GMainContext *context;
3996   GMutex lock;
3997 };
3998 
3999 static void
__g_freedesktop_dbus_skeleton_handle_method_call(GDBusConnection * connection G_GNUC_UNUSED,const gchar * sender G_GNUC_UNUSED,const gchar * object_path G_GNUC_UNUSED,const gchar * interface_name,const gchar * method_name,GVariant * parameters,GDBusMethodInvocation * invocation,gpointer user_data)4000 __g_freedesktop_dbus_skeleton_handle_method_call (
4001   GDBusConnection *connection G_GNUC_UNUSED,
4002   const gchar *sender G_GNUC_UNUSED,
4003   const gchar *object_path G_GNUC_UNUSED,
4004   const gchar *interface_name,
4005   const gchar *method_name,
4006   GVariant *parameters,
4007   GDBusMethodInvocation *invocation,
4008   gpointer user_data)
4009 {
4010   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (user_data);
4011   _ExtendedGDBusMethodInfo *info;
4012   GVariantIter iter;
4013   GVariant *child;
4014   GValue *paramv;
4015   gsize num_params;
4016   guint num_extra;
4017   gsize n;
4018   guint signal_id;
4019   GValue return_value = G_VALUE_INIT;
4020   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
4021   g_assert (info != NULL);
4022   num_params = g_variant_n_children (parameters);
4023   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
4024   n = 0;
4025   g_value_init (&paramv[n], _G_TYPE_FREEDESKTOP_DBUS);
4026   g_value_set_object (&paramv[n++], skeleton);
4027   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
4028   g_value_set_object (&paramv[n++], invocation);
4029   if (info->pass_fdlist)
4030     {
4031 #ifdef G_OS_UNIX
4032       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
4033       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
4034 #else
4035       g_assert_not_reached ();
4036 #endif
4037     }
4038   g_variant_iter_init (&iter, parameters);
4039   while ((child = g_variant_iter_next_value (&iter)) != NULL)
4040     {
4041       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
4042       if (arg_info->use_gvariant)
4043         {
4044           g_value_init (&paramv[n], G_TYPE_VARIANT);
4045           g_value_set_variant (&paramv[n], child);
4046           n++;
4047         }
4048       else
4049         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
4050       g_variant_unref (child);
4051     }
4052   signal_id = g_signal_lookup (info->signal_name, _G_TYPE_FREEDESKTOP_DBUS);
4053   g_value_init (&return_value, G_TYPE_BOOLEAN);
4054   g_signal_emitv (paramv, signal_id, 0, &return_value);
4055   if (!g_value_get_boolean (&return_value))
4056     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);
4057   g_value_unset (&return_value);
4058   for (n = 0; n < num_params + num_extra; n++)
4059     g_value_unset (&paramv[n]);
4060   g_free (paramv);
4061 }
4062 
4063 static GVariant *
__g_freedesktop_dbus_skeleton_handle_get_property(GDBusConnection * connection G_GNUC_UNUSED,const gchar * sender G_GNUC_UNUSED,const gchar * object_path G_GNUC_UNUSED,const gchar * interface_name G_GNUC_UNUSED,const gchar * property_name,GError ** error,gpointer user_data)4064 __g_freedesktop_dbus_skeleton_handle_get_property (
4065   GDBusConnection *connection G_GNUC_UNUSED,
4066   const gchar *sender G_GNUC_UNUSED,
4067   const gchar *object_path G_GNUC_UNUSED,
4068   const gchar *interface_name G_GNUC_UNUSED,
4069   const gchar *property_name,
4070   GError **error,
4071   gpointer user_data)
4072 {
4073   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (user_data);
4074   GValue value = G_VALUE_INIT;
4075   GParamSpec *pspec;
4076   _ExtendedGDBusPropertyInfo *info;
4077   GVariant *ret;
4078   ret = NULL;
4079   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct, property_name);
4080   g_assert (info != NULL);
4081   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
4082   if (pspec == NULL)
4083     {
4084       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
4085     }
4086   else
4087     {
4088       g_value_init (&value, pspec->value_type);
4089       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
4090       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
4091       g_value_unset (&value);
4092     }
4093   return ret;
4094 }
4095 
4096 static gboolean
__g_freedesktop_dbus_skeleton_handle_set_property(GDBusConnection * connection G_GNUC_UNUSED,const gchar * sender G_GNUC_UNUSED,const gchar * object_path G_GNUC_UNUSED,const gchar * interface_name G_GNUC_UNUSED,const gchar * property_name,GVariant * variant,GError ** error,gpointer user_data)4097 __g_freedesktop_dbus_skeleton_handle_set_property (
4098   GDBusConnection *connection G_GNUC_UNUSED,
4099   const gchar *sender G_GNUC_UNUSED,
4100   const gchar *object_path G_GNUC_UNUSED,
4101   const gchar *interface_name G_GNUC_UNUSED,
4102   const gchar *property_name,
4103   GVariant *variant,
4104   GError **error,
4105   gpointer user_data)
4106 {
4107   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (user_data);
4108   GValue value = G_VALUE_INIT;
4109   GParamSpec *pspec;
4110   _ExtendedGDBusPropertyInfo *info;
4111   gboolean ret;
4112   ret = FALSE;
4113   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &__g_freedesktop_dbus_interface_info.parent_struct, property_name);
4114   g_assert (info != NULL);
4115   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
4116   if (pspec == NULL)
4117     {
4118       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
4119     }
4120   else
4121     {
4122       if (info->use_gvariant)
4123         g_value_set_variant (&value, variant);
4124       else
4125         g_dbus_gvariant_to_gvalue (variant, &value);
4126       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
4127       g_value_unset (&value);
4128       ret = TRUE;
4129     }
4130   return ret;
4131 }
4132 
4133 static const GDBusInterfaceVTable __g_freedesktop_dbus_skeleton_vtable =
4134 {
4135   __g_freedesktop_dbus_skeleton_handle_method_call,
4136   __g_freedesktop_dbus_skeleton_handle_get_property,
4137   __g_freedesktop_dbus_skeleton_handle_set_property,
4138   {NULL}
4139 };
4140 
4141 static GDBusInterfaceInfo *
_g_freedesktop_dbus_skeleton_dbus_interface_get_info(GDBusInterfaceSkeleton * skeleton G_GNUC_UNUSED)4142 _g_freedesktop_dbus_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
4143 {
4144   return _g_freedesktop_dbus_interface_info ();
4145 }
4146 
4147 static GDBusInterfaceVTable *
_g_freedesktop_dbus_skeleton_dbus_interface_get_vtable(GDBusInterfaceSkeleton * skeleton G_GNUC_UNUSED)4148 _g_freedesktop_dbus_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
4149 {
4150   return (GDBusInterfaceVTable *) &__g_freedesktop_dbus_skeleton_vtable;
4151 }
4152 
4153 static GVariant *
_g_freedesktop_dbus_skeleton_dbus_interface_get_properties(GDBusInterfaceSkeleton * _skeleton)4154 _g_freedesktop_dbus_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
4155 {
4156   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (_skeleton);
4157 
4158   GVariantBuilder builder;
4159   guint n;
4160   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
4161   if (__g_freedesktop_dbus_interface_info.parent_struct.properties == NULL)
4162     goto out;
4163   for (n = 0; __g_freedesktop_dbus_interface_info.parent_struct.properties[n] != NULL; n++)
4164     {
4165       GDBusPropertyInfo *info = __g_freedesktop_dbus_interface_info.parent_struct.properties[n];
4166       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
4167         {
4168           GVariant *value;
4169           value = __g_freedesktop_dbus_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)), "org.freedesktop.DBus", info->name, NULL, skeleton);
4170           if (value != NULL)
4171             {
4172               g_variant_take_ref (value);
4173               g_variant_builder_add (&builder, "{sv}", info->name, value);
4174               g_variant_unref (value);
4175             }
4176         }
4177     }
4178 out:
4179   return g_variant_builder_end (&builder);
4180 }
4181 
4182 static void
_g_freedesktop_dbus_skeleton_dbus_interface_flush(GDBusInterfaceSkeleton * _skeleton G_GNUC_UNUSED)4183 _g_freedesktop_dbus_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED)
4184 {
4185 }
4186 
4187 static void
__g_freedesktop_dbus_on_signal_name_owner_changed(_GFreedesktopDBus * object,const gchar * arg_name,const gchar * arg_old_owner,const gchar * arg_new_owner)4188 __g_freedesktop_dbus_on_signal_name_owner_changed (
4189     _GFreedesktopDBus *object,
4190     const gchar *arg_name,
4191     const gchar *arg_old_owner,
4192     const gchar *arg_new_owner)
4193 {
4194   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (object);
4195 
4196   GList      *connections, *l;
4197   GVariant   *signal_variant;
4198   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
4199 
4200   signal_variant = g_variant_ref_sink (g_variant_new ("(sss)",
4201                    arg_name,
4202                    arg_old_owner,
4203                    arg_new_owner));
4204   for (l = connections; l != NULL; l = l->next)
4205     {
4206       GDBusConnection *connection = l->data;
4207       g_dbus_connection_emit_signal (connection,
4208         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.DBus", "NameOwnerChanged",
4209         signal_variant, NULL);
4210     }
4211   g_variant_unref (signal_variant);
4212   g_list_free_full (connections, g_object_unref);
4213 }
4214 
4215 static void
__g_freedesktop_dbus_on_signal_name_lost(_GFreedesktopDBus * object,const gchar * arg_name)4216 __g_freedesktop_dbus_on_signal_name_lost (
4217     _GFreedesktopDBus *object,
4218     const gchar *arg_name)
4219 {
4220   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (object);
4221 
4222   GList      *connections, *l;
4223   GVariant   *signal_variant;
4224   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
4225 
4226   signal_variant = g_variant_ref_sink (g_variant_new ("(s)",
4227                    arg_name));
4228   for (l = connections; l != NULL; l = l->next)
4229     {
4230       GDBusConnection *connection = l->data;
4231       g_dbus_connection_emit_signal (connection,
4232         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.DBus", "NameLost",
4233         signal_variant, NULL);
4234     }
4235   g_variant_unref (signal_variant);
4236   g_list_free_full (connections, g_object_unref);
4237 }
4238 
4239 static void
__g_freedesktop_dbus_on_signal_name_acquired(_GFreedesktopDBus * object,const gchar * arg_name)4240 __g_freedesktop_dbus_on_signal_name_acquired (
4241     _GFreedesktopDBus *object,
4242     const gchar *arg_name)
4243 {
4244   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (object);
4245 
4246   GList      *connections, *l;
4247   GVariant   *signal_variant;
4248   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
4249 
4250   signal_variant = g_variant_ref_sink (g_variant_new ("(s)",
4251                    arg_name));
4252   for (l = connections; l != NULL; l = l->next)
4253     {
4254       GDBusConnection *connection = l->data;
4255       g_dbus_connection_emit_signal (connection,
4256         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.DBus", "NameAcquired",
4257         signal_variant, NULL);
4258     }
4259   g_variant_unref (signal_variant);
4260   g_list_free_full (connections, g_object_unref);
4261 }
4262 
4263 static void _g_freedesktop_dbus_skeleton_iface_init (_GFreedesktopDBusIface *iface);
4264 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
G_DEFINE_TYPE_WITH_CODE(_GFreedesktopDBusSkeleton,_g_freedesktop_dbus_skeleton,G_TYPE_DBUS_INTERFACE_SKELETON,G_ADD_PRIVATE (_GFreedesktopDBusSkeleton)G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS,_g_freedesktop_dbus_skeleton_iface_init))4265 G_DEFINE_TYPE_WITH_CODE (_GFreedesktopDBusSkeleton, _g_freedesktop_dbus_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
4266                          G_ADD_PRIVATE (_GFreedesktopDBusSkeleton)
4267                          G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS, _g_freedesktop_dbus_skeleton_iface_init))
4268 
4269 #else
4270 G_DEFINE_TYPE_WITH_CODE (_GFreedesktopDBusSkeleton, _g_freedesktop_dbus_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
4271                          G_IMPLEMENT_INTERFACE (_G_TYPE_FREEDESKTOP_DBUS, _g_freedesktop_dbus_skeleton_iface_init))
4272 
4273 #endif
4274 static void
4275 _g_freedesktop_dbus_skeleton_finalize (GObject *object)
4276 {
4277   _GFreedesktopDBusSkeleton *skeleton = _G_FREEDESKTOP_DBUS_SKELETON (object);
4278   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
4279   if (skeleton->priv->changed_properties_idle_source != NULL)
4280     g_source_destroy (skeleton->priv->changed_properties_idle_source);
4281   g_main_context_unref (skeleton->priv->context);
4282   g_mutex_clear (&skeleton->priv->lock);
4283   G_OBJECT_CLASS (_g_freedesktop_dbus_skeleton_parent_class)->finalize (object);
4284 }
4285 
4286 static void
_g_freedesktop_dbus_skeleton_init(_GFreedesktopDBusSkeleton * skeleton)4287 _g_freedesktop_dbus_skeleton_init (_GFreedesktopDBusSkeleton *skeleton)
4288 {
4289 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
4290   skeleton->priv = _g_freedesktop_dbus_skeleton_get_instance_private (skeleton);
4291 #else
4292   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, _G_TYPE_FREEDESKTOP_DBUS_SKELETON, _GFreedesktopDBusSkeletonPrivate);
4293 #endif
4294 
4295   g_mutex_init (&skeleton->priv->lock);
4296   skeleton->priv->context = g_main_context_ref_thread_default ();
4297 }
4298 
4299 static void
_g_freedesktop_dbus_skeleton_class_init(_GFreedesktopDBusSkeletonClass * klass)4300 _g_freedesktop_dbus_skeleton_class_init (_GFreedesktopDBusSkeletonClass *klass)
4301 {
4302   GObjectClass *gobject_class;
4303   GDBusInterfaceSkeletonClass *skeleton_class;
4304 
4305   gobject_class = G_OBJECT_CLASS (klass);
4306   gobject_class->finalize = _g_freedesktop_dbus_skeleton_finalize;
4307 
4308   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
4309   skeleton_class->get_info = _g_freedesktop_dbus_skeleton_dbus_interface_get_info;
4310   skeleton_class->get_properties = _g_freedesktop_dbus_skeleton_dbus_interface_get_properties;
4311   skeleton_class->flush = _g_freedesktop_dbus_skeleton_dbus_interface_flush;
4312   skeleton_class->get_vtable = _g_freedesktop_dbus_skeleton_dbus_interface_get_vtable;
4313 
4314 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
4315   g_type_class_add_private (klass, sizeof (_GFreedesktopDBusSkeletonPrivate));
4316 #endif
4317 }
4318 
4319 static void
_g_freedesktop_dbus_skeleton_iface_init(_GFreedesktopDBusIface * iface)4320 _g_freedesktop_dbus_skeleton_iface_init (_GFreedesktopDBusIface *iface)
4321 {
4322   iface->name_owner_changed = __g_freedesktop_dbus_on_signal_name_owner_changed;
4323   iface->name_lost = __g_freedesktop_dbus_on_signal_name_lost;
4324   iface->name_acquired = __g_freedesktop_dbus_on_signal_name_acquired;
4325 }
4326 
4327 /**
4328  * _g_freedesktop_dbus_skeleton_new:
4329  *
4330  * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DBus.top_of_page">org.freedesktop.DBus</link>.
4331  *
4332  * Returns: (transfer full) (type _GFreedesktopDBusSkeleton): The skeleton object.
4333  */
4334 _GFreedesktopDBus *
_g_freedesktop_dbus_skeleton_new(void)4335 _g_freedesktop_dbus_skeleton_new (void)
4336 {
4337   return _G_FREEDESKTOP_DBUS (g_object_new (_G_TYPE_FREEDESKTOP_DBUS_SKELETON, NULL));
4338 }
4339 
4340