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