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