nexmon – Blame information for rev 1

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