Advertisement
Guest User

Untitled

a guest
Apr 29th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 223.99 KB | None | 0 0
  1. diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
  2. index 3bf0cf0..a4dfe68 100644
  3. --- a/panels/datetime/Makefile.am
  4. +++ b/panels/datetime/Makefile.am
  5. @@ -139,23 +139,35 @@ check-local: test-timezone-gfx test-endianess test-timezone
  6.  ccpanelsdir = $(PANELS_DIR)
  7.  ccpanels_LTLIBRARIES = libdate_time.la
  8.  
  9. -# FIXME add a way to regenerate the dtm.[ch]
  10. -# gdbus-codegen --generate-c-code dtm  --interface-prefix org.cinnamon.SettingsDaemon  /path/to/cinnamon-settings-daemon/plugins/datetime/gsd-datetime-mechanism.xml
  11. -# See also:
  12. -# https://bugzilla.gnome.org/show_bug.cgi?id=650875
  13. -# https://bugzilla.gnome.org/show_bug.cgi?id=650874
  14. -
  15. +# This requires running d-bus session and accessible timedate1 daemon
  16. +# FIXME: need to find a way how to filter out unnecessary d-bus stuff (introspectable, properties)
  17. +#timedated1-interface.xml:
  18. +#  gdbus introspect                    \
  19. +#      --xml                       \
  20. +#      --system                    \
  21. +#      --dest org.freedesktop.timedate1        \
  22. +#      --object-path /org/freedesktop/timedate1    \
  23. +#       > timedated1-interface.xml
  24. +
  25. +dbus_built_sources = timedated.c timedated.h
  26. +timedated.c: timedated.h
  27. +timedated.h: Makefile.am timedated1-interface.xml
  28. +   gdbus-codegen                       \
  29. +       --interface-prefix org.freedesktop.     \
  30. +       --generate-c-code timedated         \
  31. +       $(srcdir)/timedated1-interface.xml
  32. +      
  33.  libdate_time_la_SOURCES =  \
  34.     datetime-module.c   \
  35.     cc-datetime-panel.c \
  36.     cc-datetime-panel.h \
  37.     cc-timezone-map.c   \
  38.     cc-timezone-map.h   \
  39. -   dtm.c           \
  40. -   dtm.h           \
  41.     date-endian.c       \
  42.     date-endian.h       \
  43. -   tz.c tz.h
  44. +   tz.c tz.h       \
  45. +   $(dbus_built_sources)   \
  46. +   $(NULL)
  47.  
  48.  libdate_time_la_LIBADD = $(PANEL_LIBS) $(DATETIME_PANEL_LIBS)
  49.  libdate_time_la_LDFLAGS = $(PANEL_LDFLAGS)
  50. @@ -166,7 +178,15 @@ desktopdir = $(datadir)/applications
  51.  desktop_in_files = cinnamon-datetime-panel.desktop.in
  52.  desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
  53.  
  54. -CLEANFILES = $(desktop_in_files) $(desktop_DATA)
  55. +CLEANFILES =                   \
  56. +   $(desktop_in_files)         \
  57. +   $(desktop_DATA)             \
  58. +   $(dbus_built_sources)      
  59. +
  60. +EXTRA_DIST =               \
  61. +   timedated1-interface.xml
  62. +
  63. +BUILT_SOURCES = $(dbus_built_sources)
  64.  
  65.  -include $(top_srcdir)/git.mk
  66.  
  67. diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
  68. index b5fb1d2..0a10c14 100644
  69. --- a/panels/datetime/cc-datetime-panel.c
  70. +++ b/panels/datetime/cc-datetime-panel.c
  71. @@ -24,7 +24,7 @@
  72.  
  73.  #include <sys/time.h>
  74.  #include "cc-timezone-map.h"
  75. -#include "dtm.h"
  76. +#include "timedated.h"
  77.  #include "date-endian.h"
  78.  #define GNOME_DESKTOP_USE_UNSTABLE_API
  79.  
  80. @@ -83,7 +83,7 @@ struct _CcDateTimePanelPrivate
  81.  
  82.    GnomeWallClock *clock_tracker;
  83.  
  84. -  DateTimeMechanism *dtm;
  85. +  Timedate1 *dtm;
  86.    GCancellable *cancellable;
  87.  
  88.    GPermission *permission;
  89. @@ -273,9 +273,9 @@ set_time_cb (GObject      *source,
  90.    GError *error;
  91.  
  92.    error = NULL;
  93. -  if (!date_time_mechanism_call_set_time_finish (self->priv->dtm,
  94. -                                                 res,
  95. -                                                 &error))
  96. +  if (!timedate1_call_set_time_finish (self->priv->dtm,
  97. +                                       res,
  98. +                                       &error))
  99.      {
  100.        /* TODO: display any error in a user friendly way */
  101.        g_warning ("Could not set system time: %s", error->message);
  102. @@ -296,9 +296,9 @@ set_timezone_cb (GObject      *source,
  103.    GError *error;
  104.  
  105.    error = NULL;
  106. -  if (!date_time_mechanism_call_set_timezone_finish (self->priv->dtm,
  107. -                                                     res,
  108. -                                                     &error))
  109. +  if (!timedate1_call_set_timezone_finish (self->priv->dtm,
  110. +                                           res,
  111. +                                           &error))
  112.      {
  113.        /* TODO: display any error in a user friendly way */
  114.        g_warning ("Could not set system timezone: %s", error->message);
  115. @@ -315,9 +315,9 @@ set_using_ntp_cb (GObject      *source,
  116.    GError *error;
  117.  
  118.    error = NULL;
  119. -  if (!date_time_mechanism_call_set_using_ntp_finish (self->priv->dtm,
  120. -                                                      res,
  121. -                                                      &error))
  122. +  if (!timedate1_call_set_ntp_finish (self->priv->dtm,
  123. +                                      res,
  124. +                                      &error))
  125.      {
  126.        /* TODO: display any error in a user friendly way */
  127.        g_warning ("Could not set system to use NTP: %s", error->message);
  128. @@ -330,14 +330,16 @@ queue_set_datetime (CcDateTimePanel *self)
  129.  {
  130.    gint64 unixtime;
  131.  
  132. -  /* for now just do it */
  133. +  /* timedated expects number of microseconds since 1 Jan 1970 UTC */
  134.    unixtime = g_date_time_to_unix (self->priv->date);
  135.  
  136. -  date_time_mechanism_call_set_time (self->priv->dtm,
  137. -                                     unixtime,
  138. -                                     self->priv->cancellable,
  139. -                                     set_time_cb,
  140. -                                     self);
  141. +  timedate1_call_set_time (self->priv->dtm,
  142. +                           unixtime * 1000000,
  143. +                           FALSE,
  144. +                           TRUE,
  145. +                           self->priv->cancellable,
  146. +                           set_time_cb,
  147. +                           self);
  148.  }
  149.  
  150.  static void
  151. @@ -348,11 +350,12 @@ queue_set_ntp (CcDateTimePanel *self)
  152.    /* for now just do it */
  153.    using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch")));
  154.  
  155. -  date_time_mechanism_call_set_using_ntp (self->priv->dtm,
  156. -                                          using_ntp,
  157. -                                          self->priv->cancellable,
  158. -                                          set_using_ntp_cb,
  159. -                                          self);
  160. +  timedate1_call_set_ntp (self->priv->dtm,
  161. +                          using_ntp,
  162. +                          TRUE,
  163. +                          self->priv->cancellable,
  164. +                          set_using_ntp_cb,
  165. +                          self);
  166.  }
  167.  
  168.  static void
  169. @@ -361,11 +364,12 @@ queue_set_timezone (CcDateTimePanel *self)
  170.    /* for now just do it */
  171.    if (self->priv->current_location)
  172.      {
  173. -      date_time_mechanism_call_set_timezone (self->priv->dtm,
  174. -                                             self->priv->current_location->zone,
  175. -                                             self->priv->cancellable,
  176. -                                             set_timezone_cb,
  177. -                                             self);
  178. +      timedate1_call_set_timezone (self->priv->dtm,
  179. +                                   self->priv->current_location->zone,
  180. +                                   TRUE,
  181. +                                   self->priv->cancellable,
  182. +                                   set_timezone_cb,
  183. +                                   self);
  184.      }
  185.  }
  186.  
  187. @@ -522,46 +526,23 @@ location_changed_cb (CcTimezoneMap   *map,
  188.  }
  189.  
  190.  static void
  191. -get_timezone_cb (GObject      *source,
  192. -                 GAsyncResult *res,
  193. -                 gpointer      user_data)
  194. +get_initial_timezone (CcDateTimePanel *self)
  195.  {
  196. -  CcDateTimePanel *self = user_data;
  197. -  GtkWidget *widget;
  198. -  gchar *timezone;
  199. -  GError *error;
  200. +  const gchar *timezone;
  201.  
  202. -  error = NULL;
  203. -  if (!date_time_mechanism_call_get_timezone_finish (self->priv->dtm, &timezone, res, &error))
  204. -    {
  205. -      g_warning ("Could not get current timezone: %s", error->message);
  206. -      g_error_free (error);
  207. -    }
  208. +  if (self->priv->dtm)
  209. +    timezone = timedate1_get_timezone (self->priv->dtm);
  210.    else
  211. +    timezone = NULL;
  212. +
  213. +  if (timezone == NULL ||
  214. +      !cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), timezone))
  215.      {
  216. -      if (!cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), timezone))
  217. -        {
  218. -          g_warning ("Timezone '%s' is unhandled, setting %s as default", timezone, DEFAULT_TZ);
  219. -          cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), DEFAULT_TZ);
  220. -        }
  221. -      self->priv->current_location = cc_timezone_map_get_location (CC_TIMEZONE_MAP (self->priv->map));
  222. -      update_timezone (self);
  223. +      g_warning ("Timezone '%s' is unhandled, setting %s as default", timezone ? timezone : "(null)", DEFAULT_TZ);
  224. +      cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), DEFAULT_TZ);
  225.      }
  226. -
  227. -  /* now that the initial state is loaded set connect the signals */
  228. -  widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
  229. -                                                "region_combobox");
  230. -  g_signal_connect (widget, "changed", G_CALLBACK (region_changed_cb), self);
  231. -
  232. -  widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
  233. -                                                "city_combobox");
  234. -  g_signal_connect (widget, "changed", G_CALLBACK (city_changed_cb), self);
  235. -
  236. -  g_signal_connect (self->priv->map, "location-changed",
  237. -                    G_CALLBACK (location_changed_cb), self);
  238. -
  239. -
  240. -  g_free (timezone);
  241. +  self->priv->current_location = cc_timezone_map_get_location (CC_TIMEZONE_MAP (self->priv->map));
  242. +  update_timezone (self);
  243.  }
  244.  
  245.  /* load region and city tree models */
  246. @@ -692,9 +673,13 @@ update_widget_state_for_ntp (CcDateTimePanel *panel,
  247.                               gboolean         using_ntp)
  248.  {
  249.    CcDateTimePanelPrivate *priv = panel->priv;
  250. +  gboolean allowed;
  251. +
  252. +  /* need to check polkit before revealing to user */
  253. +  allowed = (! priv->permission || g_permission_get_allowed (priv->permission));
  254.  
  255. -  gtk_widget_set_sensitive (W("table1"), !using_ntp);
  256. -  gtk_widget_set_sensitive (W("table2"), !using_ntp);
  257. +  gtk_widget_set_sensitive (W("table1"), !using_ntp && allowed);
  258. +  gtk_widget_set_sensitive (W("table2"), !using_ntp && allowed);
  259.  }
  260.  
  261.  static void
  262. @@ -807,7 +792,82 @@ on_permission_changed (GPermission *permission,
  263.    gtk_widget_set_sensitive (W("map-vbox"), allowed);
  264.    gtk_widget_set_sensitive (W("hbox2"), allowed);
  265.    gtk_widget_set_sensitive (W("alignment2"), allowed);
  266. -  gtk_widget_set_sensitive (W("table1"), allowed && !using_ntp);
  267. +  update_widget_state_for_ntp (data, using_ntp);
  268. +}
  269. +
  270. +static void
  271. +update_ntp_switch_from_system (CcDateTimePanel *self)
  272. +{
  273. +  CcDateTimePanelPrivate *priv = self->priv;
  274. +  gboolean using_ntp;
  275. +  GtkWidget *switch_widget;
  276. +
  277. +  using_ntp = timedate1_get_ntp (self->priv->dtm);
  278. +
  279. +  switch_widget = W("network_time_switch");
  280. +  g_signal_handlers_block_by_func (switch_widget, change_ntp, self);
  281. +  gtk_switch_set_active (GTK_SWITCH (switch_widget), using_ntp);
  282. +  update_widget_state_for_ntp (self, using_ntp);
  283. +  g_signal_handlers_unblock_by_func (switch_widget, change_ntp, self);
  284. +}
  285. +
  286. +static void
  287. +on_ntp_changed (CcDateTimePanel *self)
  288. +{
  289. +  update_ntp_switch_from_system (self);
  290. +}
  291. +
  292. +static void
  293. +on_timezone_changed (CcDateTimePanel *self)
  294. +{
  295. +  CcDateTimePanelPrivate *priv = self->priv;
  296. +  GtkWidget *region_combo, *city_combo;
  297. +
  298. +  region_combo = W("region_combobox");
  299. +  city_combo = W("city_combobox");
  300. +
  301. +  g_signal_handlers_block_by_func (region_combo, region_changed_cb, self);
  302. +  g_signal_handlers_block_by_func (city_combo, city_changed_cb, self);
  303. +  g_signal_handlers_block_by_func (self->priv->map, location_changed_cb, self);
  304. +
  305. +  get_initial_timezone (self);
  306. +
  307. +  g_signal_handlers_unblock_by_func (region_combo, region_changed_cb, self);
  308. +  g_signal_handlers_unblock_by_func (city_combo, city_changed_cb, self);
  309. +  g_signal_handlers_unblock_by_func (self->priv->map, location_changed_cb, self);
  310. +}
  311. +
  312. +static void
  313. +on_timedated_properties_changed (GDBusProxy       *proxy,
  314. +                                 GVariant         *changed_properties,
  315. +                                 const gchar     **invalidated_properties,
  316. +                                 CcDateTimePanel  *self)
  317. +{
  318. +  GError *error;
  319. +  GVariant *variant;
  320. +  GVariant *v;
  321. +  guint i;
  322. +
  323. +  if (invalidated_properties != NULL)
  324. +    for (i = 0; invalidated_properties[i] != NULL; i++) {
  325. +        error = NULL;
  326. +        /* See https://bugs.freedesktop.org/show_bug.cgi?id=37632 for the reason why we're doing this */
  327. +        variant = g_dbus_proxy_call_sync (proxy,
  328. +                                          "org.freedesktop.DBus.Properties.Get",
  329. +                                          g_variant_new ("(ss)", "org.freedesktop.timedate1", invalidated_properties[i]),
  330. +                                          G_DBUS_CALL_FLAGS_NONE,
  331. +                                          -1,
  332. +                                          NULL,
  333. +                                          &error);
  334. +        if (variant == NULL) {
  335. +                g_warning ("Failed to get property '%s': %s", invalidated_properties[i], error->message);
  336. +                g_error_free (error);
  337. +        } else {
  338. +                g_variant_get (variant, "(v)", &v);
  339. +                g_dbus_proxy_set_cached_property (proxy, invalidated_properties[i], v);
  340. +                g_variant_unref (variant);
  341. +        }
  342. +    }
  343.  }
  344.  
  345.  static void
  346. @@ -858,8 +918,6 @@ cc_date_time_panel_init (CcDateTimePanel *self)
  347.    GtkTreeModelFilter *city_modelfilter;
  348.    GtkTreeModelSort *city_modelsort;
  349.    guint i, num_days;
  350. -  gboolean using_ntp;
  351. -  gboolean can_use_ntp;
  352.    int ret;
  353.    DateEndianess endianess;
  354.    GError *error;
  355. @@ -868,12 +926,12 @@ cc_date_time_panel_init (CcDateTimePanel *self)
  356.  
  357.    priv->cancellable = g_cancellable_new ();
  358.    error = NULL;
  359. -  priv->dtm = date_time_mechanism_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
  360. -                                                          G_DBUS_PROXY_FLAGS_NONE,
  361. -                                                          "org.cinnamon.SettingsDaemon.DateTimeMechanism",
  362. -                                                          "/",
  363. -                                                          priv->cancellable,
  364. -                                                          &error);
  365. +  priv->dtm = timedate1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
  366. +                                                G_DBUS_PROXY_FLAGS_NONE,
  367. +                                                "org.freedesktop.timedate1",
  368. +                                                "/org/freedesktop/timedate1",
  369. +                                                priv->cancellable,
  370. +                                                &error);
  371.    if (priv->dtm == NULL) {
  372.          g_warning ("could not get proxy for DateTimeMechanism: %s", error->message);
  373.          g_error_free (error);
  374. @@ -893,20 +951,8 @@ cc_date_time_panel_init (CcDateTimePanel *self)
  375.      }
  376.  
  377.    /* set up network time button */
  378. -  error = NULL;
  379. -  using_ntp = can_use_ntp = FALSE;
  380. -  if (!date_time_mechanism_call_get_using_ntp_sync (priv->dtm,
  381. -                                                    &can_use_ntp,
  382. -                                                    &using_ntp,
  383. -                                                    priv->cancellable,
  384. -                                                    &error))
  385. -    {
  386. -      g_warning ("Failed to get using ntp: %s", error->message);
  387. -      g_error_free (error);
  388. -    }
  389. -
  390. -  gtk_switch_set_active (GTK_SWITCH (W("network_time_switch")), using_ntp);
  391. -  update_widget_state_for_ntp (self, using_ntp);
  392. +  if (priv->dtm != NULL)
  393. +    update_ntp_switch_from_system (self);
  394.    g_signal_connect (W("network_time_switch"), "notify::active",
  395.                      G_CALLBACK (change_ntp), self);
  396.  
  397. @@ -994,10 +1040,30 @@ cc_date_time_panel_init (CcDateTimePanel *self)
  398.  
  399.    /* After the initial setup, so we can be sure that
  400.     * the model is filled up */
  401. -  date_time_mechanism_call_get_timezone (priv->dtm,
  402. -                                         priv->cancellable,
  403. -                                         get_timezone_cb,
  404. -                                         self);
  405. +  get_initial_timezone (self);
  406. +
  407. +  widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
  408. +                                                "region_combobox");
  409. +  g_signal_connect (widget, "changed", G_CALLBACK (region_changed_cb), self);
  410. +
  411. +  widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
  412. +                                                "city_combobox");
  413. +  g_signal_connect (widget, "changed", G_CALLBACK (city_changed_cb), self);
  414. +
  415. +  g_signal_connect (self->priv->map, "location-changed",
  416. +                    G_CALLBACK (location_changed_cb), self);
  417. +
  418. +  /* Watch changes of timedated remote service properties */
  419. +  if (priv->dtm)
  420. +    {
  421. +      g_signal_connect (priv->dtm, "g-properties-changed",
  422. +                        G_CALLBACK (on_timedated_properties_changed), self);
  423. +      g_signal_connect_swapped (priv->dtm, "notify::ntp",
  424. +                                G_CALLBACK (on_ntp_changed), self);
  425. +      g_signal_connect_swapped (priv->dtm, "notify::timezone",
  426. +                                G_CALLBACK (on_timezone_changed), self);
  427. +    }
  428. +  /* We ignore UTC <--> LocalRTC changes at the moment */
  429.  
  430.    /* add the lock button */
  431.    priv->permission = polkit_permission_new_sync ("org.cinnamon.settingsdaemon.datetimemechanism.configure", NULL, NULL, NULL);
  432. diff --git a/panels/datetime/dtm.c b/panels/datetime/dtm.c
  433. deleted file mode 100644
  434. index a00bd8a..0000000
  435. --- a/panels/datetime/dtm.c
  436. +++ /dev/null
  437. @@ -1,3066 +0,0 @@
  438. -/*
  439. - * Generated by gdbus-codegen 2.29.5. DO NOT EDIT.
  440. - *
  441. - * The license of this code is the same as for the source it was derived from.
  442. - */
  443. -
  444. -#ifdef HAVE_CONFIG_H
  445. -#  include "config.h"
  446. -#endif
  447. -
  448. -#include "dtm.h"
  449. -
  450. -typedef struct
  451. -{
  452. -  GDBusArgInfo parent_struct;
  453. -  gboolean use_gvariant;
  454. -} _ExtendedGDBusArgInfo;
  455. -
  456. -typedef struct
  457. -{
  458. -  GDBusMethodInfo parent_struct;
  459. -  const gchar *signal_name;
  460. -} _ExtendedGDBusMethodInfo;
  461. -
  462. -typedef struct
  463. -{
  464. -  GDBusSignalInfo parent_struct;
  465. -  const gchar *signal_name;
  466. -} _ExtendedGDBusSignalInfo;
  467. -
  468. -typedef struct
  469. -{
  470. -  GDBusPropertyInfo parent_struct;
  471. -  const gchar *hyphen_name;
  472. -  gboolean use_gvariant;
  473. -} _ExtendedGDBusPropertyInfo;
  474. -
  475. -typedef struct
  476. -{
  477. -  GDBusInterfaceInfo parent_struct;
  478. -  const gchar *hyphen_name;
  479. -} _ExtendedGDBusInterfaceInfo;
  480. -
  481. -typedef struct
  482. -{
  483. -  const _ExtendedGDBusPropertyInfo *info;
  484. -  guint prop_id;
  485. -  GValue orig_value; /* the value before the change */
  486. -} ChangedProperty;
  487. -
  488. -static void
  489. -_changed_property_free (ChangedProperty *data)
  490. -{
  491. -  g_value_unset (&data->orig_value);
  492. -  g_free (data);
  493. -}
  494. -
  495. -static gboolean
  496. -_g_strv_equal0 (gchar **a, gchar **b)
  497. -{
  498. -  gboolean ret = FALSE;
  499. -  guint n;
  500. -  if (a == NULL && b == NULL)
  501. -    {
  502. -      ret = TRUE;
  503. -      goto out;
  504. -    }
  505. -  if (a == NULL || b == NULL)
  506. -    goto out;
  507. -  if (g_strv_length (a) != g_strv_length (b))
  508. -    goto out;
  509. -  for (n = 0; a[n] != NULL; n++)
  510. -    if (g_strcmp0 (a[n], b[n]) != 0)
  511. -      goto out;
  512. -  ret = TRUE;
  513. -out:
  514. -  return ret;
  515. -}
  516. -
  517. -static gboolean
  518. -_g_variant_equal0 (GVariant *a, GVariant *b)
  519. -{
  520. -  gboolean ret = FALSE;
  521. -  if (a == NULL && b == NULL)
  522. -    {
  523. -      ret = TRUE;
  524. -      goto out;
  525. -    }
  526. -  if (a == NULL || b == NULL)
  527. -    goto out;
  528. -  ret = g_variant_equal (a, b);
  529. -out:
  530. -  return ret;
  531. -}
  532. -
  533. -G_GNUC_UNUSED static gboolean
  534. -_g_value_equal (const GValue *a, const GValue *b)
  535. -{
  536. -  gboolean ret = FALSE;
  537. -  g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
  538. -  switch (G_VALUE_TYPE (a))
  539. -    {
  540. -      case G_TYPE_BOOLEAN:
  541. -        ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
  542. -        break;
  543. -      case G_TYPE_UCHAR:
  544. -        ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
  545. -        break;
  546. -      case G_TYPE_INT:
  547. -        ret = (g_value_get_int (a) == g_value_get_int (b));
  548. -        break;
  549. -      case G_TYPE_UINT:
  550. -        ret = (g_value_get_uint (a) == g_value_get_uint (b));
  551. -        break;
  552. -      case G_TYPE_INT64:
  553. -        ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
  554. -        break;
  555. -      case G_TYPE_UINT64:
  556. -        ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
  557. -        break;
  558. -      case G_TYPE_DOUBLE:
  559. -        ret = (g_value_get_double (a) == g_value_get_double (b));
  560. -        break;
  561. -      case G_TYPE_STRING:
  562. -        ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
  563. -        break;
  564. -      case G_TYPE_VARIANT:
  565. -        ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
  566. -        break;
  567. -      default:
  568. -        if (G_VALUE_TYPE (a) == G_TYPE_STRV)
  569. -          ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
  570. -        else
  571. -          g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
  572. -        break;
  573. -    }
  574. -  return ret;
  575. -}
  576. -
  577. -/* ------------------------------------------------------------------------
  578. - * Code for interface org.cinnamon.SettingsDaemon.DateTimeMechanism
  579. - * ------------------------------------------------------------------------
  580. - */
  581. -
  582. -/**
  583. - * SECTION:DateTimeMechanism
  584. - * @title: DateTimeMechanism
  585. - * @short_description: Generated C code for the org.cinnamon.SettingsDaemon.DateTimeMechanism D-Bus interface
  586. - *
  587. - * This section contains code for working with the <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link> D-Bus interface in C.
  588. - */
  589. -
  590. -/* ---- Introspection data for org.cinnamon.SettingsDaemon.DateTimeMechanism ---- */
  591. -
  592. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_timezone_IN_ARG_tz =
  593. -{
  594. -  {
  595. -    -1,
  596. -    "tz",
  597. -    "s",
  598. -    NULL
  599. -  },
  600. -  FALSE
  601. -};
  602. -
  603. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_set_timezone_IN_ARG_pointers[] =
  604. -{
  605. -  &_date_time_mechanism_method_info_set_timezone_IN_ARG_tz,
  606. -  NULL
  607. -};
  608. -
  609. -static const GDBusAnnotationInfo _date_time_mechanism_method_set_timezone_annotation_info_0 =
  610. -{
  611. -  -1,
  612. -  "org.freedesktop.DBus.GLib.Async",
  613. -  "",
  614. -  NULL
  615. -};
  616. -
  617. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_set_timezone_annotation_info_pointers[] =
  618. -{
  619. -  &_date_time_mechanism_method_set_timezone_annotation_info_0,
  620. -  NULL
  621. -};
  622. -
  623. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_set_timezone =
  624. -{
  625. -  {
  626. -    -1,
  627. -    "SetTimezone",
  628. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_set_timezone_IN_ARG_pointers,
  629. -    NULL,
  630. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_set_timezone_annotation_info_pointers
  631. -  },
  632. -  "handle-set-timezone"
  633. -};
  634. -
  635. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_get_timezone_OUT_ARG_timezone =
  636. -{
  637. -  {
  638. -    -1,
  639. -    "timezone",
  640. -    "s",
  641. -    NULL
  642. -  },
  643. -  FALSE
  644. -};
  645. -
  646. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_get_timezone_OUT_ARG_pointers[] =
  647. -{
  648. -  &_date_time_mechanism_method_info_get_timezone_OUT_ARG_timezone,
  649. -  NULL
  650. -};
  651. -
  652. -static const GDBusAnnotationInfo _date_time_mechanism_method_get_timezone_annotation_info_0 =
  653. -{
  654. -  -1,
  655. -  "org.freedesktop.DBus.GLib.Async",
  656. -  "",
  657. -  NULL
  658. -};
  659. -
  660. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_get_timezone_annotation_info_pointers[] =
  661. -{
  662. -  &_date_time_mechanism_method_get_timezone_annotation_info_0,
  663. -  NULL
  664. -};
  665. -
  666. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_get_timezone =
  667. -{
  668. -  {
  669. -    -1,
  670. -    "GetTimezone",
  671. -    NULL,
  672. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_get_timezone_OUT_ARG_pointers,
  673. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_get_timezone_annotation_info_pointers
  674. -  },
  675. -  "handle-get-timezone"
  676. -};
  677. -
  678. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_can_set_timezone_OUT_ARG_value =
  679. -{
  680. -  {
  681. -    -1,
  682. -    "value",
  683. -    "i",
  684. -    NULL
  685. -  },
  686. -  FALSE
  687. -};
  688. -
  689. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_can_set_timezone_OUT_ARG_pointers[] =
  690. -{
  691. -  &_date_time_mechanism_method_info_can_set_timezone_OUT_ARG_value,
  692. -  NULL
  693. -};
  694. -
  695. -static const GDBusAnnotationInfo _date_time_mechanism_method_can_set_timezone_annotation_info_0 =
  696. -{
  697. -  -1,
  698. -  "org.freedesktop.DBus.GLib.Async",
  699. -  "",
  700. -  NULL
  701. -};
  702. -
  703. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_can_set_timezone_annotation_info_pointers[] =
  704. -{
  705. -  &_date_time_mechanism_method_can_set_timezone_annotation_info_0,
  706. -  NULL
  707. -};
  708. -
  709. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_can_set_timezone =
  710. -{
  711. -  {
  712. -    -1,
  713. -    "CanSetTimezone",
  714. -    NULL,
  715. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_can_set_timezone_OUT_ARG_pointers,
  716. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_can_set_timezone_annotation_info_pointers
  717. -  },
  718. -  "handle-can-set-timezone"
  719. -};
  720. -
  721. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_date_IN_ARG_day =
  722. -{
  723. -  {
  724. -    -1,
  725. -    "day",
  726. -    "u",
  727. -    NULL
  728. -  },
  729. -  FALSE
  730. -};
  731. -
  732. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_date_IN_ARG_month =
  733. -{
  734. -  {
  735. -    -1,
  736. -    "month",
  737. -    "u",
  738. -    NULL
  739. -  },
  740. -  FALSE
  741. -};
  742. -
  743. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_date_IN_ARG_year =
  744. -{
  745. -  {
  746. -    -1,
  747. -    "year",
  748. -    "u",
  749. -    NULL
  750. -  },
  751. -  FALSE
  752. -};
  753. -
  754. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_set_date_IN_ARG_pointers[] =
  755. -{
  756. -  &_date_time_mechanism_method_info_set_date_IN_ARG_day,
  757. -  &_date_time_mechanism_method_info_set_date_IN_ARG_month,
  758. -  &_date_time_mechanism_method_info_set_date_IN_ARG_year,
  759. -  NULL
  760. -};
  761. -
  762. -static const GDBusAnnotationInfo _date_time_mechanism_method_set_date_annotation_info_0 =
  763. -{
  764. -  -1,
  765. -  "org.freedesktop.DBus.GLib.Async",
  766. -  "",
  767. -  NULL
  768. -};
  769. -
  770. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_set_date_annotation_info_pointers[] =
  771. -{
  772. -  &_date_time_mechanism_method_set_date_annotation_info_0,
  773. -  NULL
  774. -};
  775. -
  776. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_set_date =
  777. -{
  778. -  {
  779. -    -1,
  780. -    "SetDate",
  781. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_set_date_IN_ARG_pointers,
  782. -    NULL,
  783. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_set_date_annotation_info_pointers
  784. -  },
  785. -  "handle-set-date"
  786. -};
  787. -
  788. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_time_IN_ARG_seconds_since_epoch =
  789. -{
  790. -  {
  791. -    -1,
  792. -    "seconds_since_epoch",
  793. -    "x",
  794. -    NULL
  795. -  },
  796. -  FALSE
  797. -};
  798. -
  799. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_set_time_IN_ARG_pointers[] =
  800. -{
  801. -  &_date_time_mechanism_method_info_set_time_IN_ARG_seconds_since_epoch,
  802. -  NULL
  803. -};
  804. -
  805. -static const GDBusAnnotationInfo _date_time_mechanism_method_set_time_annotation_info_0 =
  806. -{
  807. -  -1,
  808. -  "org.freedesktop.DBus.GLib.Async",
  809. -  "",
  810. -  NULL
  811. -};
  812. -
  813. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_set_time_annotation_info_pointers[] =
  814. -{
  815. -  &_date_time_mechanism_method_set_time_annotation_info_0,
  816. -  NULL
  817. -};
  818. -
  819. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_set_time =
  820. -{
  821. -  {
  822. -    -1,
  823. -    "SetTime",
  824. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_set_time_IN_ARG_pointers,
  825. -    NULL,
  826. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_set_time_annotation_info_pointers
  827. -  },
  828. -  "handle-set-time"
  829. -};
  830. -
  831. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_can_set_time_OUT_ARG_value =
  832. -{
  833. -  {
  834. -    -1,
  835. -    "value",
  836. -    "i",
  837. -    NULL
  838. -  },
  839. -  FALSE
  840. -};
  841. -
  842. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_can_set_time_OUT_ARG_pointers[] =
  843. -{
  844. -  &_date_time_mechanism_method_info_can_set_time_OUT_ARG_value,
  845. -  NULL
  846. -};
  847. -
  848. -static const GDBusAnnotationInfo _date_time_mechanism_method_can_set_time_annotation_info_0 =
  849. -{
  850. -  -1,
  851. -  "org.freedesktop.DBus.GLib.Async",
  852. -  "",
  853. -  NULL
  854. -};
  855. -
  856. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_can_set_time_annotation_info_pointers[] =
  857. -{
  858. -  &_date_time_mechanism_method_can_set_time_annotation_info_0,
  859. -  NULL
  860. -};
  861. -
  862. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_can_set_time =
  863. -{
  864. -  {
  865. -    -1,
  866. -    "CanSetTime",
  867. -    NULL,
  868. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_can_set_time_OUT_ARG_pointers,
  869. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_can_set_time_annotation_info_pointers
  870. -  },
  871. -  "handle-can-set-time"
  872. -};
  873. -
  874. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_adjust_time_IN_ARG_seconds_to_add =
  875. -{
  876. -  {
  877. -    -1,
  878. -    "seconds_to_add",
  879. -    "x",
  880. -    NULL
  881. -  },
  882. -  FALSE
  883. -};
  884. -
  885. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_adjust_time_IN_ARG_pointers[] =
  886. -{
  887. -  &_date_time_mechanism_method_info_adjust_time_IN_ARG_seconds_to_add,
  888. -  NULL
  889. -};
  890. -
  891. -static const GDBusAnnotationInfo _date_time_mechanism_method_adjust_time_annotation_info_0 =
  892. -{
  893. -  -1,
  894. -  "org.freedesktop.DBus.GLib.Async",
  895. -  "",
  896. -  NULL
  897. -};
  898. -
  899. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_adjust_time_annotation_info_pointers[] =
  900. -{
  901. -  &_date_time_mechanism_method_adjust_time_annotation_info_0,
  902. -  NULL
  903. -};
  904. -
  905. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_adjust_time =
  906. -{
  907. -  {
  908. -    -1,
  909. -    "AdjustTime",
  910. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_adjust_time_IN_ARG_pointers,
  911. -    NULL,
  912. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_adjust_time_annotation_info_pointers
  913. -  },
  914. -  "handle-adjust-time"
  915. -};
  916. -
  917. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_get_hardware_clock_using_utc_OUT_ARG_is_using_utc =
  918. -{
  919. -  {
  920. -    -1,
  921. -    "is_using_utc",
  922. -    "b",
  923. -    NULL
  924. -  },
  925. -  FALSE
  926. -};
  927. -
  928. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_get_hardware_clock_using_utc_OUT_ARG_pointers[] =
  929. -{
  930. -  &_date_time_mechanism_method_info_get_hardware_clock_using_utc_OUT_ARG_is_using_utc,
  931. -  NULL
  932. -};
  933. -
  934. -static const GDBusAnnotationInfo _date_time_mechanism_method_get_hardware_clock_using_utc_annotation_info_0 =
  935. -{
  936. -  -1,
  937. -  "org.freedesktop.DBus.GLib.Async",
  938. -  "",
  939. -  NULL
  940. -};
  941. -
  942. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_get_hardware_clock_using_utc_annotation_info_pointers[] =
  943. -{
  944. -  &_date_time_mechanism_method_get_hardware_clock_using_utc_annotation_info_0,
  945. -  NULL
  946. -};
  947. -
  948. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_get_hardware_clock_using_utc =
  949. -{
  950. -  {
  951. -    -1,
  952. -    "GetHardwareClockUsingUtc",
  953. -    NULL,
  954. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_get_hardware_clock_using_utc_OUT_ARG_pointers,
  955. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_get_hardware_clock_using_utc_annotation_info_pointers
  956. -  },
  957. -  "handle-get-hardware-clock-using-utc"
  958. -};
  959. -
  960. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_hardware_clock_using_utc_IN_ARG_is_using_utc =
  961. -{
  962. -  {
  963. -    -1,
  964. -    "is_using_utc",
  965. -    "b",
  966. -    NULL
  967. -  },
  968. -  FALSE
  969. -};
  970. -
  971. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_set_hardware_clock_using_utc_IN_ARG_pointers[] =
  972. -{
  973. -  &_date_time_mechanism_method_info_set_hardware_clock_using_utc_IN_ARG_is_using_utc,
  974. -  NULL
  975. -};
  976. -
  977. -static const GDBusAnnotationInfo _date_time_mechanism_method_set_hardware_clock_using_utc_annotation_info_0 =
  978. -{
  979. -  -1,
  980. -  "org.freedesktop.DBus.GLib.Async",
  981. -  "",
  982. -  NULL
  983. -};
  984. -
  985. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_set_hardware_clock_using_utc_annotation_info_pointers[] =
  986. -{
  987. -  &_date_time_mechanism_method_set_hardware_clock_using_utc_annotation_info_0,
  988. -  NULL
  989. -};
  990. -
  991. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_set_hardware_clock_using_utc =
  992. -{
  993. -  {
  994. -    -1,
  995. -    "SetHardwareClockUsingUtc",
  996. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_set_hardware_clock_using_utc_IN_ARG_pointers,
  997. -    NULL,
  998. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_set_hardware_clock_using_utc_annotation_info_pointers
  999. -  },
  1000. -  "handle-set-hardware-clock-using-utc"
  1001. -};
  1002. -
  1003. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_get_using_ntp_OUT_ARG_can_use_ntp =
  1004. -{
  1005. -  {
  1006. -    -1,
  1007. -    "can_use_ntp",
  1008. -    "b",
  1009. -    NULL
  1010. -  },
  1011. -  FALSE
  1012. -};
  1013. -
  1014. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_get_using_ntp_OUT_ARG_is_using_ntp =
  1015. -{
  1016. -  {
  1017. -    -1,
  1018. -    "is_using_ntp",
  1019. -    "b",
  1020. -    NULL
  1021. -  },
  1022. -  FALSE
  1023. -};
  1024. -
  1025. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_get_using_ntp_OUT_ARG_pointers[] =
  1026. -{
  1027. -  &_date_time_mechanism_method_info_get_using_ntp_OUT_ARG_can_use_ntp,
  1028. -  &_date_time_mechanism_method_info_get_using_ntp_OUT_ARG_is_using_ntp,
  1029. -  NULL
  1030. -};
  1031. -
  1032. -static const GDBusAnnotationInfo _date_time_mechanism_method_get_using_ntp_annotation_info_0 =
  1033. -{
  1034. -  -1,
  1035. -  "org.freedesktop.DBus.GLib.Async",
  1036. -  "",
  1037. -  NULL
  1038. -};
  1039. -
  1040. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_get_using_ntp_annotation_info_pointers[] =
  1041. -{
  1042. -  &_date_time_mechanism_method_get_using_ntp_annotation_info_0,
  1043. -  NULL
  1044. -};
  1045. -
  1046. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_get_using_ntp =
  1047. -{
  1048. -  {
  1049. -    -1,
  1050. -    "GetUsingNtp",
  1051. -    NULL,
  1052. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_get_using_ntp_OUT_ARG_pointers,
  1053. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_get_using_ntp_annotation_info_pointers
  1054. -  },
  1055. -  "handle-get-using-ntp"
  1056. -};
  1057. -
  1058. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_set_using_ntp_IN_ARG_is_using_ntp =
  1059. -{
  1060. -  {
  1061. -    -1,
  1062. -    "is_using_ntp",
  1063. -    "b",
  1064. -    NULL
  1065. -  },
  1066. -  FALSE
  1067. -};
  1068. -
  1069. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_set_using_ntp_IN_ARG_pointers[] =
  1070. -{
  1071. -  &_date_time_mechanism_method_info_set_using_ntp_IN_ARG_is_using_ntp,
  1072. -  NULL
  1073. -};
  1074. -
  1075. -static const GDBusAnnotationInfo _date_time_mechanism_method_set_using_ntp_annotation_info_0 =
  1076. -{
  1077. -  -1,
  1078. -  "org.freedesktop.DBus.GLib.Async",
  1079. -  "",
  1080. -  NULL
  1081. -};
  1082. -
  1083. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_set_using_ntp_annotation_info_pointers[] =
  1084. -{
  1085. -  &_date_time_mechanism_method_set_using_ntp_annotation_info_0,
  1086. -  NULL
  1087. -};
  1088. -
  1089. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_set_using_ntp =
  1090. -{
  1091. -  {
  1092. -    -1,
  1093. -    "SetUsingNtp",
  1094. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_set_using_ntp_IN_ARG_pointers,
  1095. -    NULL,
  1096. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_set_using_ntp_annotation_info_pointers
  1097. -  },
  1098. -  "handle-set-using-ntp"
  1099. -};
  1100. -
  1101. -static const _ExtendedGDBusArgInfo _date_time_mechanism_method_info_can_set_using_ntp_OUT_ARG_value =
  1102. -{
  1103. -  {
  1104. -    -1,
  1105. -    "value",
  1106. -    "i",
  1107. -    NULL
  1108. -  },
  1109. -  FALSE
  1110. -};
  1111. -
  1112. -static const _ExtendedGDBusArgInfo * const _date_time_mechanism_method_info_can_set_using_ntp_OUT_ARG_pointers[] =
  1113. -{
  1114. -  &_date_time_mechanism_method_info_can_set_using_ntp_OUT_ARG_value,
  1115. -  NULL
  1116. -};
  1117. -
  1118. -static const GDBusAnnotationInfo _date_time_mechanism_method_can_set_using_ntp_annotation_info_0 =
  1119. -{
  1120. -  -1,
  1121. -  "org.freedesktop.DBus.GLib.Async",
  1122. -  "",
  1123. -  NULL
  1124. -};
  1125. -
  1126. -static const GDBusAnnotationInfo * const _date_time_mechanism_method_can_set_using_ntp_annotation_info_pointers[] =
  1127. -{
  1128. -  &_date_time_mechanism_method_can_set_using_ntp_annotation_info_0,
  1129. -  NULL
  1130. -};
  1131. -
  1132. -static const _ExtendedGDBusMethodInfo _date_time_mechanism_method_info_can_set_using_ntp =
  1133. -{
  1134. -  {
  1135. -    -1,
  1136. -    "CanSetUsingNtp",
  1137. -    NULL,
  1138. -    (GDBusArgInfo **) &_date_time_mechanism_method_info_can_set_using_ntp_OUT_ARG_pointers,
  1139. -    (GDBusAnnotationInfo **) &_date_time_mechanism_method_can_set_using_ntp_annotation_info_pointers
  1140. -  },
  1141. -  "handle-can-set-using-ntp"
  1142. -};
  1143. -
  1144. -static const _ExtendedGDBusMethodInfo * const _date_time_mechanism_method_info_pointers[] =
  1145. -{
  1146. -  &_date_time_mechanism_method_info_set_timezone,
  1147. -  &_date_time_mechanism_method_info_get_timezone,
  1148. -  &_date_time_mechanism_method_info_can_set_timezone,
  1149. -  &_date_time_mechanism_method_info_set_date,
  1150. -  &_date_time_mechanism_method_info_set_time,
  1151. -  &_date_time_mechanism_method_info_can_set_time,
  1152. -  &_date_time_mechanism_method_info_adjust_time,
  1153. -  &_date_time_mechanism_method_info_get_hardware_clock_using_utc,
  1154. -  &_date_time_mechanism_method_info_set_hardware_clock_using_utc,
  1155. -  &_date_time_mechanism_method_info_get_using_ntp,
  1156. -  &_date_time_mechanism_method_info_set_using_ntp,
  1157. -  &_date_time_mechanism_method_info_can_set_using_ntp,
  1158. -  NULL
  1159. -};
  1160. -
  1161. -static const _ExtendedGDBusInterfaceInfo _date_time_mechanism_interface_info =
  1162. -{
  1163. -  {
  1164. -    -1,
  1165. -    "org.cinnamon.SettingsDaemon.DateTimeMechanism",
  1166. -    (GDBusMethodInfo **) &_date_time_mechanism_method_info_pointers,
  1167. -    NULL,
  1168. -    NULL,
  1169. -    NULL
  1170. -  },
  1171. -  "date-time-mechanism",
  1172. -};
  1173. -
  1174. -
  1175. -/**
  1176. - * date_time_mechanism_interface_info:
  1177. - *
  1178. - * Gets a machine-readable description of the <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link> D-Bus interface.
  1179. - *
  1180. - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
  1181. - */
  1182. -GDBusInterfaceInfo *
  1183. -date_time_mechanism_interface_info (void)
  1184. -{
  1185. -  return (GDBusInterfaceInfo *) &_date_time_mechanism_interface_info;
  1186. -}
  1187. -
  1188. -
  1189. -
  1190. -/**
  1191. - * DateTimeMechanism:
  1192. - *
  1193. - * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link>.
  1194. - */
  1195. -
  1196. -/**
  1197. - * DateTimeMechanismIface:
  1198. - * @parent_iface: The parent interface.
  1199. - * @handle_adjust_time: Handler for the #DateTimeMechanism::handle-adjust-time signal.
  1200. - * @handle_can_set_time: Handler for the #DateTimeMechanism::handle-can-set-time signal.
  1201. - * @handle_can_set_timezone: Handler for the #DateTimeMechanism::handle-can-set-timezone signal.
  1202. - * @handle_can_set_using_ntp: Handler for the #DateTimeMechanism::handle-can-set-using-ntp signal.
  1203. - * @handle_get_hardware_clock_using_utc: Handler for the #DateTimeMechanism::handle-get-hardware-clock-using-utc signal.
  1204. - * @handle_get_timezone: Handler for the #DateTimeMechanism::handle-get-timezone signal.
  1205. - * @handle_get_using_ntp: Handler for the #DateTimeMechanism::handle-get-using-ntp signal.
  1206. - * @handle_set_date: Handler for the #DateTimeMechanism::handle-set-date signal.
  1207. - * @handle_set_hardware_clock_using_utc: Handler for the #DateTimeMechanism::handle-set-hardware-clock-using-utc signal.
  1208. - * @handle_set_time: Handler for the #DateTimeMechanism::handle-set-time signal.
  1209. - * @handle_set_timezone: Handler for the #DateTimeMechanism::handle-set-timezone signal.
  1210. - * @handle_set_using_ntp: Handler for the #DateTimeMechanism::handle-set-using-ntp signal.
  1211. - *
  1212. - * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link>.
  1213. - */
  1214. -
  1215. -static void
  1216. -date_time_mechanism_default_init (DateTimeMechanismIface *iface)
  1217. -{
  1218. -  /* GObject signals for incoming D-Bus method calls: */
  1219. -  /**
  1220. -   * DateTimeMechanism::handle-set-timezone:
  1221. -   * @object: A #DateTimeMechanism.
  1222. -   * @invocation: A #GDBusMethodInvocation.
  1223. -   * @tz: Argument passed by remote caller.
  1224. -   *
  1225. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTimezone">SetTimezone()</link> D-Bus method.
  1226. -   *
  1227. -   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call date_time_mechanism_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.
  1228. -   *
  1229. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1230. -   */
  1231. -  g_signal_new ("handle-set-timezone",
  1232. -    G_TYPE_FROM_INTERFACE (iface),
  1233. -    G_SIGNAL_RUN_LAST,
  1234. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_set_timezone),
  1235. -    g_signal_accumulator_true_handled,
  1236. -    NULL,
  1237. -    g_cclosure_marshal_generic,
  1238. -    G_TYPE_BOOLEAN,
  1239. -    2,
  1240. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
  1241. -
  1242. -  /**
  1243. -   * DateTimeMechanism::handle-get-timezone:
  1244. -   * @object: A #DateTimeMechanism.
  1245. -   * @invocation: A #GDBusMethodInvocation.
  1246. -   *
  1247. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetTimezone">GetTimezone()</link> D-Bus method.
  1248. -   *
  1249. -   * 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 date_time_mechanism_complete_get_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.
  1250. -   *
  1251. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1252. -   */
  1253. -  g_signal_new ("handle-get-timezone",
  1254. -    G_TYPE_FROM_INTERFACE (iface),
  1255. -    G_SIGNAL_RUN_LAST,
  1256. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_get_timezone),
  1257. -    g_signal_accumulator_true_handled,
  1258. -    NULL,
  1259. -    g_cclosure_marshal_generic,
  1260. -    G_TYPE_BOOLEAN,
  1261. -    1,
  1262. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1263. -
  1264. -  /**
  1265. -   * DateTimeMechanism::handle-can-set-timezone:
  1266. -   * @object: A #DateTimeMechanism.
  1267. -   * @invocation: A #GDBusMethodInvocation.
  1268. -   *
  1269. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTimezone">CanSetTimezone()</link> D-Bus method.
  1270. -   *
  1271. -   * 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 date_time_mechanism_complete_can_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.
  1272. -   *
  1273. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1274. -   */
  1275. -  g_signal_new ("handle-can-set-timezone",
  1276. -    G_TYPE_FROM_INTERFACE (iface),
  1277. -    G_SIGNAL_RUN_LAST,
  1278. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_can_set_timezone),
  1279. -    g_signal_accumulator_true_handled,
  1280. -    NULL,
  1281. -    g_cclosure_marshal_generic,
  1282. -    G_TYPE_BOOLEAN,
  1283. -    1,
  1284. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1285. -
  1286. -  /**
  1287. -   * DateTimeMechanism::handle-set-date:
  1288. -   * @object: A #DateTimeMechanism.
  1289. -   * @invocation: A #GDBusMethodInvocation.
  1290. -   * @day: Argument passed by remote caller.
  1291. -   * @month: Argument passed by remote caller.
  1292. -   * @year: Argument passed by remote caller.
  1293. -   *
  1294. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetDate">SetDate()</link> D-Bus method.
  1295. -   *
  1296. -   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call date_time_mechanism_complete_set_date() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
  1297. -   *
  1298. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1299. -   */
  1300. -  g_signal_new ("handle-set-date",
  1301. -    G_TYPE_FROM_INTERFACE (iface),
  1302. -    G_SIGNAL_RUN_LAST,
  1303. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_set_date),
  1304. -    g_signal_accumulator_true_handled,
  1305. -    NULL,
  1306. -    g_cclosure_marshal_generic,
  1307. -    G_TYPE_BOOLEAN,
  1308. -    4,
  1309. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
  1310. -
  1311. -  /**
  1312. -   * DateTimeMechanism::handle-set-time:
  1313. -   * @object: A #DateTimeMechanism.
  1314. -   * @invocation: A #GDBusMethodInvocation.
  1315. -   * @seconds_since_epoch: Argument passed by remote caller.
  1316. -   *
  1317. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTime">SetTime()</link> D-Bus method.
  1318. -   *
  1319. -   * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call date_time_mechanism_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.
  1320. -   *
  1321. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1322. -   */
  1323. -  g_signal_new ("handle-set-time",
  1324. -    G_TYPE_FROM_INTERFACE (iface),
  1325. -    G_SIGNAL_RUN_LAST,
  1326. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_set_time),
  1327. -    g_signal_accumulator_true_handled,
  1328. -    NULL,
  1329. -    g_cclosure_marshal_generic,
  1330. -    G_TYPE_BOOLEAN,
  1331. -    2,
  1332. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64);
  1333. -
  1334. -  /**
  1335. -   * DateTimeMechanism::handle-can-set-time:
  1336. -   * @object: A #DateTimeMechanism.
  1337. -   * @invocation: A #GDBusMethodInvocation.
  1338. -   *
  1339. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTime">CanSetTime()</link> D-Bus method.
  1340. -   *
  1341. -   * 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 date_time_mechanism_complete_can_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.
  1342. -   *
  1343. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1344. -   */
  1345. -  g_signal_new ("handle-can-set-time",
  1346. -    G_TYPE_FROM_INTERFACE (iface),
  1347. -    G_SIGNAL_RUN_LAST,
  1348. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_can_set_time),
  1349. -    g_signal_accumulator_true_handled,
  1350. -    NULL,
  1351. -    g_cclosure_marshal_generic,
  1352. -    G_TYPE_BOOLEAN,
  1353. -    1,
  1354. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1355. -
  1356. -  /**
  1357. -   * DateTimeMechanism::handle-adjust-time:
  1358. -   * @object: A #DateTimeMechanism.
  1359. -   * @invocation: A #GDBusMethodInvocation.
  1360. -   * @seconds_to_add: Argument passed by remote caller.
  1361. -   *
  1362. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.AdjustTime">AdjustTime()</link> D-Bus method.
  1363. -   *
  1364. -   * 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 date_time_mechanism_complete_adjust_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.
  1365. -   *
  1366. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1367. -   */
  1368. -  g_signal_new ("handle-adjust-time",
  1369. -    G_TYPE_FROM_INTERFACE (iface),
  1370. -    G_SIGNAL_RUN_LAST,
  1371. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_adjust_time),
  1372. -    g_signal_accumulator_true_handled,
  1373. -    NULL,
  1374. -    g_cclosure_marshal_generic,
  1375. -    G_TYPE_BOOLEAN,
  1376. -    2,
  1377. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64);
  1378. -
  1379. -  /**
  1380. -   * DateTimeMechanism::handle-get-hardware-clock-using-utc:
  1381. -   * @object: A #DateTimeMechanism.
  1382. -   * @invocation: A #GDBusMethodInvocation.
  1383. -   *
  1384. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetHardwareClockUsingUtc">GetHardwareClockUsingUtc()</link> D-Bus method.
  1385. -   *
  1386. -   * 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 date_time_mechanism_complete_get_hardware_clock_using_utc() 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.
  1387. -   *
  1388. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1389. -   */
  1390. -  g_signal_new ("handle-get-hardware-clock-using-utc",
  1391. -    G_TYPE_FROM_INTERFACE (iface),
  1392. -    G_SIGNAL_RUN_LAST,
  1393. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_get_hardware_clock_using_utc),
  1394. -    g_signal_accumulator_true_handled,
  1395. -    NULL,
  1396. -    g_cclosure_marshal_generic,
  1397. -    G_TYPE_BOOLEAN,
  1398. -    1,
  1399. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1400. -
  1401. -  /**
  1402. -   * DateTimeMechanism::handle-set-hardware-clock-using-utc:
  1403. -   * @object: A #DateTimeMechanism.
  1404. -   * @invocation: A #GDBusMethodInvocation.
  1405. -   * @is_using_utc: Argument passed by remote caller.
  1406. -   *
  1407. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetHardwareClockUsingUtc">SetHardwareClockUsingUtc()</link> D-Bus method.
  1408. -   *
  1409. -   * 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 date_time_mechanism_complete_set_hardware_clock_using_utc() 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.
  1410. -   *
  1411. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1412. -   */
  1413. -  g_signal_new ("handle-set-hardware-clock-using-utc",
  1414. -    G_TYPE_FROM_INTERFACE (iface),
  1415. -    G_SIGNAL_RUN_LAST,
  1416. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_set_hardware_clock_using_utc),
  1417. -    g_signal_accumulator_true_handled,
  1418. -    NULL,
  1419. -    g_cclosure_marshal_generic,
  1420. -    G_TYPE_BOOLEAN,
  1421. -    2,
  1422. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN);
  1423. -
  1424. -  /**
  1425. -   * DateTimeMechanism::handle-get-using-ntp:
  1426. -   * @object: A #DateTimeMechanism.
  1427. -   * @invocation: A #GDBusMethodInvocation.
  1428. -   *
  1429. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetUsingNtp">GetUsingNtp()</link> D-Bus method.
  1430. -   *
  1431. -   * 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 date_time_mechanism_complete_get_using_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.
  1432. -   *
  1433. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1434. -   */
  1435. -  g_signal_new ("handle-get-using-ntp",
  1436. -    G_TYPE_FROM_INTERFACE (iface),
  1437. -    G_SIGNAL_RUN_LAST,
  1438. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_get_using_ntp),
  1439. -    g_signal_accumulator_true_handled,
  1440. -    NULL,
  1441. -    g_cclosure_marshal_generic,
  1442. -    G_TYPE_BOOLEAN,
  1443. -    1,
  1444. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1445. -
  1446. -  /**
  1447. -   * DateTimeMechanism::handle-set-using-ntp:
  1448. -   * @object: A #DateTimeMechanism.
  1449. -   * @invocation: A #GDBusMethodInvocation.
  1450. -   * @is_using_ntp: Argument passed by remote caller.
  1451. -   *
  1452. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetUsingNtp">SetUsingNtp()</link> D-Bus method.
  1453. -   *
  1454. -   * 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 date_time_mechanism_complete_set_using_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.
  1455. -   *
  1456. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1457. -   */
  1458. -  g_signal_new ("handle-set-using-ntp",
  1459. -    G_TYPE_FROM_INTERFACE (iface),
  1460. -    G_SIGNAL_RUN_LAST,
  1461. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_set_using_ntp),
  1462. -    g_signal_accumulator_true_handled,
  1463. -    NULL,
  1464. -    g_cclosure_marshal_generic,
  1465. -    G_TYPE_BOOLEAN,
  1466. -    2,
  1467. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN);
  1468. -
  1469. -  /**
  1470. -   * DateTimeMechanism::handle-can-set-using-ntp:
  1471. -   * @object: A #DateTimeMechanism.
  1472. -   * @invocation: A #GDBusMethodInvocation.
  1473. -   *
  1474. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetUsingNtp">CanSetUsingNtp()</link> D-Bus method.
  1475. -   *
  1476. -   * 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 date_time_mechanism_complete_can_set_using_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.
  1477. -   *
  1478. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  1479. -   */
  1480. -  g_signal_new ("handle-can-set-using-ntp",
  1481. -    G_TYPE_FROM_INTERFACE (iface),
  1482. -    G_SIGNAL_RUN_LAST,
  1483. -    G_STRUCT_OFFSET (DateTimeMechanismIface, handle_can_set_using_ntp),
  1484. -    g_signal_accumulator_true_handled,
  1485. -    NULL,
  1486. -    g_cclosure_marshal_generic,
  1487. -    G_TYPE_BOOLEAN,
  1488. -    1,
  1489. -    G_TYPE_DBUS_METHOD_INVOCATION);
  1490. -
  1491. -}
  1492. -
  1493. -typedef DateTimeMechanismIface DateTimeMechanismInterface;
  1494. -G_DEFINE_INTERFACE (DateTimeMechanism, date_time_mechanism, G_TYPE_OBJECT);
  1495. -
  1496. -/**
  1497. - * date_time_mechanism_call_set_timezone:
  1498. - * @proxy: A #DateTimeMechanismProxy.
  1499. - * @tz: Argument to pass with the method invocation.
  1500. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1501. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  1502. - * @user_data: User data to pass to @callback.
  1503. - *
  1504. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTimezone">SetTimezone()</link> D-Bus method on @proxy.
  1505. - * 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.
  1506. - * You can then call date_time_mechanism_call_set_timezone_finish() to get the result of the operation.
  1507. - *
  1508. - * See date_time_mechanism_call_set_timezone_sync() for the synchronous, blocking version of this method.
  1509. - */
  1510. -void
  1511. -date_time_mechanism_call_set_timezone (
  1512. -    DateTimeMechanism *proxy,
  1513. -    const gchar *tz,
  1514. -    GCancellable *cancellable,
  1515. -    GAsyncReadyCallback callback,
  1516. -    gpointer user_data)
  1517. -{
  1518. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  1519. -    "SetTimezone",
  1520. -    g_variant_new ("(s)",
  1521. -                   tz),
  1522. -    G_DBUS_CALL_FLAGS_NONE,
  1523. -    -1,
  1524. -    cancellable,
  1525. -    callback,
  1526. -    user_data);
  1527. -}
  1528. -
  1529. -/**
  1530. - * date_time_mechanism_call_set_timezone_finish:
  1531. - * @proxy: A #DateTimeMechanismProxy.
  1532. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_set_timezone().
  1533. - * @error: Return location for error or %NULL.
  1534. - *
  1535. - * Finishes an operation started with date_time_mechanism_call_set_timezone().
  1536. - *
  1537. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1538. - */
  1539. -gboolean
  1540. -date_time_mechanism_call_set_timezone_finish (
  1541. -    DateTimeMechanism *proxy,
  1542. -    GAsyncResult *res,
  1543. -    GError **error)
  1544. -{
  1545. -  GVariant *_ret;
  1546. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  1547. -  if (_ret == NULL)
  1548. -    goto _out;
  1549. -  g_variant_get (_ret,
  1550. -                 "()");
  1551. -  g_variant_unref (_ret);
  1552. -_out:
  1553. -  return _ret != NULL;
  1554. -}
  1555. -
  1556. -/**
  1557. - * date_time_mechanism_call_set_timezone_sync:
  1558. - * @proxy: A #DateTimeMechanismProxy.
  1559. - * @tz: Argument to pass with the method invocation.
  1560. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1561. - * @error: Return location for error or %NULL.
  1562. - *
  1563. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTimezone">SetTimezone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  1564. - *
  1565. - * See date_time_mechanism_call_set_timezone() for the asynchronous version of this method.
  1566. - *
  1567. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1568. - */
  1569. -gboolean
  1570. -date_time_mechanism_call_set_timezone_sync (
  1571. -    DateTimeMechanism *proxy,
  1572. -    const gchar *tz,
  1573. -    GCancellable *cancellable,
  1574. -    GError **error)
  1575. -{
  1576. -  GVariant *_ret;
  1577. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  1578. -    "SetTimezone",
  1579. -    g_variant_new ("(s)",
  1580. -                   tz),
  1581. -    G_DBUS_CALL_FLAGS_NONE,
  1582. -    -1,
  1583. -    cancellable,
  1584. -    error);
  1585. -  if (_ret == NULL)
  1586. -    goto _out;
  1587. -  g_variant_get (_ret,
  1588. -                 "()");
  1589. -  g_variant_unref (_ret);
  1590. -_out:
  1591. -  return _ret != NULL;
  1592. -}
  1593. -
  1594. -/**
  1595. - * date_time_mechanism_call_get_timezone:
  1596. - * @proxy: A #DateTimeMechanismProxy.
  1597. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1598. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  1599. - * @user_data: User data to pass to @callback.
  1600. - *
  1601. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetTimezone">GetTimezone()</link> D-Bus method on @proxy.
  1602. - * 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.
  1603. - * You can then call date_time_mechanism_call_get_timezone_finish() to get the result of the operation.
  1604. - *
  1605. - * See date_time_mechanism_call_get_timezone_sync() for the synchronous, blocking version of this method.
  1606. - */
  1607. -void
  1608. -date_time_mechanism_call_get_timezone (
  1609. -    DateTimeMechanism *proxy,
  1610. -    GCancellable *cancellable,
  1611. -    GAsyncReadyCallback callback,
  1612. -    gpointer user_data)
  1613. -{
  1614. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  1615. -    "GetTimezone",
  1616. -    g_variant_new ("()"),
  1617. -    G_DBUS_CALL_FLAGS_NONE,
  1618. -    -1,
  1619. -    cancellable,
  1620. -    callback,
  1621. -    user_data);
  1622. -}
  1623. -
  1624. -/**
  1625. - * date_time_mechanism_call_get_timezone_finish:
  1626. - * @proxy: A #DateTimeMechanismProxy.
  1627. - * @out_timezone: (out): Return location for return parameter or %NULL to ignore.
  1628. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_get_timezone().
  1629. - * @error: Return location for error or %NULL.
  1630. - *
  1631. - * Finishes an operation started with date_time_mechanism_call_get_timezone().
  1632. - *
  1633. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1634. - */
  1635. -gboolean
  1636. -date_time_mechanism_call_get_timezone_finish (
  1637. -    DateTimeMechanism *proxy,
  1638. -    gchar **out_timezone,
  1639. -    GAsyncResult *res,
  1640. -    GError **error)
  1641. -{
  1642. -  GVariant *_ret;
  1643. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  1644. -  if (_ret == NULL)
  1645. -    goto _out;
  1646. -  g_variant_get (_ret,
  1647. -                 "(s)",
  1648. -                 out_timezone);
  1649. -  g_variant_unref (_ret);
  1650. -_out:
  1651. -  return _ret != NULL;
  1652. -}
  1653. -
  1654. -/**
  1655. - * date_time_mechanism_call_get_timezone_sync:
  1656. - * @proxy: A #DateTimeMechanismProxy.
  1657. - * @out_timezone: (out): Return location for return parameter or %NULL to ignore.
  1658. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1659. - * @error: Return location for error or %NULL.
  1660. - *
  1661. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetTimezone">GetTimezone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  1662. - *
  1663. - * See date_time_mechanism_call_get_timezone() for the asynchronous version of this method.
  1664. - *
  1665. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1666. - */
  1667. -gboolean
  1668. -date_time_mechanism_call_get_timezone_sync (
  1669. -    DateTimeMechanism *proxy,
  1670. -    gchar **out_timezone,
  1671. -    GCancellable *cancellable,
  1672. -    GError **error)
  1673. -{
  1674. -  GVariant *_ret;
  1675. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  1676. -    "GetTimezone",
  1677. -    g_variant_new ("()"),
  1678. -    G_DBUS_CALL_FLAGS_NONE,
  1679. -    -1,
  1680. -    cancellable,
  1681. -    error);
  1682. -  if (_ret == NULL)
  1683. -    goto _out;
  1684. -  g_variant_get (_ret,
  1685. -                 "(s)",
  1686. -                 out_timezone);
  1687. -  g_variant_unref (_ret);
  1688. -_out:
  1689. -  return _ret != NULL;
  1690. -}
  1691. -
  1692. -/**
  1693. - * date_time_mechanism_call_can_set_timezone:
  1694. - * @proxy: A #DateTimeMechanismProxy.
  1695. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1696. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  1697. - * @user_data: User data to pass to @callback.
  1698. - *
  1699. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTimezone">CanSetTimezone()</link> D-Bus method on @proxy.
  1700. - * 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.
  1701. - * You can then call date_time_mechanism_call_can_set_timezone_finish() to get the result of the operation.
  1702. - *
  1703. - * See date_time_mechanism_call_can_set_timezone_sync() for the synchronous, blocking version of this method.
  1704. - */
  1705. -void
  1706. -date_time_mechanism_call_can_set_timezone (
  1707. -    DateTimeMechanism *proxy,
  1708. -    GCancellable *cancellable,
  1709. -    GAsyncReadyCallback callback,
  1710. -    gpointer user_data)
  1711. -{
  1712. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  1713. -    "CanSetTimezone",
  1714. -    g_variant_new ("()"),
  1715. -    G_DBUS_CALL_FLAGS_NONE,
  1716. -    -1,
  1717. -    cancellable,
  1718. -    callback,
  1719. -    user_data);
  1720. -}
  1721. -
  1722. -/**
  1723. - * date_time_mechanism_call_can_set_timezone_finish:
  1724. - * @proxy: A #DateTimeMechanismProxy.
  1725. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  1726. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_can_set_timezone().
  1727. - * @error: Return location for error or %NULL.
  1728. - *
  1729. - * Finishes an operation started with date_time_mechanism_call_can_set_timezone().
  1730. - *
  1731. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1732. - */
  1733. -gboolean
  1734. -date_time_mechanism_call_can_set_timezone_finish (
  1735. -    DateTimeMechanism *proxy,
  1736. -    gint *out_value,
  1737. -    GAsyncResult *res,
  1738. -    GError **error)
  1739. -{
  1740. -  GVariant *_ret;
  1741. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  1742. -  if (_ret == NULL)
  1743. -    goto _out;
  1744. -  g_variant_get (_ret,
  1745. -                 "(i)",
  1746. -                 out_value);
  1747. -  g_variant_unref (_ret);
  1748. -_out:
  1749. -  return _ret != NULL;
  1750. -}
  1751. -
  1752. -/**
  1753. - * date_time_mechanism_call_can_set_timezone_sync:
  1754. - * @proxy: A #DateTimeMechanismProxy.
  1755. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  1756. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1757. - * @error: Return location for error or %NULL.
  1758. - *
  1759. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTimezone">CanSetTimezone()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  1760. - *
  1761. - * See date_time_mechanism_call_can_set_timezone() for the asynchronous version of this method.
  1762. - *
  1763. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1764. - */
  1765. -gboolean
  1766. -date_time_mechanism_call_can_set_timezone_sync (
  1767. -    DateTimeMechanism *proxy,
  1768. -    gint *out_value,
  1769. -    GCancellable *cancellable,
  1770. -    GError **error)
  1771. -{
  1772. -  GVariant *_ret;
  1773. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  1774. -    "CanSetTimezone",
  1775. -    g_variant_new ("()"),
  1776. -    G_DBUS_CALL_FLAGS_NONE,
  1777. -    -1,
  1778. -    cancellable,
  1779. -    error);
  1780. -  if (_ret == NULL)
  1781. -    goto _out;
  1782. -  g_variant_get (_ret,
  1783. -                 "(i)",
  1784. -                 out_value);
  1785. -  g_variant_unref (_ret);
  1786. -_out:
  1787. -  return _ret != NULL;
  1788. -}
  1789. -
  1790. -/**
  1791. - * date_time_mechanism_call_set_date:
  1792. - * @proxy: A #DateTimeMechanismProxy.
  1793. - * @day: Argument to pass with the method invocation.
  1794. - * @month: Argument to pass with the method invocation.
  1795. - * @year: Argument to pass with the method invocation.
  1796. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1797. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  1798. - * @user_data: User data to pass to @callback.
  1799. - *
  1800. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetDate">SetDate()</link> D-Bus method on @proxy.
  1801. - * 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.
  1802. - * You can then call date_time_mechanism_call_set_date_finish() to get the result of the operation.
  1803. - *
  1804. - * See date_time_mechanism_call_set_date_sync() for the synchronous, blocking version of this method.
  1805. - */
  1806. -void
  1807. -date_time_mechanism_call_set_date (
  1808. -    DateTimeMechanism *proxy,
  1809. -    guint day,
  1810. -    guint month,
  1811. -    guint year,
  1812. -    GCancellable *cancellable,
  1813. -    GAsyncReadyCallback callback,
  1814. -    gpointer user_data)
  1815. -{
  1816. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  1817. -    "SetDate",
  1818. -    g_variant_new ("(uuu)",
  1819. -                   day,
  1820. -                   month,
  1821. -                   year),
  1822. -    G_DBUS_CALL_FLAGS_NONE,
  1823. -    -1,
  1824. -    cancellable,
  1825. -    callback,
  1826. -    user_data);
  1827. -}
  1828. -
  1829. -/**
  1830. - * date_time_mechanism_call_set_date_finish:
  1831. - * @proxy: A #DateTimeMechanismProxy.
  1832. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_set_date().
  1833. - * @error: Return location for error or %NULL.
  1834. - *
  1835. - * Finishes an operation started with date_time_mechanism_call_set_date().
  1836. - *
  1837. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1838. - */
  1839. -gboolean
  1840. -date_time_mechanism_call_set_date_finish (
  1841. -    DateTimeMechanism *proxy,
  1842. -    GAsyncResult *res,
  1843. -    GError **error)
  1844. -{
  1845. -  GVariant *_ret;
  1846. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  1847. -  if (_ret == NULL)
  1848. -    goto _out;
  1849. -  g_variant_get (_ret,
  1850. -                 "()");
  1851. -  g_variant_unref (_ret);
  1852. -_out:
  1853. -  return _ret != NULL;
  1854. -}
  1855. -
  1856. -/**
  1857. - * date_time_mechanism_call_set_date_sync:
  1858. - * @proxy: A #DateTimeMechanismProxy.
  1859. - * @day: Argument to pass with the method invocation.
  1860. - * @month: Argument to pass with the method invocation.
  1861. - * @year: Argument to pass with the method invocation.
  1862. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1863. - * @error: Return location for error or %NULL.
  1864. - *
  1865. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetDate">SetDate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  1866. - *
  1867. - * See date_time_mechanism_call_set_date() for the asynchronous version of this method.
  1868. - *
  1869. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1870. - */
  1871. -gboolean
  1872. -date_time_mechanism_call_set_date_sync (
  1873. -    DateTimeMechanism *proxy,
  1874. -    guint day,
  1875. -    guint month,
  1876. -    guint year,
  1877. -    GCancellable *cancellable,
  1878. -    GError **error)
  1879. -{
  1880. -  GVariant *_ret;
  1881. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  1882. -    "SetDate",
  1883. -    g_variant_new ("(uuu)",
  1884. -                   day,
  1885. -                   month,
  1886. -                   year),
  1887. -    G_DBUS_CALL_FLAGS_NONE,
  1888. -    -1,
  1889. -    cancellable,
  1890. -    error);
  1891. -  if (_ret == NULL)
  1892. -    goto _out;
  1893. -  g_variant_get (_ret,
  1894. -                 "()");
  1895. -  g_variant_unref (_ret);
  1896. -_out:
  1897. -  return _ret != NULL;
  1898. -}
  1899. -
  1900. -/**
  1901. - * date_time_mechanism_call_set_time:
  1902. - * @proxy: A #DateTimeMechanismProxy.
  1903. - * @seconds_since_epoch: Argument to pass with the method invocation.
  1904. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1905. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  1906. - * @user_data: User data to pass to @callback.
  1907. - *
  1908. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTime">SetTime()</link> D-Bus method on @proxy.
  1909. - * 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.
  1910. - * You can then call date_time_mechanism_call_set_time_finish() to get the result of the operation.
  1911. - *
  1912. - * See date_time_mechanism_call_set_time_sync() for the synchronous, blocking version of this method.
  1913. - */
  1914. -void
  1915. -date_time_mechanism_call_set_time (
  1916. -    DateTimeMechanism *proxy,
  1917. -    gint64 seconds_since_epoch,
  1918. -    GCancellable *cancellable,
  1919. -    GAsyncReadyCallback callback,
  1920. -    gpointer user_data)
  1921. -{
  1922. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  1923. -    "SetTime",
  1924. -    g_variant_new ("(x)",
  1925. -                   seconds_since_epoch),
  1926. -    G_DBUS_CALL_FLAGS_NONE,
  1927. -    -1,
  1928. -    cancellable,
  1929. -    callback,
  1930. -    user_data);
  1931. -}
  1932. -
  1933. -/**
  1934. - * date_time_mechanism_call_set_time_finish:
  1935. - * @proxy: A #DateTimeMechanismProxy.
  1936. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_set_time().
  1937. - * @error: Return location for error or %NULL.
  1938. - *
  1939. - * Finishes an operation started with date_time_mechanism_call_set_time().
  1940. - *
  1941. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1942. - */
  1943. -gboolean
  1944. -date_time_mechanism_call_set_time_finish (
  1945. -    DateTimeMechanism *proxy,
  1946. -    GAsyncResult *res,
  1947. -    GError **error)
  1948. -{
  1949. -  GVariant *_ret;
  1950. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  1951. -  if (_ret == NULL)
  1952. -    goto _out;
  1953. -  g_variant_get (_ret,
  1954. -                 "()");
  1955. -  g_variant_unref (_ret);
  1956. -_out:
  1957. -  return _ret != NULL;
  1958. -}
  1959. -
  1960. -/**
  1961. - * date_time_mechanism_call_set_time_sync:
  1962. - * @proxy: A #DateTimeMechanismProxy.
  1963. - * @seconds_since_epoch: Argument to pass with the method invocation.
  1964. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  1965. - * @error: Return location for error or %NULL.
  1966. - *
  1967. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetTime">SetTime()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  1968. - *
  1969. - * See date_time_mechanism_call_set_time() for the asynchronous version of this method.
  1970. - *
  1971. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  1972. - */
  1973. -gboolean
  1974. -date_time_mechanism_call_set_time_sync (
  1975. -    DateTimeMechanism *proxy,
  1976. -    gint64 seconds_since_epoch,
  1977. -    GCancellable *cancellable,
  1978. -    GError **error)
  1979. -{
  1980. -  GVariant *_ret;
  1981. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  1982. -    "SetTime",
  1983. -    g_variant_new ("(x)",
  1984. -                   seconds_since_epoch),
  1985. -    G_DBUS_CALL_FLAGS_NONE,
  1986. -    -1,
  1987. -    cancellable,
  1988. -    error);
  1989. -  if (_ret == NULL)
  1990. -    goto _out;
  1991. -  g_variant_get (_ret,
  1992. -                 "()");
  1993. -  g_variant_unref (_ret);
  1994. -_out:
  1995. -  return _ret != NULL;
  1996. -}
  1997. -
  1998. -/**
  1999. - * date_time_mechanism_call_can_set_time:
  2000. - * @proxy: A #DateTimeMechanismProxy.
  2001. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2002. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2003. - * @user_data: User data to pass to @callback.
  2004. - *
  2005. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTime">CanSetTime()</link> D-Bus method on @proxy.
  2006. - * 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.
  2007. - * You can then call date_time_mechanism_call_can_set_time_finish() to get the result of the operation.
  2008. - *
  2009. - * See date_time_mechanism_call_can_set_time_sync() for the synchronous, blocking version of this method.
  2010. - */
  2011. -void
  2012. -date_time_mechanism_call_can_set_time (
  2013. -    DateTimeMechanism *proxy,
  2014. -    GCancellable *cancellable,
  2015. -    GAsyncReadyCallback callback,
  2016. -    gpointer user_data)
  2017. -{
  2018. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2019. -    "CanSetTime",
  2020. -    g_variant_new ("()"),
  2021. -    G_DBUS_CALL_FLAGS_NONE,
  2022. -    -1,
  2023. -    cancellable,
  2024. -    callback,
  2025. -    user_data);
  2026. -}
  2027. -
  2028. -/**
  2029. - * date_time_mechanism_call_can_set_time_finish:
  2030. - * @proxy: A #DateTimeMechanismProxy.
  2031. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  2032. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_can_set_time().
  2033. - * @error: Return location for error or %NULL.
  2034. - *
  2035. - * Finishes an operation started with date_time_mechanism_call_can_set_time().
  2036. - *
  2037. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2038. - */
  2039. -gboolean
  2040. -date_time_mechanism_call_can_set_time_finish (
  2041. -    DateTimeMechanism *proxy,
  2042. -    gint *out_value,
  2043. -    GAsyncResult *res,
  2044. -    GError **error)
  2045. -{
  2046. -  GVariant *_ret;
  2047. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2048. -  if (_ret == NULL)
  2049. -    goto _out;
  2050. -  g_variant_get (_ret,
  2051. -                 "(i)",
  2052. -                 out_value);
  2053. -  g_variant_unref (_ret);
  2054. -_out:
  2055. -  return _ret != NULL;
  2056. -}
  2057. -
  2058. -/**
  2059. - * date_time_mechanism_call_can_set_time_sync:
  2060. - * @proxy: A #DateTimeMechanismProxy.
  2061. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  2062. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2063. - * @error: Return location for error or %NULL.
  2064. - *
  2065. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTime">CanSetTime()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2066. - *
  2067. - * See date_time_mechanism_call_can_set_time() for the asynchronous version of this method.
  2068. - *
  2069. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2070. - */
  2071. -gboolean
  2072. -date_time_mechanism_call_can_set_time_sync (
  2073. -    DateTimeMechanism *proxy,
  2074. -    gint *out_value,
  2075. -    GCancellable *cancellable,
  2076. -    GError **error)
  2077. -{
  2078. -  GVariant *_ret;
  2079. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2080. -    "CanSetTime",
  2081. -    g_variant_new ("()"),
  2082. -    G_DBUS_CALL_FLAGS_NONE,
  2083. -    -1,
  2084. -    cancellable,
  2085. -    error);
  2086. -  if (_ret == NULL)
  2087. -    goto _out;
  2088. -  g_variant_get (_ret,
  2089. -                 "(i)",
  2090. -                 out_value);
  2091. -  g_variant_unref (_ret);
  2092. -_out:
  2093. -  return _ret != NULL;
  2094. -}
  2095. -
  2096. -/**
  2097. - * date_time_mechanism_call_adjust_time:
  2098. - * @proxy: A #DateTimeMechanismProxy.
  2099. - * @seconds_to_add: Argument to pass with the method invocation.
  2100. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2101. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2102. - * @user_data: User data to pass to @callback.
  2103. - *
  2104. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.AdjustTime">AdjustTime()</link> D-Bus method on @proxy.
  2105. - * 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.
  2106. - * You can then call date_time_mechanism_call_adjust_time_finish() to get the result of the operation.
  2107. - *
  2108. - * See date_time_mechanism_call_adjust_time_sync() for the synchronous, blocking version of this method.
  2109. - */
  2110. -void
  2111. -date_time_mechanism_call_adjust_time (
  2112. -    DateTimeMechanism *proxy,
  2113. -    gint64 seconds_to_add,
  2114. -    GCancellable *cancellable,
  2115. -    GAsyncReadyCallback callback,
  2116. -    gpointer user_data)
  2117. -{
  2118. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2119. -    "AdjustTime",
  2120. -    g_variant_new ("(x)",
  2121. -                   seconds_to_add),
  2122. -    G_DBUS_CALL_FLAGS_NONE,
  2123. -    -1,
  2124. -    cancellable,
  2125. -    callback,
  2126. -    user_data);
  2127. -}
  2128. -
  2129. -/**
  2130. - * date_time_mechanism_call_adjust_time_finish:
  2131. - * @proxy: A #DateTimeMechanismProxy.
  2132. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_adjust_time().
  2133. - * @error: Return location for error or %NULL.
  2134. - *
  2135. - * Finishes an operation started with date_time_mechanism_call_adjust_time().
  2136. - *
  2137. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2138. - */
  2139. -gboolean
  2140. -date_time_mechanism_call_adjust_time_finish (
  2141. -    DateTimeMechanism *proxy,
  2142. -    GAsyncResult *res,
  2143. -    GError **error)
  2144. -{
  2145. -  GVariant *_ret;
  2146. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2147. -  if (_ret == NULL)
  2148. -    goto _out;
  2149. -  g_variant_get (_ret,
  2150. -                 "()");
  2151. -  g_variant_unref (_ret);
  2152. -_out:
  2153. -  return _ret != NULL;
  2154. -}
  2155. -
  2156. -/**
  2157. - * date_time_mechanism_call_adjust_time_sync:
  2158. - * @proxy: A #DateTimeMechanismProxy.
  2159. - * @seconds_to_add: Argument to pass with the method invocation.
  2160. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2161. - * @error: Return location for error or %NULL.
  2162. - *
  2163. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.AdjustTime">AdjustTime()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2164. - *
  2165. - * See date_time_mechanism_call_adjust_time() for the asynchronous version of this method.
  2166. - *
  2167. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2168. - */
  2169. -gboolean
  2170. -date_time_mechanism_call_adjust_time_sync (
  2171. -    DateTimeMechanism *proxy,
  2172. -    gint64 seconds_to_add,
  2173. -    GCancellable *cancellable,
  2174. -    GError **error)
  2175. -{
  2176. -  GVariant *_ret;
  2177. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2178. -    "AdjustTime",
  2179. -    g_variant_new ("(x)",
  2180. -                   seconds_to_add),
  2181. -    G_DBUS_CALL_FLAGS_NONE,
  2182. -    -1,
  2183. -    cancellable,
  2184. -    error);
  2185. -  if (_ret == NULL)
  2186. -    goto _out;
  2187. -  g_variant_get (_ret,
  2188. -                 "()");
  2189. -  g_variant_unref (_ret);
  2190. -_out:
  2191. -  return _ret != NULL;
  2192. -}
  2193. -
  2194. -/**
  2195. - * date_time_mechanism_call_get_hardware_clock_using_utc:
  2196. - * @proxy: A #DateTimeMechanismProxy.
  2197. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2198. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2199. - * @user_data: User data to pass to @callback.
  2200. - *
  2201. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetHardwareClockUsingUtc">GetHardwareClockUsingUtc()</link> D-Bus method on @proxy.
  2202. - * 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.
  2203. - * You can then call date_time_mechanism_call_get_hardware_clock_using_utc_finish() to get the result of the operation.
  2204. - *
  2205. - * See date_time_mechanism_call_get_hardware_clock_using_utc_sync() for the synchronous, blocking version of this method.
  2206. - */
  2207. -void
  2208. -date_time_mechanism_call_get_hardware_clock_using_utc (
  2209. -    DateTimeMechanism *proxy,
  2210. -    GCancellable *cancellable,
  2211. -    GAsyncReadyCallback callback,
  2212. -    gpointer user_data)
  2213. -{
  2214. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2215. -    "GetHardwareClockUsingUtc",
  2216. -    g_variant_new ("()"),
  2217. -    G_DBUS_CALL_FLAGS_NONE,
  2218. -    -1,
  2219. -    cancellable,
  2220. -    callback,
  2221. -    user_data);
  2222. -}
  2223. -
  2224. -/**
  2225. - * date_time_mechanism_call_get_hardware_clock_using_utc_finish:
  2226. - * @proxy: A #DateTimeMechanismProxy.
  2227. - * @out_is_using_utc: (out): Return location for return parameter or %NULL to ignore.
  2228. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_get_hardware_clock_using_utc().
  2229. - * @error: Return location for error or %NULL.
  2230. - *
  2231. - * Finishes an operation started with date_time_mechanism_call_get_hardware_clock_using_utc().
  2232. - *
  2233. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2234. - */
  2235. -gboolean
  2236. -date_time_mechanism_call_get_hardware_clock_using_utc_finish (
  2237. -    DateTimeMechanism *proxy,
  2238. -    gboolean *out_is_using_utc,
  2239. -    GAsyncResult *res,
  2240. -    GError **error)
  2241. -{
  2242. -  GVariant *_ret;
  2243. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2244. -  if (_ret == NULL)
  2245. -    goto _out;
  2246. -  g_variant_get (_ret,
  2247. -                 "(b)",
  2248. -                 out_is_using_utc);
  2249. -  g_variant_unref (_ret);
  2250. -_out:
  2251. -  return _ret != NULL;
  2252. -}
  2253. -
  2254. -/**
  2255. - * date_time_mechanism_call_get_hardware_clock_using_utc_sync:
  2256. - * @proxy: A #DateTimeMechanismProxy.
  2257. - * @out_is_using_utc: (out): Return location for return parameter or %NULL to ignore.
  2258. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2259. - * @error: Return location for error or %NULL.
  2260. - *
  2261. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetHardwareClockUsingUtc">GetHardwareClockUsingUtc()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2262. - *
  2263. - * See date_time_mechanism_call_get_hardware_clock_using_utc() for the asynchronous version of this method.
  2264. - *
  2265. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2266. - */
  2267. -gboolean
  2268. -date_time_mechanism_call_get_hardware_clock_using_utc_sync (
  2269. -    DateTimeMechanism *proxy,
  2270. -    gboolean *out_is_using_utc,
  2271. -    GCancellable *cancellable,
  2272. -    GError **error)
  2273. -{
  2274. -  GVariant *_ret;
  2275. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2276. -    "GetHardwareClockUsingUtc",
  2277. -    g_variant_new ("()"),
  2278. -    G_DBUS_CALL_FLAGS_NONE,
  2279. -    -1,
  2280. -    cancellable,
  2281. -    error);
  2282. -  if (_ret == NULL)
  2283. -    goto _out;
  2284. -  g_variant_get (_ret,
  2285. -                 "(b)",
  2286. -                 out_is_using_utc);
  2287. -  g_variant_unref (_ret);
  2288. -_out:
  2289. -  return _ret != NULL;
  2290. -}
  2291. -
  2292. -/**
  2293. - * date_time_mechanism_call_set_hardware_clock_using_utc:
  2294. - * @proxy: A #DateTimeMechanismProxy.
  2295. - * @is_using_utc: Argument to pass with the method invocation.
  2296. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2297. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2298. - * @user_data: User data to pass to @callback.
  2299. - *
  2300. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetHardwareClockUsingUtc">SetHardwareClockUsingUtc()</link> D-Bus method on @proxy.
  2301. - * 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.
  2302. - * You can then call date_time_mechanism_call_set_hardware_clock_using_utc_finish() to get the result of the operation.
  2303. - *
  2304. - * See date_time_mechanism_call_set_hardware_clock_using_utc_sync() for the synchronous, blocking version of this method.
  2305. - */
  2306. -void
  2307. -date_time_mechanism_call_set_hardware_clock_using_utc (
  2308. -    DateTimeMechanism *proxy,
  2309. -    gboolean is_using_utc,
  2310. -    GCancellable *cancellable,
  2311. -    GAsyncReadyCallback callback,
  2312. -    gpointer user_data)
  2313. -{
  2314. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2315. -    "SetHardwareClockUsingUtc",
  2316. -    g_variant_new ("(b)",
  2317. -                   is_using_utc),
  2318. -    G_DBUS_CALL_FLAGS_NONE,
  2319. -    -1,
  2320. -    cancellable,
  2321. -    callback,
  2322. -    user_data);
  2323. -}
  2324. -
  2325. -/**
  2326. - * date_time_mechanism_call_set_hardware_clock_using_utc_finish:
  2327. - * @proxy: A #DateTimeMechanismProxy.
  2328. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_set_hardware_clock_using_utc().
  2329. - * @error: Return location for error or %NULL.
  2330. - *
  2331. - * Finishes an operation started with date_time_mechanism_call_set_hardware_clock_using_utc().
  2332. - *
  2333. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2334. - */
  2335. -gboolean
  2336. -date_time_mechanism_call_set_hardware_clock_using_utc_finish (
  2337. -    DateTimeMechanism *proxy,
  2338. -    GAsyncResult *res,
  2339. -    GError **error)
  2340. -{
  2341. -  GVariant *_ret;
  2342. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2343. -  if (_ret == NULL)
  2344. -    goto _out;
  2345. -  g_variant_get (_ret,
  2346. -                 "()");
  2347. -  g_variant_unref (_ret);
  2348. -_out:
  2349. -  return _ret != NULL;
  2350. -}
  2351. -
  2352. -/**
  2353. - * date_time_mechanism_call_set_hardware_clock_using_utc_sync:
  2354. - * @proxy: A #DateTimeMechanismProxy.
  2355. - * @is_using_utc: Argument to pass with the method invocation.
  2356. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2357. - * @error: Return location for error or %NULL.
  2358. - *
  2359. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetHardwareClockUsingUtc">SetHardwareClockUsingUtc()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2360. - *
  2361. - * See date_time_mechanism_call_set_hardware_clock_using_utc() for the asynchronous version of this method.
  2362. - *
  2363. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2364. - */
  2365. -gboolean
  2366. -date_time_mechanism_call_set_hardware_clock_using_utc_sync (
  2367. -    DateTimeMechanism *proxy,
  2368. -    gboolean is_using_utc,
  2369. -    GCancellable *cancellable,
  2370. -    GError **error)
  2371. -{
  2372. -  GVariant *_ret;
  2373. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2374. -    "SetHardwareClockUsingUtc",
  2375. -    g_variant_new ("(b)",
  2376. -                   is_using_utc),
  2377. -    G_DBUS_CALL_FLAGS_NONE,
  2378. -    -1,
  2379. -    cancellable,
  2380. -    error);
  2381. -  if (_ret == NULL)
  2382. -    goto _out;
  2383. -  g_variant_get (_ret,
  2384. -                 "()");
  2385. -  g_variant_unref (_ret);
  2386. -_out:
  2387. -  return _ret != NULL;
  2388. -}
  2389. -
  2390. -/**
  2391. - * date_time_mechanism_call_get_using_ntp:
  2392. - * @proxy: A #DateTimeMechanismProxy.
  2393. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2394. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2395. - * @user_data: User data to pass to @callback.
  2396. - *
  2397. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetUsingNtp">GetUsingNtp()</link> D-Bus method on @proxy.
  2398. - * 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.
  2399. - * You can then call date_time_mechanism_call_get_using_ntp_finish() to get the result of the operation.
  2400. - *
  2401. - * See date_time_mechanism_call_get_using_ntp_sync() for the synchronous, blocking version of this method.
  2402. - */
  2403. -void
  2404. -date_time_mechanism_call_get_using_ntp (
  2405. -    DateTimeMechanism *proxy,
  2406. -    GCancellable *cancellable,
  2407. -    GAsyncReadyCallback callback,
  2408. -    gpointer user_data)
  2409. -{
  2410. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2411. -    "GetUsingNtp",
  2412. -    g_variant_new ("()"),
  2413. -    G_DBUS_CALL_FLAGS_NONE,
  2414. -    -1,
  2415. -    cancellable,
  2416. -    callback,
  2417. -    user_data);
  2418. -}
  2419. -
  2420. -/**
  2421. - * date_time_mechanism_call_get_using_ntp_finish:
  2422. - * @proxy: A #DateTimeMechanismProxy.
  2423. - * @out_can_use_ntp: (out): Return location for return parameter or %NULL to ignore.
  2424. - * @out_is_using_ntp: (out): Return location for return parameter or %NULL to ignore.
  2425. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_get_using_ntp().
  2426. - * @error: Return location for error or %NULL.
  2427. - *
  2428. - * Finishes an operation started with date_time_mechanism_call_get_using_ntp().
  2429. - *
  2430. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2431. - */
  2432. -gboolean
  2433. -date_time_mechanism_call_get_using_ntp_finish (
  2434. -    DateTimeMechanism *proxy,
  2435. -    gboolean *out_can_use_ntp,
  2436. -    gboolean *out_is_using_ntp,
  2437. -    GAsyncResult *res,
  2438. -    GError **error)
  2439. -{
  2440. -  GVariant *_ret;
  2441. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2442. -  if (_ret == NULL)
  2443. -    goto _out;
  2444. -  g_variant_get (_ret,
  2445. -                 "(bb)",
  2446. -                 out_can_use_ntp,
  2447. -                 out_is_using_ntp);
  2448. -  g_variant_unref (_ret);
  2449. -_out:
  2450. -  return _ret != NULL;
  2451. -}
  2452. -
  2453. -/**
  2454. - * date_time_mechanism_call_get_using_ntp_sync:
  2455. - * @proxy: A #DateTimeMechanismProxy.
  2456. - * @out_can_use_ntp: (out): Return location for return parameter or %NULL to ignore.
  2457. - * @out_is_using_ntp: (out): Return location for return parameter or %NULL to ignore.
  2458. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2459. - * @error: Return location for error or %NULL.
  2460. - *
  2461. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetUsingNtp">GetUsingNtp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2462. - *
  2463. - * See date_time_mechanism_call_get_using_ntp() for the asynchronous version of this method.
  2464. - *
  2465. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2466. - */
  2467. -gboolean
  2468. -date_time_mechanism_call_get_using_ntp_sync (
  2469. -    DateTimeMechanism *proxy,
  2470. -    gboolean *out_can_use_ntp,
  2471. -    gboolean *out_is_using_ntp,
  2472. -    GCancellable *cancellable,
  2473. -    GError **error)
  2474. -{
  2475. -  GVariant *_ret;
  2476. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2477. -    "GetUsingNtp",
  2478. -    g_variant_new ("()"),
  2479. -    G_DBUS_CALL_FLAGS_NONE,
  2480. -    -1,
  2481. -    cancellable,
  2482. -    error);
  2483. -  if (_ret == NULL)
  2484. -    goto _out;
  2485. -  g_variant_get (_ret,
  2486. -                 "(bb)",
  2487. -                 out_can_use_ntp,
  2488. -                 out_is_using_ntp);
  2489. -  g_variant_unref (_ret);
  2490. -_out:
  2491. -  return _ret != NULL;
  2492. -}
  2493. -
  2494. -/**
  2495. - * date_time_mechanism_call_set_using_ntp:
  2496. - * @proxy: A #DateTimeMechanismProxy.
  2497. - * @is_using_ntp: Argument to pass with the method invocation.
  2498. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2499. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2500. - * @user_data: User data to pass to @callback.
  2501. - *
  2502. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetUsingNtp">SetUsingNtp()</link> D-Bus method on @proxy.
  2503. - * 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.
  2504. - * You can then call date_time_mechanism_call_set_using_ntp_finish() to get the result of the operation.
  2505. - *
  2506. - * See date_time_mechanism_call_set_using_ntp_sync() for the synchronous, blocking version of this method.
  2507. - */
  2508. -void
  2509. -date_time_mechanism_call_set_using_ntp (
  2510. -    DateTimeMechanism *proxy,
  2511. -    gboolean is_using_ntp,
  2512. -    GCancellable *cancellable,
  2513. -    GAsyncReadyCallback callback,
  2514. -    gpointer user_data)
  2515. -{
  2516. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2517. -    "SetUsingNtp",
  2518. -    g_variant_new ("(b)",
  2519. -                   is_using_ntp),
  2520. -    G_DBUS_CALL_FLAGS_NONE,
  2521. -    -1,
  2522. -    cancellable,
  2523. -    callback,
  2524. -    user_data);
  2525. -}
  2526. -
  2527. -/**
  2528. - * date_time_mechanism_call_set_using_ntp_finish:
  2529. - * @proxy: A #DateTimeMechanismProxy.
  2530. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_set_using_ntp().
  2531. - * @error: Return location for error or %NULL.
  2532. - *
  2533. - * Finishes an operation started with date_time_mechanism_call_set_using_ntp().
  2534. - *
  2535. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2536. - */
  2537. -gboolean
  2538. -date_time_mechanism_call_set_using_ntp_finish (
  2539. -    DateTimeMechanism *proxy,
  2540. -    GAsyncResult *res,
  2541. -    GError **error)
  2542. -{
  2543. -  GVariant *_ret;
  2544. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2545. -  if (_ret == NULL)
  2546. -    goto _out;
  2547. -  g_variant_get (_ret,
  2548. -                 "()");
  2549. -  g_variant_unref (_ret);
  2550. -_out:
  2551. -  return _ret != NULL;
  2552. -}
  2553. -
  2554. -/**
  2555. - * date_time_mechanism_call_set_using_ntp_sync:
  2556. - * @proxy: A #DateTimeMechanismProxy.
  2557. - * @is_using_ntp: Argument to pass with the method invocation.
  2558. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2559. - * @error: Return location for error or %NULL.
  2560. - *
  2561. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetUsingNtp">SetUsingNtp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2562. - *
  2563. - * See date_time_mechanism_call_set_using_ntp() for the asynchronous version of this method.
  2564. - *
  2565. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2566. - */
  2567. -gboolean
  2568. -date_time_mechanism_call_set_using_ntp_sync (
  2569. -    DateTimeMechanism *proxy,
  2570. -    gboolean is_using_ntp,
  2571. -    GCancellable *cancellable,
  2572. -    GError **error)
  2573. -{
  2574. -  GVariant *_ret;
  2575. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2576. -    "SetUsingNtp",
  2577. -    g_variant_new ("(b)",
  2578. -                   is_using_ntp),
  2579. -    G_DBUS_CALL_FLAGS_NONE,
  2580. -    -1,
  2581. -    cancellable,
  2582. -    error);
  2583. -  if (_ret == NULL)
  2584. -    goto _out;
  2585. -  g_variant_get (_ret,
  2586. -                 "()");
  2587. -  g_variant_unref (_ret);
  2588. -_out:
  2589. -  return _ret != NULL;
  2590. -}
  2591. -
  2592. -/**
  2593. - * date_time_mechanism_call_can_set_using_ntp:
  2594. - * @proxy: A #DateTimeMechanismProxy.
  2595. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2596. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  2597. - * @user_data: User data to pass to @callback.
  2598. - *
  2599. - * Asynchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetUsingNtp">CanSetUsingNtp()</link> D-Bus method on @proxy.
  2600. - * 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.
  2601. - * You can then call date_time_mechanism_call_can_set_using_ntp_finish() to get the result of the operation.
  2602. - *
  2603. - * See date_time_mechanism_call_can_set_using_ntp_sync() for the synchronous, blocking version of this method.
  2604. - */
  2605. -void
  2606. -date_time_mechanism_call_can_set_using_ntp (
  2607. -    DateTimeMechanism *proxy,
  2608. -    GCancellable *cancellable,
  2609. -    GAsyncReadyCallback callback,
  2610. -    gpointer user_data)
  2611. -{
  2612. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  2613. -    "CanSetUsingNtp",
  2614. -    g_variant_new ("()"),
  2615. -    G_DBUS_CALL_FLAGS_NONE,
  2616. -    -1,
  2617. -    cancellable,
  2618. -    callback,
  2619. -    user_data);
  2620. -}
  2621. -
  2622. -/**
  2623. - * date_time_mechanism_call_can_set_using_ntp_finish:
  2624. - * @proxy: A #DateTimeMechanismProxy.
  2625. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  2626. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_call_can_set_using_ntp().
  2627. - * @error: Return location for error or %NULL.
  2628. - *
  2629. - * Finishes an operation started with date_time_mechanism_call_can_set_using_ntp().
  2630. - *
  2631. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2632. - */
  2633. -gboolean
  2634. -date_time_mechanism_call_can_set_using_ntp_finish (
  2635. -    DateTimeMechanism *proxy,
  2636. -    gint *out_value,
  2637. -    GAsyncResult *res,
  2638. -    GError **error)
  2639. -{
  2640. -  GVariant *_ret;
  2641. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  2642. -  if (_ret == NULL)
  2643. -    goto _out;
  2644. -  g_variant_get (_ret,
  2645. -                 "(i)",
  2646. -                 out_value);
  2647. -  g_variant_unref (_ret);
  2648. -_out:
  2649. -  return _ret != NULL;
  2650. -}
  2651. -
  2652. -/**
  2653. - * date_time_mechanism_call_can_set_using_ntp_sync:
  2654. - * @proxy: A #DateTimeMechanismProxy.
  2655. - * @out_value: (out): Return location for return parameter or %NULL to ignore.
  2656. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  2657. - * @error: Return location for error or %NULL.
  2658. - *
  2659. - * Synchronously invokes the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetUsingNtp">CanSetUsingNtp()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
  2660. - *
  2661. - * See date_time_mechanism_call_can_set_using_ntp() for the asynchronous version of this method.
  2662. - *
  2663. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  2664. - */
  2665. -gboolean
  2666. -date_time_mechanism_call_can_set_using_ntp_sync (
  2667. -    DateTimeMechanism *proxy,
  2668. -    gint *out_value,
  2669. -    GCancellable *cancellable,
  2670. -    GError **error)
  2671. -{
  2672. -  GVariant *_ret;
  2673. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  2674. -    "CanSetUsingNtp",
  2675. -    g_variant_new ("()"),
  2676. -    G_DBUS_CALL_FLAGS_NONE,
  2677. -    -1,
  2678. -    cancellable,
  2679. -    error);
  2680. -  if (_ret == NULL)
  2681. -    goto _out;
  2682. -  g_variant_get (_ret,
  2683. -                 "(i)",
  2684. -                 out_value);
  2685. -  g_variant_unref (_ret);
  2686. -_out:
  2687. -  return _ret != NULL;
  2688. -}
  2689. -
  2690. -/**
  2691. - * date_time_mechanism_complete_set_timezone:
  2692. - * @object: A #DateTimeMechanism.
  2693. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2694. - *
  2695. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.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.
  2696. - *
  2697. - * This method will free @invocation, you cannot use it afterwards.
  2698. - */
  2699. -void
  2700. -date_time_mechanism_complete_set_timezone (
  2701. -    DateTimeMechanism *object,
  2702. -    GDBusMethodInvocation *invocation)
  2703. -{
  2704. -  g_dbus_method_invocation_return_value (invocation,
  2705. -    g_variant_new ("()"));
  2706. -}
  2707. -
  2708. -/**
  2709. - * date_time_mechanism_complete_get_timezone:
  2710. - * @object: A #DateTimeMechanism.
  2711. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2712. - * @timezone: Parameter to return.
  2713. - *
  2714. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetTimezone">GetTimezone()</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.
  2715. - *
  2716. - * This method will free @invocation, you cannot use it afterwards.
  2717. - */
  2718. -void
  2719. -date_time_mechanism_complete_get_timezone (
  2720. -    DateTimeMechanism *object,
  2721. -    GDBusMethodInvocation *invocation,
  2722. -    const gchar *timezone)
  2723. -{
  2724. -  g_dbus_method_invocation_return_value (invocation,
  2725. -    g_variant_new ("(s)",
  2726. -                   timezone));
  2727. -}
  2728. -
  2729. -/**
  2730. - * date_time_mechanism_complete_can_set_timezone:
  2731. - * @object: A #DateTimeMechanism.
  2732. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2733. - * @value: Parameter to return.
  2734. - *
  2735. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTimezone">CanSetTimezone()</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.
  2736. - *
  2737. - * This method will free @invocation, you cannot use it afterwards.
  2738. - */
  2739. -void
  2740. -date_time_mechanism_complete_can_set_timezone (
  2741. -    DateTimeMechanism *object,
  2742. -    GDBusMethodInvocation *invocation,
  2743. -    gint value)
  2744. -{
  2745. -  g_dbus_method_invocation_return_value (invocation,
  2746. -    g_variant_new ("(i)",
  2747. -                   value));
  2748. -}
  2749. -
  2750. -/**
  2751. - * date_time_mechanism_complete_set_date:
  2752. - * @object: A #DateTimeMechanism.
  2753. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2754. - *
  2755. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetDate">SetDate()</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.
  2756. - *
  2757. - * This method will free @invocation, you cannot use it afterwards.
  2758. - */
  2759. -void
  2760. -date_time_mechanism_complete_set_date (
  2761. -    DateTimeMechanism *object,
  2762. -    GDBusMethodInvocation *invocation)
  2763. -{
  2764. -  g_dbus_method_invocation_return_value (invocation,
  2765. -    g_variant_new ("()"));
  2766. -}
  2767. -
  2768. -/**
  2769. - * date_time_mechanism_complete_set_time:
  2770. - * @object: A #DateTimeMechanism.
  2771. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2772. - *
  2773. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.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.
  2774. - *
  2775. - * This method will free @invocation, you cannot use it afterwards.
  2776. - */
  2777. -void
  2778. -date_time_mechanism_complete_set_time (
  2779. -    DateTimeMechanism *object,
  2780. -    GDBusMethodInvocation *invocation)
  2781. -{
  2782. -  g_dbus_method_invocation_return_value (invocation,
  2783. -    g_variant_new ("()"));
  2784. -}
  2785. -
  2786. -/**
  2787. - * date_time_mechanism_complete_can_set_time:
  2788. - * @object: A #DateTimeMechanism.
  2789. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2790. - * @value: Parameter to return.
  2791. - *
  2792. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetTime">CanSetTime()</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.
  2793. - *
  2794. - * This method will free @invocation, you cannot use it afterwards.
  2795. - */
  2796. -void
  2797. -date_time_mechanism_complete_can_set_time (
  2798. -    DateTimeMechanism *object,
  2799. -    GDBusMethodInvocation *invocation,
  2800. -    gint value)
  2801. -{
  2802. -  g_dbus_method_invocation_return_value (invocation,
  2803. -    g_variant_new ("(i)",
  2804. -                   value));
  2805. -}
  2806. -
  2807. -/**
  2808. - * date_time_mechanism_complete_adjust_time:
  2809. - * @object: A #DateTimeMechanism.
  2810. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2811. - *
  2812. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.AdjustTime">AdjustTime()</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.
  2813. - *
  2814. - * This method will free @invocation, you cannot use it afterwards.
  2815. - */
  2816. -void
  2817. -date_time_mechanism_complete_adjust_time (
  2818. -    DateTimeMechanism *object,
  2819. -    GDBusMethodInvocation *invocation)
  2820. -{
  2821. -  g_dbus_method_invocation_return_value (invocation,
  2822. -    g_variant_new ("()"));
  2823. -}
  2824. -
  2825. -/**
  2826. - * date_time_mechanism_complete_get_hardware_clock_using_utc:
  2827. - * @object: A #DateTimeMechanism.
  2828. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2829. - * @is_using_utc: Parameter to return.
  2830. - *
  2831. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetHardwareClockUsingUtc">GetHardwareClockUsingUtc()</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.
  2832. - *
  2833. - * This method will free @invocation, you cannot use it afterwards.
  2834. - */
  2835. -void
  2836. -date_time_mechanism_complete_get_hardware_clock_using_utc (
  2837. -    DateTimeMechanism *object,
  2838. -    GDBusMethodInvocation *invocation,
  2839. -    gboolean is_using_utc)
  2840. -{
  2841. -  g_dbus_method_invocation_return_value (invocation,
  2842. -    g_variant_new ("(b)",
  2843. -                   is_using_utc));
  2844. -}
  2845. -
  2846. -/**
  2847. - * date_time_mechanism_complete_set_hardware_clock_using_utc:
  2848. - * @object: A #DateTimeMechanism.
  2849. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2850. - *
  2851. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetHardwareClockUsingUtc">SetHardwareClockUsingUtc()</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.
  2852. - *
  2853. - * This method will free @invocation, you cannot use it afterwards.
  2854. - */
  2855. -void
  2856. -date_time_mechanism_complete_set_hardware_clock_using_utc (
  2857. -    DateTimeMechanism *object,
  2858. -    GDBusMethodInvocation *invocation)
  2859. -{
  2860. -  g_dbus_method_invocation_return_value (invocation,
  2861. -    g_variant_new ("()"));
  2862. -}
  2863. -
  2864. -/**
  2865. - * date_time_mechanism_complete_get_using_ntp:
  2866. - * @object: A #DateTimeMechanism.
  2867. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2868. - * @can_use_ntp: Parameter to return.
  2869. - * @is_using_ntp: Parameter to return.
  2870. - *
  2871. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.GetUsingNtp">GetUsingNtp()</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.
  2872. - *
  2873. - * This method will free @invocation, you cannot use it afterwards.
  2874. - */
  2875. -void
  2876. -date_time_mechanism_complete_get_using_ntp (
  2877. -    DateTimeMechanism *object,
  2878. -    GDBusMethodInvocation *invocation,
  2879. -    gboolean can_use_ntp,
  2880. -    gboolean is_using_ntp)
  2881. -{
  2882. -  g_dbus_method_invocation_return_value (invocation,
  2883. -    g_variant_new ("(bb)",
  2884. -                   can_use_ntp,
  2885. -                   is_using_ntp));
  2886. -}
  2887. -
  2888. -/**
  2889. - * date_time_mechanism_complete_set_using_ntp:
  2890. - * @object: A #DateTimeMechanism.
  2891. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2892. - *
  2893. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.SetUsingNtp">SetUsingNtp()</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.
  2894. - *
  2895. - * This method will free @invocation, you cannot use it afterwards.
  2896. - */
  2897. -void
  2898. -date_time_mechanism_complete_set_using_ntp (
  2899. -    DateTimeMechanism *object,
  2900. -    GDBusMethodInvocation *invocation)
  2901. -{
  2902. -  g_dbus_method_invocation_return_value (invocation,
  2903. -    g_variant_new ("()"));
  2904. -}
  2905. -
  2906. -/**
  2907. - * date_time_mechanism_complete_can_set_using_ntp:
  2908. - * @object: A #DateTimeMechanism.
  2909. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  2910. - * @value: Parameter to return.
  2911. - *
  2912. - * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org.cinnamon.SettingsDaemon-DateTimeMechanism.CanSetUsingNtp">CanSetUsingNtp()</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.
  2913. - *
  2914. - * This method will free @invocation, you cannot use it afterwards.
  2915. - */
  2916. -void
  2917. -date_time_mechanism_complete_can_set_using_ntp (
  2918. -    DateTimeMechanism *object,
  2919. -    GDBusMethodInvocation *invocation,
  2920. -    gint value)
  2921. -{
  2922. -  g_dbus_method_invocation_return_value (invocation,
  2923. -    g_variant_new ("(i)",
  2924. -                   value));
  2925. -}
  2926. -
  2927. -/* ------------------------------------------------------------------------ */
  2928. -
  2929. -/**
  2930. - * DateTimeMechanismProxy:
  2931. - *
  2932. - * The #DateTimeMechanismProxy structure contains only private data and should only be accessed using the provided API.
  2933. - */
  2934. -
  2935. -/**
  2936. - * DateTimeMechanismProxyClass:
  2937. - * @parent_class: The parent class.
  2938. - *
  2939. - * Class structure for #DateTimeMechanismProxy.
  2940. - */
  2941. -
  2942. -static void
  2943. -date_time_mechanism_proxy_iface_init (DateTimeMechanismIface *iface)
  2944. -{
  2945. -}
  2946. -
  2947. -#define date_time_mechanism_proxy_get_type date_time_mechanism_proxy_get_type
  2948. -G_DEFINE_TYPE_WITH_CODE (DateTimeMechanismProxy, date_time_mechanism_proxy, G_TYPE_DBUS_PROXY,
  2949. -                         G_IMPLEMENT_INTERFACE (TYPE_DATE_TIME_MECHANISM, date_time_mechanism_proxy_iface_init));
  2950. -#undef date_time_mechanism_proxy_get_type
  2951. -
  2952. -static void
  2953. -date_time_mechanism_proxy_get_property (GObject      *object,
  2954. -  guint         prop_id,
  2955. -  GValue       *value,
  2956. -  GParamSpec   *pspec)
  2957. -{
  2958. -}
  2959. -
  2960. -static void
  2961. -date_time_mechanism_proxy_set_property (GObject      *object,
  2962. -  guint         prop_id,
  2963. -  const GValue *value,
  2964. -  GParamSpec   *pspec)
  2965. -{
  2966. -}
  2967. -
  2968. -static void
  2969. -date_time_mechanism_proxy_g_signal (GDBusProxy *proxy,
  2970. -  const gchar *sender_name,
  2971. -  const gchar *signal_name,
  2972. -  GVariant *parameters)
  2973. -{
  2974. -  _ExtendedGDBusSignalInfo *info;
  2975. -  GVariantIter iter;
  2976. -  GVariant *child;
  2977. -  GValue *paramv;
  2978. -  guint num_params;
  2979. -  guint n;
  2980. -  guint signal_id;
  2981. -  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_date_time_mechanism_interface_info, signal_name);
  2982. -  if (info == NULL)
  2983. -    return;
  2984. -  num_params = g_variant_n_children (parameters);
  2985. -  paramv = g_new0 (GValue, num_params + 1);
  2986. -  g_value_init (&paramv[0], TYPE_DATE_TIME_MECHANISM);
  2987. -  g_value_set_object (&paramv[0], proxy);
  2988. -  g_variant_iter_init (&iter, parameters);
  2989. -  n = 1;
  2990. -  while ((child = g_variant_iter_next_value (&iter)) != NULL)
  2991. -    {
  2992. -      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
  2993. -      if (arg_info->use_gvariant)
  2994. -        {
  2995. -          g_value_init (&paramv[n], G_TYPE_VARIANT);
  2996. -          g_value_set_variant (&paramv[n], child);
  2997. -          n++;
  2998. -        }
  2999. -      else
  3000. -        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
  3001. -      g_variant_unref (child);
  3002. -    }
  3003. -  signal_id = g_signal_lookup (info->signal_name, TYPE_DATE_TIME_MECHANISM);
  3004. -  g_signal_emitv (paramv, signal_id, 0, NULL);
  3005. -  for (n = 0; n < num_params + 1; n++)
  3006. -    g_value_unset (&paramv[n]);
  3007. -  g_free (paramv);
  3008. -}
  3009. -
  3010. -static void
  3011. -date_time_mechanism_proxy_g_properties_changed (GDBusProxy *proxy,
  3012. -  GVariant *changed_properties,
  3013. -  const gchar *const *invalidated_properties)
  3014. -{
  3015. -  guint n;
  3016. -  const gchar *key;
  3017. -  GVariantIter *iter;
  3018. -  _ExtendedGDBusPropertyInfo *info;
  3019. -  g_variant_get (changed_properties, "a{sv}", &iter);
  3020. -  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
  3021. -    {
  3022. -      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_date_time_mechanism_interface_info, key);
  3023. -      if (info != NULL)
  3024. -        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
  3025. -    }
  3026. -  g_variant_iter_free (iter);
  3027. -  for (n = 0; invalidated_properties[n] != NULL; n++)
  3028. -    {
  3029. -      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_date_time_mechanism_interface_info, invalidated_properties[n]);
  3030. -      if (info != NULL)
  3031. -        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
  3032. -    }
  3033. -}
  3034. -
  3035. -static void
  3036. -date_time_mechanism_proxy_init (DateTimeMechanismProxy *proxy)
  3037. -{
  3038. -  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), date_time_mechanism_interface_info ());
  3039. -}
  3040. -
  3041. -static void
  3042. -date_time_mechanism_proxy_class_init (DateTimeMechanismProxyClass *klass)
  3043. -{
  3044. -  GObjectClass *gobject_class;
  3045. -  GDBusProxyClass *proxy_class;
  3046. -
  3047. -  gobject_class = G_OBJECT_CLASS (klass);
  3048. -  gobject_class->get_property = date_time_mechanism_proxy_get_property;
  3049. -  gobject_class->set_property = date_time_mechanism_proxy_set_property;
  3050. -
  3051. -  proxy_class = G_DBUS_PROXY_CLASS (klass);
  3052. -  proxy_class->g_signal = date_time_mechanism_proxy_g_signal;
  3053. -  proxy_class->g_properties_changed = date_time_mechanism_proxy_g_properties_changed;
  3054. -
  3055. -}
  3056. -
  3057. -/**
  3058. - * date_time_mechanism_proxy_new:
  3059. - * @connection: A #GDBusConnection.
  3060. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  3061. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  3062. - * @object_path: An object path.
  3063. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  3064. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  3065. - * @user_data: User data to pass to @callback.
  3066. - *
  3067. - * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link>. See g_dbus_proxy_new() for more details.
  3068. - *
  3069. - * 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.
  3070. - * You can then call date_time_mechanism_proxy_new_finish() to get the result of the operation.
  3071. - *
  3072. - * See date_time_mechanism_proxy_new_sync() for the synchronous, blocking version of this constructor.
  3073. - */
  3074. -void
  3075. -date_time_mechanism_proxy_new (
  3076. -    GDBusConnection     *connection,
  3077. -    GDBusProxyFlags      flags,
  3078. -    const gchar         *name,
  3079. -    const gchar         *object_path,
  3080. -    GCancellable        *cancellable,
  3081. -    GAsyncReadyCallback  callback,
  3082. -    gpointer             user_data)
  3083. -{
  3084. -  g_async_initable_new_async (TYPE_DATE_TIME_MECHANISM_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.cinnamon.SettingsDaemon.DateTimeMechanism", NULL);
  3085. -}
  3086. -
  3087. -/**
  3088. - * date_time_mechanism_proxy_new_finish:
  3089. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_proxy_new().
  3090. - * @error: Return location for error or %NULL
  3091. - *
  3092. - * Finishes an operation started with date_time_mechanism_proxy_new().
  3093. - *
  3094. - * Returns: (transfer full) (type DateTimeMechanismProxy): The constructed proxy object or %NULL if @error is set.
  3095. - */
  3096. -DateTimeMechanism *
  3097. -date_time_mechanism_proxy_new_finish (
  3098. -    GAsyncResult        *res,
  3099. -    GError             **error)
  3100. -{
  3101. -  GObject *ret;
  3102. -  GObject *source_object;
  3103. -  source_object = g_async_result_get_source_object (res);
  3104. -  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  3105. -  g_object_unref (source_object);
  3106. -  if (ret != NULL)
  3107. -    return DATE_TIME_MECHANISM (ret);
  3108. -  else
  3109. -    return NULL;
  3110. -}
  3111. -
  3112. -/**
  3113. - * date_time_mechanism_proxy_new_sync:
  3114. - * @connection: A #GDBusConnection.
  3115. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  3116. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  3117. - * @object_path: An object path.
  3118. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  3119. - * @error: Return location for error or %NULL
  3120. - *
  3121. - * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link>. See g_dbus_proxy_new_sync() for more details.
  3122. - *
  3123. - * The calling thread is blocked until a reply is received.
  3124. - *
  3125. - * See date_time_mechanism_proxy_new() for the asynchronous version of this constructor.
  3126. - *
  3127. - * Returns: (transfer full) (type DateTimeMechanismProxy): The constructed proxy object or %NULL if @error is set.
  3128. - */
  3129. -DateTimeMechanism *
  3130. -date_time_mechanism_proxy_new_sync (
  3131. -    GDBusConnection     *connection,
  3132. -    GDBusProxyFlags      flags,
  3133. -    const gchar         *name,
  3134. -    const gchar         *object_path,
  3135. -    GCancellable        *cancellable,
  3136. -    GError             **error)
  3137. -{
  3138. -  GInitable *ret;
  3139. -  ret = g_initable_new (TYPE_DATE_TIME_MECHANISM_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.cinnamon.SettingsDaemon.DateTimeMechanism", NULL);
  3140. -  if (ret != NULL)
  3141. -    return DATE_TIME_MECHANISM (ret);
  3142. -  else
  3143. -    return NULL;
  3144. -}
  3145. -
  3146. -
  3147. -/**
  3148. - * date_time_mechanism_proxy_new_for_bus:
  3149. - * @bus_type: A #GBusType.
  3150. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  3151. - * @name: A bus name (well-known or unique).
  3152. - * @object_path: An object path.
  3153. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  3154. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  3155. - * @user_data: User data to pass to @callback.
  3156. - *
  3157. - * Like date_time_mechanism_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  3158. - *
  3159. - * 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.
  3160. - * You can then call date_time_mechanism_proxy_new_for_bus_finish() to get the result of the operation.
  3161. - *
  3162. - * See date_time_mechanism_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
  3163. - */
  3164. -void
  3165. -date_time_mechanism_proxy_new_for_bus (
  3166. -    GBusType             bus_type,
  3167. -    GDBusProxyFlags      flags,
  3168. -    const gchar         *name,
  3169. -    const gchar         *object_path,
  3170. -    GCancellable        *cancellable,
  3171. -    GAsyncReadyCallback  callback,
  3172. -    gpointer             user_data)
  3173. -{
  3174. -  g_async_initable_new_async (TYPE_DATE_TIME_MECHANISM_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.cinnamon.SettingsDaemon.DateTimeMechanism", NULL);
  3175. -}
  3176. -
  3177. -/**
  3178. - * date_time_mechanism_proxy_new_for_bus_finish:
  3179. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to date_time_mechanism_proxy_new_for_bus().
  3180. - * @error: Return location for error or %NULL
  3181. - *
  3182. - * Finishes an operation started with date_time_mechanism_proxy_new_for_bus().
  3183. - *
  3184. - * Returns: (transfer full) (type DateTimeMechanismProxy): The constructed proxy object or %NULL if @error is set.
  3185. - */
  3186. -DateTimeMechanism *
  3187. -date_time_mechanism_proxy_new_for_bus_finish (
  3188. -    GAsyncResult        *res,
  3189. -    GError             **error)
  3190. -{
  3191. -  GObject *ret;
  3192. -  GObject *source_object;
  3193. -  source_object = g_async_result_get_source_object (res);
  3194. -  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  3195. -  g_object_unref (source_object);
  3196. -  if (ret != NULL)
  3197. -    return DATE_TIME_MECHANISM (ret);
  3198. -  else
  3199. -    return NULL;
  3200. -}
  3201. -
  3202. -/**
  3203. - * date_time_mechanism_proxy_new_for_bus_sync:
  3204. - * @bus_type: A #GBusType.
  3205. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  3206. - * @name: A bus name (well-known or unique).
  3207. - * @object_path: An object path.
  3208. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  3209. - * @error: Return location for error or %NULL
  3210. - *
  3211. - * Like date_time_mechanism_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
  3212. - *
  3213. - * The calling thread is blocked until a reply is received.
  3214. - *
  3215. - * See date_time_mechanism_proxy_new_for_bus() for the asynchronous version of this constructor.
  3216. - *
  3217. - * Returns: (transfer full) (type DateTimeMechanismProxy): The constructed proxy object or %NULL if @error is set.
  3218. - */
  3219. -DateTimeMechanism *
  3220. -date_time_mechanism_proxy_new_for_bus_sync (
  3221. -    GBusType             bus_type,
  3222. -    GDBusProxyFlags      flags,
  3223. -    const gchar         *name,
  3224. -    const gchar         *object_path,
  3225. -    GCancellable        *cancellable,
  3226. -    GError             **error)
  3227. -{
  3228. -  GInitable *ret;
  3229. -  ret = g_initable_new (TYPE_DATE_TIME_MECHANISM_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.cinnamon.SettingsDaemon.DateTimeMechanism", NULL);
  3230. -  if (ret != NULL)
  3231. -    return DATE_TIME_MECHANISM (ret);
  3232. -  else
  3233. -    return NULL;
  3234. -}
  3235. -
  3236. -
  3237. -/* ------------------------------------------------------------------------ */
  3238. -
  3239. -/**
  3240. - * DateTimeMechanismSkeleton:
  3241. - *
  3242. - * The #DateTimeMechanismSkeleton structure contains only private data and should only be accessed using the provided API.
  3243. - */
  3244. -
  3245. -/**
  3246. - * DateTimeMechanismSkeletonClass:
  3247. - * @parent_class: The parent class.
  3248. - *
  3249. - * Class structure for #DateTimeMechanismSkeleton.
  3250. - */
  3251. -
  3252. -struct _DateTimeMechanismSkeletonPrivate
  3253. -{
  3254. -  GValueArray *properties;
  3255. -  GList *changed_properties;
  3256. -  GSource *changed_properties_idle_source;
  3257. -  GMainContext *context;
  3258. -  GMutex *lock;
  3259. -};
  3260. -
  3261. -static void
  3262. -_date_time_mechanism_skeleton_handle_method_call (
  3263. -  GDBusConnection *connection,
  3264. -  const gchar *sender,
  3265. -  const gchar *object_path,
  3266. -  const gchar *interface_name,
  3267. -  const gchar *method_name,
  3268. -  GVariant *parameters,
  3269. -  GDBusMethodInvocation *invocation,
  3270. -  gpointer user_data)
  3271. -{
  3272. -  DateTimeMechanismSkeleton *skeleton = DATE_TIME_MECHANISM_SKELETON (user_data);
  3273. -  _ExtendedGDBusMethodInfo *info;
  3274. -  GVariantIter iter;
  3275. -  GVariant *child;
  3276. -  GValue *paramv;
  3277. -  guint num_params;
  3278. -  guint n;
  3279. -  guint signal_id;
  3280. -  GValue return_value = {0};
  3281. -  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  3282. -  g_assert (info != NULL);
  3283. -  num_params = g_variant_n_children (parameters);
  3284. -  paramv = g_new0 (GValue, num_params + 2);
  3285. -  g_value_init (&paramv[0], TYPE_DATE_TIME_MECHANISM);
  3286. -  g_value_set_object (&paramv[0], skeleton);
  3287. -  g_value_init (&paramv[1], G_TYPE_DBUS_METHOD_INVOCATION);
  3288. -  g_value_set_object (&paramv[1], invocation);
  3289. -  g_variant_iter_init (&iter, parameters);
  3290. -  n = 2;
  3291. -  while ((child = g_variant_iter_next_value (&iter)) != NULL)
  3292. -    {
  3293. -      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - 2];
  3294. -      if (arg_info->use_gvariant)
  3295. -        {
  3296. -          g_value_init (&paramv[n], G_TYPE_VARIANT);
  3297. -          g_value_set_variant (&paramv[n], child);
  3298. -          n++;
  3299. -        }
  3300. -      else
  3301. -        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
  3302. -      g_variant_unref (child);
  3303. -    }
  3304. -  signal_id = g_signal_lookup (info->signal_name, TYPE_DATE_TIME_MECHANISM);
  3305. -  g_value_init (&return_value, G_TYPE_BOOLEAN);
  3306. -  g_signal_emitv (paramv, signal_id, 0, &return_value);
  3307. -  if (!g_value_get_boolean (&return_value))
  3308. -    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);
  3309. -  g_value_unset (&return_value);
  3310. -  for (n = 0; n < num_params + 2; n++)
  3311. -    g_value_unset (&paramv[n]);
  3312. -  g_free (paramv);
  3313. -}
  3314. -
  3315. -static GVariant *
  3316. -_date_time_mechanism_skeleton_handle_get_property (
  3317. -  GDBusConnection *connection,
  3318. -  const gchar *sender,
  3319. -  const gchar *object_path,
  3320. -  const gchar *interface_name,
  3321. -  const gchar *property_name,
  3322. -  GError **error,
  3323. -  gpointer user_data)
  3324. -{
  3325. -  DateTimeMechanismSkeleton *skeleton = DATE_TIME_MECHANISM_SKELETON (user_data);
  3326. -  GValue value = {0};
  3327. -  GParamSpec *pspec;
  3328. -  _ExtendedGDBusPropertyInfo *info;
  3329. -  GVariant *ret;
  3330. -  ret = NULL;
  3331. -  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_date_time_mechanism_interface_info, property_name);
  3332. -  g_assert (info != NULL);
  3333. -  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  3334. -  if (pspec == NULL)
  3335. -    {
  3336. -      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
  3337. -    }
  3338. -  else
  3339. -    {
  3340. -      g_value_init (&value, pspec->value_type);
  3341. -      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
  3342. -      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
  3343. -      g_value_unset (&value);
  3344. -    }
  3345. -  return ret;
  3346. -}
  3347. -
  3348. -static gboolean
  3349. -_date_time_mechanism_skeleton_handle_set_property (
  3350. -  GDBusConnection *connection,
  3351. -  const gchar *sender,
  3352. -  const gchar *object_path,
  3353. -  const gchar *interface_name,
  3354. -  const gchar *property_name,
  3355. -  GVariant *variant,
  3356. -  GError **error,
  3357. -  gpointer user_data)
  3358. -{
  3359. -  DateTimeMechanismSkeleton *skeleton = DATE_TIME_MECHANISM_SKELETON (user_data);
  3360. -  GValue value = {0};
  3361. -  GParamSpec *pspec;
  3362. -  _ExtendedGDBusPropertyInfo *info;
  3363. -  gboolean ret;
  3364. -  ret = FALSE;
  3365. -  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_date_time_mechanism_interface_info, property_name);
  3366. -  g_assert (info != NULL);
  3367. -  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  3368. -  if (pspec == NULL)
  3369. -    {
  3370. -      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
  3371. -    }
  3372. -  else
  3373. -    {
  3374. -      if (info->use_gvariant)
  3375. -        g_value_set_variant (&value, variant);
  3376. -      else
  3377. -        g_dbus_gvariant_to_gvalue (variant, &value);
  3378. -      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
  3379. -      g_value_unset (&value);
  3380. -      ret = TRUE;
  3381. -    }
  3382. -  return ret;
  3383. -}
  3384. -
  3385. -static const GDBusInterfaceVTable _date_time_mechanism_skeleton_vtable =
  3386. -{
  3387. -  _date_time_mechanism_skeleton_handle_method_call,
  3388. -  _date_time_mechanism_skeleton_handle_get_property,
  3389. -  _date_time_mechanism_skeleton_handle_set_property
  3390. -};
  3391. -
  3392. -static GDBusInterfaceInfo *
  3393. -date_time_mechanism_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
  3394. -{
  3395. -  return date_time_mechanism_interface_info ();
  3396. -}
  3397. -
  3398. -static GDBusInterfaceVTable *
  3399. -date_time_mechanism_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
  3400. -{
  3401. -  return (GDBusInterfaceVTable *) &_date_time_mechanism_skeleton_vtable;
  3402. -}
  3403. -
  3404. -static GVariant *
  3405. -date_time_mechanism_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
  3406. -{
  3407. -  DateTimeMechanismSkeleton *skeleton = DATE_TIME_MECHANISM_SKELETON (_skeleton);
  3408. -
  3409. -  GVariantBuilder builder;
  3410. -  guint n;
  3411. -  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  3412. -  if (_date_time_mechanism_interface_info.parent_struct.properties == NULL)
  3413. -    goto out;
  3414. -  for (n = 0; _date_time_mechanism_interface_info.parent_struct.properties[n] != NULL; n++)
  3415. -    {
  3416. -      GDBusPropertyInfo *info = _date_time_mechanism_interface_info.parent_struct.properties[n];
  3417. -      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
  3418. -        {
  3419. -          GVariant *value;
  3420. -          value = _date_time_mechanism_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.cinnamon.SettingsDaemon.DateTimeMechanism", info->name, NULL, skeleton);
  3421. -          if (value != NULL)
  3422. -            {
  3423. -              if (g_variant_is_floating (value))
  3424. -                g_variant_ref_sink (value);
  3425. -              g_variant_builder_add (&builder, "{sv}", info->name, value);
  3426. -              g_variant_unref (value);
  3427. -            }
  3428. -        }
  3429. -    }
  3430. -out:
  3431. -  return g_variant_builder_end (&builder);
  3432. -}
  3433. -
  3434. -static void
  3435. -date_time_mechanism_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
  3436. -{
  3437. -}
  3438. -
  3439. -static void
  3440. -date_time_mechanism_skeleton_iface_init (DateTimeMechanismIface *iface)
  3441. -{
  3442. -}
  3443. -
  3444. -#define date_time_mechanism_skeleton_get_type date_time_mechanism_skeleton_get_type
  3445. -G_DEFINE_TYPE_WITH_CODE (DateTimeMechanismSkeleton, date_time_mechanism_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
  3446. -                         G_IMPLEMENT_INTERFACE (TYPE_DATE_TIME_MECHANISM, date_time_mechanism_skeleton_iface_init));
  3447. -#undef date_time_mechanism_skeleton_get_type
  3448. -
  3449. -static void
  3450. -date_time_mechanism_skeleton_finalize (GObject *object)
  3451. -{
  3452. -  DateTimeMechanismSkeleton *skeleton = DATE_TIME_MECHANISM_SKELETON (object);
  3453. -  g_list_foreach (skeleton->priv->changed_properties, (GFunc) _changed_property_free, NULL);
  3454. -  g_list_free (skeleton->priv->changed_properties);
  3455. -  if (skeleton->priv->changed_properties_idle_source != NULL)
  3456. -    g_source_destroy (skeleton->priv->changed_properties_idle_source);
  3457. -  if (skeleton->priv->context != NULL)
  3458. -    g_main_context_unref (skeleton->priv->context);
  3459. -  g_mutex_free (skeleton->priv->lock);
  3460. -  G_OBJECT_CLASS (date_time_mechanism_skeleton_parent_class)->finalize (object);
  3461. -}
  3462. -
  3463. -static void
  3464. -date_time_mechanism_skeleton_init (DateTimeMechanismSkeleton *skeleton)
  3465. -{
  3466. -  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_DATE_TIME_MECHANISM_SKELETON, DateTimeMechanismSkeletonPrivate);
  3467. -  skeleton->priv->lock = g_mutex_new ();
  3468. -  skeleton->priv->context = g_main_context_get_thread_default ();
  3469. -  if (skeleton->priv->context != NULL)
  3470. -    g_main_context_ref (skeleton->priv->context);
  3471. -}
  3472. -
  3473. -static void
  3474. -date_time_mechanism_skeleton_class_init (DateTimeMechanismSkeletonClass *klass)
  3475. -{
  3476. -  GObjectClass *gobject_class;
  3477. -  GDBusInterfaceSkeletonClass *skeleton_class;
  3478. -
  3479. -  g_type_class_add_private (klass, sizeof (DateTimeMechanismSkeletonPrivate));
  3480. -
  3481. -  gobject_class = G_OBJECT_CLASS (klass);
  3482. -  gobject_class->finalize = date_time_mechanism_skeleton_finalize;
  3483. -
  3484. -  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  3485. -  skeleton_class->get_info = date_time_mechanism_skeleton_dbus_interface_get_info;
  3486. -  skeleton_class->get_properties = date_time_mechanism_skeleton_dbus_interface_get_properties;
  3487. -  skeleton_class->flush = date_time_mechanism_skeleton_dbus_interface_flush;
  3488. -  skeleton_class->get_vtable = date_time_mechanism_skeleton_dbus_interface_get_vtable;
  3489. -}
  3490. -
  3491. -/**
  3492. - * date_time_mechanism_skeleton_new:
  3493. - *
  3494. - * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org.cinnamon.SettingsDaemon-DateTimeMechanism.top_of_page">org.cinnamon.SettingsDaemon.DateTimeMechanism</link>.
  3495. - *
  3496. - * Returns: (transfer full) (type DateTimeMechanismSkeleton): The skeleton object.
  3497. - */
  3498. -DateTimeMechanism *
  3499. -date_time_mechanism_skeleton_new (void)
  3500. -{
  3501. -  return DATE_TIME_MECHANISM (g_object_new (TYPE_DATE_TIME_MECHANISM_SKELETON, NULL));
  3502. -}
  3503. -
  3504. diff --git a/panels/datetime/dtm.h b/panels/datetime/dtm.h
  3505. deleted file mode 100644
  3506. index 2b30643..0000000
  3507. --- a/panels/datetime/dtm.h
  3508. +++ /dev/null
  3509. @@ -1,475 +0,0 @@
  3510. -/*
  3511. - * Generated by gdbus-codegen 2.29.5. DO NOT EDIT.
  3512. - *
  3513. - * The license of this code is the same as for the source it was derived from.
  3514. - */
  3515. -
  3516. -#ifndef __DTM_H__
  3517. -#define __DTM_H__
  3518. -
  3519. -#include <gio/gio.h>
  3520. -
  3521. -G_BEGIN_DECLS
  3522. -
  3523. -
  3524. -/* ------------------------------------------------------------------------ */
  3525. -/* Declarations for org.cinnamon.SettingsDaemon.DateTimeMechanism */
  3526. -
  3527. -#define TYPE_DATE_TIME_MECHANISM (date_time_mechanism_get_type ())
  3528. -#define DATE_TIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DATE_TIME_MECHANISM, DateTimeMechanism))
  3529. -#define IS_DATE_TIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DATE_TIME_MECHANISM))
  3530. -#define DATE_TIME_MECHANISM_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_DATE_TIME_MECHANISM, DateTimeMechanism))
  3531. -
  3532. -struct _DateTimeMechanism;
  3533. -typedef struct _DateTimeMechanism DateTimeMechanism;
  3534. -typedef struct _DateTimeMechanismIface DateTimeMechanismIface;
  3535. -
  3536. -struct _DateTimeMechanismIface
  3537. -{
  3538. -  GTypeInterface parent_iface;
  3539. -
  3540. -  gboolean (*handle_adjust_time) (
  3541. -    DateTimeMechanism *object,
  3542. -    GDBusMethodInvocation *invocation,
  3543. -    gint64 seconds_to_add);
  3544. -
  3545. -  gboolean (*handle_can_set_time) (
  3546. -    DateTimeMechanism *object,
  3547. -    GDBusMethodInvocation *invocation);
  3548. -
  3549. -  gboolean (*handle_can_set_timezone) (
  3550. -    DateTimeMechanism *object,
  3551. -    GDBusMethodInvocation *invocation);
  3552. -
  3553. -  gboolean (*handle_can_set_using_ntp) (
  3554. -    DateTimeMechanism *object,
  3555. -    GDBusMethodInvocation *invocation);
  3556. -
  3557. -  gboolean (*handle_get_hardware_clock_using_utc) (
  3558. -    DateTimeMechanism *object,
  3559. -    GDBusMethodInvocation *invocation);
  3560. -
  3561. -  gboolean (*handle_get_timezone) (
  3562. -    DateTimeMechanism *object,
  3563. -    GDBusMethodInvocation *invocation);
  3564. -
  3565. -  gboolean (*handle_get_using_ntp) (
  3566. -    DateTimeMechanism *object,
  3567. -    GDBusMethodInvocation *invocation);
  3568. -
  3569. -  gboolean (*handle_set_date) (
  3570. -    DateTimeMechanism *object,
  3571. -    GDBusMethodInvocation *invocation,
  3572. -    guint day,
  3573. -    guint month,
  3574. -    guint year);
  3575. -
  3576. -  gboolean (*handle_set_hardware_clock_using_utc) (
  3577. -    DateTimeMechanism *object,
  3578. -    GDBusMethodInvocation *invocation,
  3579. -    gboolean is_using_utc);
  3580. -
  3581. -  gboolean (*handle_set_time) (
  3582. -    DateTimeMechanism *object,
  3583. -    GDBusMethodInvocation *invocation,
  3584. -    gint64 seconds_since_epoch);
  3585. -
  3586. -  gboolean (*handle_set_timezone) (
  3587. -    DateTimeMechanism *object,
  3588. -    GDBusMethodInvocation *invocation,
  3589. -    const gchar *tz);
  3590. -
  3591. -  gboolean (*handle_set_using_ntp) (
  3592. -    DateTimeMechanism *object,
  3593. -    GDBusMethodInvocation *invocation,
  3594. -    gboolean is_using_ntp);
  3595. -
  3596. -};
  3597. -
  3598. -GType date_time_mechanism_get_type (void) G_GNUC_CONST;
  3599. -
  3600. -GDBusInterfaceInfo *date_time_mechanism_interface_info (void);
  3601. -
  3602. -
  3603. -/* D-Bus method call completion functions: */
  3604. -void date_time_mechanism_complete_set_timezone (
  3605. -    DateTimeMechanism *object,
  3606. -    GDBusMethodInvocation *invocation);
  3607. -
  3608. -void date_time_mechanism_complete_get_timezone (
  3609. -    DateTimeMechanism *object,
  3610. -    GDBusMethodInvocation *invocation,
  3611. -    const gchar *timezone);
  3612. -
  3613. -void date_time_mechanism_complete_can_set_timezone (
  3614. -    DateTimeMechanism *object,
  3615. -    GDBusMethodInvocation *invocation,
  3616. -    gint value);
  3617. -
  3618. -void date_time_mechanism_complete_set_date (
  3619. -    DateTimeMechanism *object,
  3620. -    GDBusMethodInvocation *invocation);
  3621. -
  3622. -void date_time_mechanism_complete_set_time (
  3623. -    DateTimeMechanism *object,
  3624. -    GDBusMethodInvocation *invocation);
  3625. -
  3626. -void date_time_mechanism_complete_can_set_time (
  3627. -    DateTimeMechanism *object,
  3628. -    GDBusMethodInvocation *invocation,
  3629. -    gint value);
  3630. -
  3631. -void date_time_mechanism_complete_adjust_time (
  3632. -    DateTimeMechanism *object,
  3633. -    GDBusMethodInvocation *invocation);
  3634. -
  3635. -void date_time_mechanism_complete_get_hardware_clock_using_utc (
  3636. -    DateTimeMechanism *object,
  3637. -    GDBusMethodInvocation *invocation,
  3638. -    gboolean is_using_utc);
  3639. -
  3640. -void date_time_mechanism_complete_set_hardware_clock_using_utc (
  3641. -    DateTimeMechanism *object,
  3642. -    GDBusMethodInvocation *invocation);
  3643. -
  3644. -void date_time_mechanism_complete_get_using_ntp (
  3645. -    DateTimeMechanism *object,
  3646. -    GDBusMethodInvocation *invocation,
  3647. -    gboolean can_use_ntp,
  3648. -    gboolean is_using_ntp);
  3649. -
  3650. -void date_time_mechanism_complete_set_using_ntp (
  3651. -    DateTimeMechanism *object,
  3652. -    GDBusMethodInvocation *invocation);
  3653. -
  3654. -void date_time_mechanism_complete_can_set_using_ntp (
  3655. -    DateTimeMechanism *object,
  3656. -    GDBusMethodInvocation *invocation,
  3657. -    gint value);
  3658. -
  3659. -
  3660. -
  3661. -/* D-Bus method calls: */
  3662. -void date_time_mechanism_call_set_timezone (
  3663. -    DateTimeMechanism *proxy,
  3664. -    const gchar *tz,
  3665. -    GCancellable *cancellable,
  3666. -    GAsyncReadyCallback callback,
  3667. -    gpointer user_data);
  3668. -
  3669. -gboolean date_time_mechanism_call_set_timezone_finish (
  3670. -    DateTimeMechanism *proxy,
  3671. -    GAsyncResult *res,
  3672. -    GError **error);
  3673. -
  3674. -gboolean date_time_mechanism_call_set_timezone_sync (
  3675. -    DateTimeMechanism *proxy,
  3676. -    const gchar *tz,
  3677. -    GCancellable *cancellable,
  3678. -    GError **error);
  3679. -
  3680. -void date_time_mechanism_call_get_timezone (
  3681. -    DateTimeMechanism *proxy,
  3682. -    GCancellable *cancellable,
  3683. -    GAsyncReadyCallback callback,
  3684. -    gpointer user_data);
  3685. -
  3686. -gboolean date_time_mechanism_call_get_timezone_finish (
  3687. -    DateTimeMechanism *proxy,
  3688. -    gchar **out_timezone,
  3689. -    GAsyncResult *res,
  3690. -    GError **error);
  3691. -
  3692. -gboolean date_time_mechanism_call_get_timezone_sync (
  3693. -    DateTimeMechanism *proxy,
  3694. -    gchar **out_timezone,
  3695. -    GCancellable *cancellable,
  3696. -    GError **error);
  3697. -
  3698. -void date_time_mechanism_call_can_set_timezone (
  3699. -    DateTimeMechanism *proxy,
  3700. -    GCancellable *cancellable,
  3701. -    GAsyncReadyCallback callback,
  3702. -    gpointer user_data);
  3703. -
  3704. -gboolean date_time_mechanism_call_can_set_timezone_finish (
  3705. -    DateTimeMechanism *proxy,
  3706. -    gint *out_value,
  3707. -    GAsyncResult *res,
  3708. -    GError **error);
  3709. -
  3710. -gboolean date_time_mechanism_call_can_set_timezone_sync (
  3711. -    DateTimeMechanism *proxy,
  3712. -    gint *out_value,
  3713. -    GCancellable *cancellable,
  3714. -    GError **error);
  3715. -
  3716. -void date_time_mechanism_call_set_date (
  3717. -    DateTimeMechanism *proxy,
  3718. -    guint day,
  3719. -    guint month,
  3720. -    guint year,
  3721. -    GCancellable *cancellable,
  3722. -    GAsyncReadyCallback callback,
  3723. -    gpointer user_data);
  3724. -
  3725. -gboolean date_time_mechanism_call_set_date_finish (
  3726. -    DateTimeMechanism *proxy,
  3727. -    GAsyncResult *res,
  3728. -    GError **error);
  3729. -
  3730. -gboolean date_time_mechanism_call_set_date_sync (
  3731. -    DateTimeMechanism *proxy,
  3732. -    guint day,
  3733. -    guint month,
  3734. -    guint year,
  3735. -    GCancellable *cancellable,
  3736. -    GError **error);
  3737. -
  3738. -void date_time_mechanism_call_set_time (
  3739. -    DateTimeMechanism *proxy,
  3740. -    gint64 seconds_since_epoch,
  3741. -    GCancellable *cancellable,
  3742. -    GAsyncReadyCallback callback,
  3743. -    gpointer user_data);
  3744. -
  3745. -gboolean date_time_mechanism_call_set_time_finish (
  3746. -    DateTimeMechanism *proxy,
  3747. -    GAsyncResult *res,
  3748. -    GError **error);
  3749. -
  3750. -gboolean date_time_mechanism_call_set_time_sync (
  3751. -    DateTimeMechanism *proxy,
  3752. -    gint64 seconds_since_epoch,
  3753. -    GCancellable *cancellable,
  3754. -    GError **error);
  3755. -
  3756. -void date_time_mechanism_call_can_set_time (
  3757. -    DateTimeMechanism *proxy,
  3758. -    GCancellable *cancellable,
  3759. -    GAsyncReadyCallback callback,
  3760. -    gpointer user_data);
  3761. -
  3762. -gboolean date_time_mechanism_call_can_set_time_finish (
  3763. -    DateTimeMechanism *proxy,
  3764. -    gint *out_value,
  3765. -    GAsyncResult *res,
  3766. -    GError **error);
  3767. -
  3768. -gboolean date_time_mechanism_call_can_set_time_sync (
  3769. -    DateTimeMechanism *proxy,
  3770. -    gint *out_value,
  3771. -    GCancellable *cancellable,
  3772. -    GError **error);
  3773. -
  3774. -void date_time_mechanism_call_adjust_time (
  3775. -    DateTimeMechanism *proxy,
  3776. -    gint64 seconds_to_add,
  3777. -    GCancellable *cancellable,
  3778. -    GAsyncReadyCallback callback,
  3779. -    gpointer user_data);
  3780. -
  3781. -gboolean date_time_mechanism_call_adjust_time_finish (
  3782. -    DateTimeMechanism *proxy,
  3783. -    GAsyncResult *res,
  3784. -    GError **error);
  3785. -
  3786. -gboolean date_time_mechanism_call_adjust_time_sync (
  3787. -    DateTimeMechanism *proxy,
  3788. -    gint64 seconds_to_add,
  3789. -    GCancellable *cancellable,
  3790. -    GError **error);
  3791. -
  3792. -void date_time_mechanism_call_get_hardware_clock_using_utc (
  3793. -    DateTimeMechanism *proxy,
  3794. -    GCancellable *cancellable,
  3795. -    GAsyncReadyCallback callback,
  3796. -    gpointer user_data);
  3797. -
  3798. -gboolean date_time_mechanism_call_get_hardware_clock_using_utc_finish (
  3799. -    DateTimeMechanism *proxy,
  3800. -    gboolean *out_is_using_utc,
  3801. -    GAsyncResult *res,
  3802. -    GError **error);
  3803. -
  3804. -gboolean date_time_mechanism_call_get_hardware_clock_using_utc_sync (
  3805. -    DateTimeMechanism *proxy,
  3806. -    gboolean *out_is_using_utc,
  3807. -    GCancellable *cancellable,
  3808. -    GError **error);
  3809. -
  3810. -void date_time_mechanism_call_set_hardware_clock_using_utc (
  3811. -    DateTimeMechanism *proxy,
  3812. -    gboolean is_using_utc,
  3813. -    GCancellable *cancellable,
  3814. -    GAsyncReadyCallback callback,
  3815. -    gpointer user_data);
  3816. -
  3817. -gboolean date_time_mechanism_call_set_hardware_clock_using_utc_finish (
  3818. -    DateTimeMechanism *proxy,
  3819. -    GAsyncResult *res,
  3820. -    GError **error);
  3821. -
  3822. -gboolean date_time_mechanism_call_set_hardware_clock_using_utc_sync (
  3823. -    DateTimeMechanism *proxy,
  3824. -    gboolean is_using_utc,
  3825. -    GCancellable *cancellable,
  3826. -    GError **error);
  3827. -
  3828. -void date_time_mechanism_call_get_using_ntp (
  3829. -    DateTimeMechanism *proxy,
  3830. -    GCancellable *cancellable,
  3831. -    GAsyncReadyCallback callback,
  3832. -    gpointer user_data);
  3833. -
  3834. -gboolean date_time_mechanism_call_get_using_ntp_finish (
  3835. -    DateTimeMechanism *proxy,
  3836. -    gboolean *out_can_use_ntp,
  3837. -    gboolean *out_is_using_ntp,
  3838. -    GAsyncResult *res,
  3839. -    GError **error);
  3840. -
  3841. -gboolean date_time_mechanism_call_get_using_ntp_sync (
  3842. -    DateTimeMechanism *proxy,
  3843. -    gboolean *out_can_use_ntp,
  3844. -    gboolean *out_is_using_ntp,
  3845. -    GCancellable *cancellable,
  3846. -    GError **error);
  3847. -
  3848. -void date_time_mechanism_call_set_using_ntp (
  3849. -    DateTimeMechanism *proxy,
  3850. -    gboolean is_using_ntp,
  3851. -    GCancellable *cancellable,
  3852. -    GAsyncReadyCallback callback,
  3853. -    gpointer user_data);
  3854. -
  3855. -gboolean date_time_mechanism_call_set_using_ntp_finish (
  3856. -    DateTimeMechanism *proxy,
  3857. -    GAsyncResult *res,
  3858. -    GError **error);
  3859. -
  3860. -gboolean date_time_mechanism_call_set_using_ntp_sync (
  3861. -    DateTimeMechanism *proxy,
  3862. -    gboolean is_using_ntp,
  3863. -    GCancellable *cancellable,
  3864. -    GError **error);
  3865. -
  3866. -void date_time_mechanism_call_can_set_using_ntp (
  3867. -    DateTimeMechanism *proxy,
  3868. -    GCancellable *cancellable,
  3869. -    GAsyncReadyCallback callback,
  3870. -    gpointer user_data);
  3871. -
  3872. -gboolean date_time_mechanism_call_can_set_using_ntp_finish (
  3873. -    DateTimeMechanism *proxy,
  3874. -    gint *out_value,
  3875. -    GAsyncResult *res,
  3876. -    GError **error);
  3877. -
  3878. -gboolean date_time_mechanism_call_can_set_using_ntp_sync (
  3879. -    DateTimeMechanism *proxy,
  3880. -    gint *out_value,
  3881. -    GCancellable *cancellable,
  3882. -    GError **error);
  3883. -
  3884. -
  3885. -
  3886. -/* ---- */
  3887. -
  3888. -#define TYPE_DATE_TIME_MECHANISM_PROXY (date_time_mechanism_proxy_get_type ())
  3889. -#define DATE_TIME_MECHANISM_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DATE_TIME_MECHANISM_PROXY, DateTimeMechanismProxy))
  3890. -#define DATE_TIME_MECHANISM_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_DATE_TIME_MECHANISM_PROXY, DateTimeMechanismProxyClass))
  3891. -#define DATE_TIME_MECHANISM_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_DATE_TIME_MECHANISM_PROXY, DateTimeMechanismProxyClass))
  3892. -#define IS_DATE_TIME_MECHANISM_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DATE_TIME_MECHANISM_PROXY))
  3893. -#define IS_DATE_TIME_MECHANISM_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_DATE_TIME_MECHANISM_PROXY))
  3894. -
  3895. -typedef struct _DateTimeMechanismProxy DateTimeMechanismProxy;
  3896. -typedef struct _DateTimeMechanismProxyClass DateTimeMechanismProxyClass;
  3897. -typedef struct _DateTimeMechanismProxyPrivate DateTimeMechanismProxyPrivate;
  3898. -
  3899. -struct _DateTimeMechanismProxy
  3900. -{
  3901. -  /*< private >*/
  3902. -  GDBusProxy parent_instance;
  3903. -  DateTimeMechanismProxyPrivate *priv;
  3904. -};
  3905. -
  3906. -struct _DateTimeMechanismProxyClass
  3907. -{
  3908. -  GDBusProxyClass parent_class;
  3909. -};
  3910. -
  3911. -GType date_time_mechanism_proxy_get_type (void) G_GNUC_CONST;
  3912. -
  3913. -void date_time_mechanism_proxy_new (
  3914. -    GDBusConnection     *connection,
  3915. -    GDBusProxyFlags      flags,
  3916. -    const gchar         *name,
  3917. -    const gchar         *object_path,
  3918. -    GCancellable        *cancellable,
  3919. -    GAsyncReadyCallback  callback,
  3920. -    gpointer             user_data);
  3921. -DateTimeMechanism *date_time_mechanism_proxy_new_finish (
  3922. -    GAsyncResult        *res,
  3923. -    GError             **error);
  3924. -DateTimeMechanism *date_time_mechanism_proxy_new_sync (
  3925. -    GDBusConnection     *connection,
  3926. -    GDBusProxyFlags      flags,
  3927. -    const gchar         *name,
  3928. -    const gchar         *object_path,
  3929. -    GCancellable        *cancellable,
  3930. -    GError             **error);
  3931. -
  3932. -void date_time_mechanism_proxy_new_for_bus (
  3933. -    GBusType             bus_type,
  3934. -    GDBusProxyFlags      flags,
  3935. -    const gchar         *name,
  3936. -    const gchar         *object_path,
  3937. -    GCancellable        *cancellable,
  3938. -    GAsyncReadyCallback  callback,
  3939. -    gpointer             user_data);
  3940. -DateTimeMechanism *date_time_mechanism_proxy_new_for_bus_finish (
  3941. -    GAsyncResult        *res,
  3942. -    GError             **error);
  3943. -DateTimeMechanism *date_time_mechanism_proxy_new_for_bus_sync (
  3944. -    GBusType             bus_type,
  3945. -    GDBusProxyFlags      flags,
  3946. -    const gchar         *name,
  3947. -    const gchar         *object_path,
  3948. -    GCancellable        *cancellable,
  3949. -    GError             **error);
  3950. -
  3951. -
  3952. -/* ---- */
  3953. -
  3954. -#define TYPE_DATE_TIME_MECHANISM_SKELETON (date_time_mechanism_skeleton_get_type ())
  3955. -#define DATE_TIME_MECHANISM_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DATE_TIME_MECHANISM_SKELETON, DateTimeMechanismSkeleton))
  3956. -#define DATE_TIME_MECHANISM_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_DATE_TIME_MECHANISM_SKELETON, DateTimeMechanismSkeletonClass))
  3957. -#define DATE_TIME_MECHANISM_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_DATE_TIME_MECHANISM_SKELETON, DateTimeMechanismSkeletonClass))
  3958. -#define IS_DATE_TIME_MECHANISM_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DATE_TIME_MECHANISM_SKELETON))
  3959. -#define IS_DATE_TIME_MECHANISM_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_DATE_TIME_MECHANISM_SKELETON))
  3960. -
  3961. -typedef struct _DateTimeMechanismSkeleton DateTimeMechanismSkeleton;
  3962. -typedef struct _DateTimeMechanismSkeletonClass DateTimeMechanismSkeletonClass;
  3963. -typedef struct _DateTimeMechanismSkeletonPrivate DateTimeMechanismSkeletonPrivate;
  3964. -
  3965. -struct _DateTimeMechanismSkeleton
  3966. -{
  3967. -  /*< private >*/
  3968. -  GDBusInterfaceSkeleton parent_instance;
  3969. -  DateTimeMechanismSkeletonPrivate *priv;
  3970. -};
  3971. -
  3972. -struct _DateTimeMechanismSkeletonClass
  3973. -{
  3974. -  GDBusInterfaceSkeletonClass parent_class;
  3975. -};
  3976. -
  3977. -GType date_time_mechanism_skeleton_get_type (void) G_GNUC_CONST;
  3978. -
  3979. -DateTimeMechanism *date_time_mechanism_skeleton_new (void);
  3980. -
  3981. -
  3982. -G_END_DECLS
  3983. -
  3984. -#endif /* __DTM_H__ */
  3985. diff --git a/panels/datetime/timedated.c b/panels/datetime/timedated.c
  3986. deleted file mode 100644
  3987. index 7ff47d9..0000000
  3988. --- a/panels/datetime/timedated.c
  3989. +++ /dev/null
  3990. @@ -1,2129 +0,0 @@
  3991. -/*
  3992. - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT.
  3993. - *
  3994. - * The license of this code is the same as for the source it was derived from.
  3995. - */
  3996. -
  3997. -#ifdef HAVE_CONFIG_H
  3998. -#  include "config.h"
  3999. -#endif
  4000. -
  4001. -#include "timedated.h"
  4002. -
  4003. -#include <string.h>
  4004. -#ifdef G_OS_UNIX
  4005. -#  include <gio/gunixfdlist.h>
  4006. -#endif
  4007. -
  4008. -typedef struct
  4009. -{
  4010. -  GDBusArgInfo parent_struct;
  4011. -  gboolean use_gvariant;
  4012. -} _ExtendedGDBusArgInfo;
  4013. -
  4014. -typedef struct
  4015. -{
  4016. -  GDBusMethodInfo parent_struct;
  4017. -  const gchar *signal_name;
  4018. -  gboolean pass_fdlist;
  4019. -} _ExtendedGDBusMethodInfo;
  4020. -
  4021. -typedef struct
  4022. -{
  4023. -  GDBusSignalInfo parent_struct;
  4024. -  const gchar *signal_name;
  4025. -} _ExtendedGDBusSignalInfo;
  4026. -
  4027. -typedef struct
  4028. -{
  4029. -  GDBusPropertyInfo parent_struct;
  4030. -  const gchar *hyphen_name;
  4031. -  gboolean use_gvariant;
  4032. -} _ExtendedGDBusPropertyInfo;
  4033. -
  4034. -typedef struct
  4035. -{
  4036. -  GDBusInterfaceInfo parent_struct;
  4037. -  const gchar *hyphen_name;
  4038. -} _ExtendedGDBusInterfaceInfo;
  4039. -
  4040. -typedef struct
  4041. -{
  4042. -  const _ExtendedGDBusPropertyInfo *info;
  4043. -  guint prop_id;
  4044. -  GValue orig_value; /* the value before the change */
  4045. -} ChangedProperty;
  4046. -
  4047. -static void
  4048. -_changed_property_free (ChangedProperty *data)
  4049. -{
  4050. -  g_value_unset (&data->orig_value);
  4051. -  g_free (data);
  4052. -}
  4053. -
  4054. -static gboolean
  4055. -_g_strv_equal0 (gchar **a, gchar **b)
  4056. -{
  4057. -  gboolean ret = FALSE;
  4058. -  guint n;
  4059. -  if (a == NULL && b == NULL)
  4060. -    {
  4061. -      ret = TRUE;
  4062. -      goto out;
  4063. -    }
  4064. -  if (a == NULL || b == NULL)
  4065. -    goto out;
  4066. -  if (g_strv_length (a) != g_strv_length (b))
  4067. -    goto out;
  4068. -  for (n = 0; a[n] != NULL; n++)
  4069. -    if (g_strcmp0 (a[n], b[n]) != 0)
  4070. -      goto out;
  4071. -  ret = TRUE;
  4072. -out:
  4073. -  return ret;
  4074. -}
  4075. -
  4076. -static gboolean
  4077. -_g_variant_equal0 (GVariant *a, GVariant *b)
  4078. -{
  4079. -  gboolean ret = FALSE;
  4080. -  if (a == NULL && b == NULL)
  4081. -    {
  4082. -      ret = TRUE;
  4083. -      goto out;
  4084. -    }
  4085. -  if (a == NULL || b == NULL)
  4086. -    goto out;
  4087. -  ret = g_variant_equal (a, b);
  4088. -out:
  4089. -  return ret;
  4090. -}
  4091. -
  4092. -G_GNUC_UNUSED static gboolean
  4093. -_g_value_equal (const GValue *a, const GValue *b)
  4094. -{
  4095. -  gboolean ret = FALSE;
  4096. -  g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
  4097. -  switch (G_VALUE_TYPE (a))
  4098. -    {
  4099. -      case G_TYPE_BOOLEAN:
  4100. -        ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
  4101. -        break;
  4102. -      case G_TYPE_UCHAR:
  4103. -        ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
  4104. -        break;
  4105. -      case G_TYPE_INT:
  4106. -        ret = (g_value_get_int (a) == g_value_get_int (b));
  4107. -        break;
  4108. -      case G_TYPE_UINT:
  4109. -        ret = (g_value_get_uint (a) == g_value_get_uint (b));
  4110. -        break;
  4111. -      case G_TYPE_INT64:
  4112. -        ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
  4113. -        break;
  4114. -      case G_TYPE_UINT64:
  4115. -        ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
  4116. -        break;
  4117. -      case G_TYPE_DOUBLE:
  4118. -        {
  4119. -          /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
  4120. -          gdouble da = g_value_get_double (a);
  4121. -          gdouble db = g_value_get_double (b);
  4122. -          ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
  4123. -        }
  4124. -        break;
  4125. -      case G_TYPE_STRING:
  4126. -        ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
  4127. -        break;
  4128. -      case G_TYPE_VARIANT:
  4129. -        ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
  4130. -        break;
  4131. -      default:
  4132. -        if (G_VALUE_TYPE (a) == G_TYPE_STRV)
  4133. -          ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
  4134. -        else
  4135. -          g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
  4136. -        break;
  4137. -    }
  4138. -  return ret;
  4139. -}
  4140. -
  4141. -/* ------------------------------------------------------------------------
  4142. - * Code for interface org.freedesktop.timedate1
  4143. - * ------------------------------------------------------------------------
  4144. - */
  4145. -
  4146. -/**
  4147. - * SECTION:Timedate1
  4148. - * @title: Timedate1
  4149. - * @short_description: Generated C code for the org.freedesktop.timedate1 D-Bus interface
  4150. - *
  4151. - * 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.
  4152. - */
  4153. -
  4154. -/* ---- Introspection data for org.freedesktop.timedate1 ---- */
  4155. -
  4156. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_usec_utc =
  4157. -{
  4158. -  {
  4159. -    -1,
  4160. -    (gchar *) "usec_utc",
  4161. -    (gchar *) "x",
  4162. -    NULL
  4163. -  },
  4164. -  FALSE
  4165. -};
  4166. -
  4167. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_relative =
  4168. -{
  4169. -  {
  4170. -    -1,
  4171. -    (gchar *) "relative",
  4172. -    (gchar *) "b",
  4173. -    NULL
  4174. -  },
  4175. -  FALSE
  4176. -};
  4177. -
  4178. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_user_interaction =
  4179. -{
  4180. -  {
  4181. -    -1,
  4182. -    (gchar *) "user_interaction",
  4183. -    (gchar *) "b",
  4184. -    NULL
  4185. -  },
  4186. -  FALSE
  4187. -};
  4188. -
  4189. -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_time_IN_ARG_pointers[] =
  4190. -{
  4191. -  &_timedate1_method_info_set_time_IN_ARG_usec_utc,
  4192. -  &_timedate1_method_info_set_time_IN_ARG_relative,
  4193. -  &_timedate1_method_info_set_time_IN_ARG_user_interaction,
  4194. -  NULL
  4195. -};
  4196. -
  4197. -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_time =
  4198. -{
  4199. -  {
  4200. -    -1,
  4201. -    (gchar *) "SetTime",
  4202. -    (GDBusArgInfo **) &_timedate1_method_info_set_time_IN_ARG_pointers,
  4203. -    NULL,
  4204. -    NULL
  4205. -  },
  4206. -  "handle-set-time",
  4207. -  FALSE
  4208. -};
  4209. -
  4210. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_timezone_IN_ARG_timezone =
  4211. -{
  4212. -  {
  4213. -    -1,
  4214. -    (gchar *) "timezone",
  4215. -    (gchar *) "s",
  4216. -    NULL
  4217. -  },
  4218. -  FALSE
  4219. -};
  4220. -
  4221. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_timezone_IN_ARG_user_interaction =
  4222. -{
  4223. -  {
  4224. -    -1,
  4225. -    (gchar *) "user_interaction",
  4226. -    (gchar *) "b",
  4227. -    NULL
  4228. -  },
  4229. -  FALSE
  4230. -};
  4231. -
  4232. -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_timezone_IN_ARG_pointers[] =
  4233. -{
  4234. -  &_timedate1_method_info_set_timezone_IN_ARG_timezone,
  4235. -  &_timedate1_method_info_set_timezone_IN_ARG_user_interaction,
  4236. -  NULL
  4237. -};
  4238. -
  4239. -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_timezone =
  4240. -{
  4241. -  {
  4242. -    -1,
  4243. -    (gchar *) "SetTimezone",
  4244. -    (GDBusArgInfo **) &_timedate1_method_info_set_timezone_IN_ARG_pointers,
  4245. -    NULL,
  4246. -    NULL
  4247. -  },
  4248. -  "handle-set-timezone",
  4249. -  FALSE
  4250. -};
  4251. -
  4252. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_local_rtc =
  4253. -{
  4254. -  {
  4255. -    -1,
  4256. -    (gchar *) "local_rtc",
  4257. -    (gchar *) "b",
  4258. -    NULL
  4259. -  },
  4260. -  FALSE
  4261. -};
  4262. -
  4263. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_fix_system =
  4264. -{
  4265. -  {
  4266. -    -1,
  4267. -    (gchar *) "fix_system",
  4268. -    (gchar *) "b",
  4269. -    NULL
  4270. -  },
  4271. -  FALSE
  4272. -};
  4273. -
  4274. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_user_interaction =
  4275. -{
  4276. -  {
  4277. -    -1,
  4278. -    (gchar *) "user_interaction",
  4279. -    (gchar *) "b",
  4280. -    NULL
  4281. -  },
  4282. -  FALSE
  4283. -};
  4284. -
  4285. -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_local_rtc_IN_ARG_pointers[] =
  4286. -{
  4287. -  &_timedate1_method_info_set_local_rtc_IN_ARG_local_rtc,
  4288. -  &_timedate1_method_info_set_local_rtc_IN_ARG_fix_system,
  4289. -  &_timedate1_method_info_set_local_rtc_IN_ARG_user_interaction,
  4290. -  NULL
  4291. -};
  4292. -
  4293. -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_local_rtc =
  4294. -{
  4295. -  {
  4296. -    -1,
  4297. -    (gchar *) "SetLocalRTC",
  4298. -    (GDBusArgInfo **) &_timedate1_method_info_set_local_rtc_IN_ARG_pointers,
  4299. -    NULL,
  4300. -    NULL
  4301. -  },
  4302. -  "handle-set-local-rtc",
  4303. -  FALSE
  4304. -};
  4305. -
  4306. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_ntp_IN_ARG_use_ntp =
  4307. -{
  4308. -  {
  4309. -    -1,
  4310. -    (gchar *) "use_ntp",
  4311. -    (gchar *) "b",
  4312. -    NULL
  4313. -  },
  4314. -  FALSE
  4315. -};
  4316. -
  4317. -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_ntp_IN_ARG_user_interaction =
  4318. -{
  4319. -  {
  4320. -    -1,
  4321. -    (gchar *) "user_interaction",
  4322. -    (gchar *) "b",
  4323. -    NULL
  4324. -  },
  4325. -  FALSE
  4326. -};
  4327. -
  4328. -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_ntp_IN_ARG_pointers[] =
  4329. -{
  4330. -  &_timedate1_method_info_set_ntp_IN_ARG_use_ntp,
  4331. -  &_timedate1_method_info_set_ntp_IN_ARG_user_interaction,
  4332. -  NULL
  4333. -};
  4334. -
  4335. -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_ntp =
  4336. -{
  4337. -  {
  4338. -    -1,
  4339. -    (gchar *) "SetNTP",
  4340. -    (GDBusArgInfo **) &_timedate1_method_info_set_ntp_IN_ARG_pointers,
  4341. -    NULL,
  4342. -    NULL
  4343. -  },
  4344. -  "handle-set-ntp",
  4345. -  FALSE
  4346. -};
  4347. -
  4348. -static const _ExtendedGDBusMethodInfo * const _timedate1_method_info_pointers[] =
  4349. -{
  4350. -  &_timedate1_method_info_set_time,
  4351. -  &_timedate1_method_info_set_timezone,
  4352. -  &_timedate1_method_info_set_local_rtc,
  4353. -  &_timedate1_method_info_set_ntp,
  4354. -  NULL
  4355. -};
  4356. -
  4357. -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_timezone =
  4358. -{
  4359. -  {
  4360. -    -1,
  4361. -    (gchar *) "Timezone",
  4362. -    (gchar *) "s",
  4363. -    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
  4364. -    NULL
  4365. -  },
  4366. -  "timezone",
  4367. -  FALSE
  4368. -};
  4369. -
  4370. -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_local_rtc =
  4371. -{
  4372. -  {
  4373. -    -1,
  4374. -    (gchar *) "LocalRTC",
  4375. -    (gchar *) "b",
  4376. -    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
  4377. -    NULL
  4378. -  },
  4379. -  "local-rtc",
  4380. -  FALSE
  4381. -};
  4382. -
  4383. -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_ntp =
  4384. -{
  4385. -  {
  4386. -    -1,
  4387. -    (gchar *) "NTP",
  4388. -    (gchar *) "b",
  4389. -    G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
  4390. -    NULL
  4391. -  },
  4392. -  "ntp",
  4393. -  FALSE
  4394. -};
  4395. -
  4396. -static const _ExtendedGDBusPropertyInfo * const _timedate1_property_info_pointers[] =
  4397. -{
  4398. -  &_timedate1_property_info_timezone,
  4399. -  &_timedate1_property_info_local_rtc,
  4400. -  &_timedate1_property_info_ntp,
  4401. -  NULL
  4402. -};
  4403. -
  4404. -static const _ExtendedGDBusInterfaceInfo _timedate1_interface_info =
  4405. -{
  4406. -  {
  4407. -    -1,
  4408. -    (gchar *) "org.freedesktop.timedate1",
  4409. -    (GDBusMethodInfo **) &_timedate1_method_info_pointers,
  4410. -    NULL,
  4411. -    (GDBusPropertyInfo **) &_timedate1_property_info_pointers,
  4412. -    NULL
  4413. -  },
  4414. -  "timedate1",
  4415. -};
  4416. -
  4417. -
  4418. -/**
  4419. - * timedate1_interface_info:
  4420. - *
  4421. - * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-timedate1.top_of_page">org.freedesktop.timedate1</link> D-Bus interface.
  4422. - *
  4423. - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
  4424. - */
  4425. -GDBusInterfaceInfo *
  4426. -timedate1_interface_info (void)
  4427. -{
  4428. -  return (GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct;
  4429. -}
  4430. -
  4431. -/**
  4432. - * timedate1_override_properties:
  4433. - * @klass: The class structure for a #GObject<!-- -->-derived class.
  4434. - * @property_id_begin: The property id to assign to the first overridden property.
  4435. - *
  4436. - * Overrides all #GObject properties in the #Timedate1 interface for a concrete class.
  4437. - * The properties are overridden in the order they are defined.
  4438. - *
  4439. - * Returns: The last property id.
  4440. - */
  4441. -guint
  4442. -timedate1_override_properties (GObjectClass *klass, guint property_id_begin)
  4443. -{
  4444. -  g_object_class_override_property (klass, property_id_begin++, "timezone");
  4445. -  g_object_class_override_property (klass, property_id_begin++, "local-rtc");
  4446. -  g_object_class_override_property (klass, property_id_begin++, "ntp");
  4447. -  return property_id_begin - 1;
  4448. -}
  4449. -
  4450. -
  4451. -
  4452. -/**
  4453. - * Timedate1:
  4454. - *
  4455. - * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-timedate1.top_of_page">org.freedesktop.timedate1</link>.
  4456. - */
  4457. -
  4458. -/**
  4459. - * Timedate1Iface:
  4460. - * @parent_iface: The parent interface.
  4461. - * @handle_set_local_rtc: Handler for the #Timedate1::handle-set-local-rtc signal.
  4462. - * @handle_set_ntp: Handler for the #Timedate1::handle-set-ntp signal.
  4463. - * @handle_set_time: Handler for the #Timedate1::handle-set-time signal.
  4464. - * @handle_set_timezone: Handler for the #Timedate1::handle-set-timezone signal.
  4465. - * @get_local_rtc: Getter for the #Timedate1:local-rtc property.
  4466. - * @get_ntp: Getter for the #Timedate1:ntp property.
  4467. - * @get_timezone: Getter for the #Timedate1:timezone property.
  4468. - *
  4469. - * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-timedate1.top_of_page">org.freedesktop.timedate1</link>.
  4470. - */
  4471. -
  4472. -static void
  4473. -timedate1_default_init (Timedate1Iface *iface)
  4474. -{
  4475. -  /* GObject signals for incoming D-Bus method calls: */
  4476. -  /**
  4477. -   * Timedate1::handle-set-time:
  4478. -   * @object: A #Timedate1.
  4479. -   * @invocation: A #GDBusMethodInvocation.
  4480. -   * @arg_usec_utc: Argument passed by remote caller.
  4481. -   * @arg_relative: Argument passed by remote caller.
  4482. -   * @arg_user_interaction: Argument passed by remote caller.
  4483. -   *
  4484. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-timedate1.SetTime">SetTime()</link> D-Bus method.
  4485. -   *
  4486. -   * 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 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.
  4487. -   *
  4488. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  4489. -   */
  4490. -  g_signal_new ("handle-set-time",
  4491. -    G_TYPE_FROM_INTERFACE (iface),
  4492. -    G_SIGNAL_RUN_LAST,
  4493. -    G_STRUCT_OFFSET (Timedate1Iface, handle_set_time),
  4494. -    g_signal_accumulator_true_handled,
  4495. -    NULL,
  4496. -    g_cclosure_marshal_generic,
  4497. -    G_TYPE_BOOLEAN,
  4498. -    4,
  4499. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
  4500. -
  4501. -  /**
  4502. -   * Timedate1::handle-set-timezone:
  4503. -   * @object: A #Timedate1.
  4504. -   * @invocation: A #GDBusMethodInvocation.
  4505. -   * @arg_timezone: Argument passed by remote caller.
  4506. -   * @arg_user_interaction: Argument passed by remote caller.
  4507. -   *
  4508. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-timedate1.SetTimezone">SetTimezone()</link> D-Bus method.
  4509. -   *
  4510. -   * 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 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.
  4511. -   *
  4512. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  4513. -   */
  4514. -  g_signal_new ("handle-set-timezone",
  4515. -    G_TYPE_FROM_INTERFACE (iface),
  4516. -    G_SIGNAL_RUN_LAST,
  4517. -    G_STRUCT_OFFSET (Timedate1Iface, handle_set_timezone),
  4518. -    g_signal_accumulator_true_handled,
  4519. -    NULL,
  4520. -    g_cclosure_marshal_generic,
  4521. -    G_TYPE_BOOLEAN,
  4522. -    3,
  4523. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN);
  4524. -
  4525. -  /**
  4526. -   * Timedate1::handle-set-local-rtc:
  4527. -   * @object: A #Timedate1.
  4528. -   * @invocation: A #GDBusMethodInvocation.
  4529. -   * @arg_local_rtc: Argument passed by remote caller.
  4530. -   * @arg_fix_system: Argument passed by remote caller.
  4531. -   * @arg_user_interaction: Argument passed by remote caller.
  4532. -   *
  4533. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-timedate1.SetLocalRTC">SetLocalRTC()</link> D-Bus method.
  4534. -   *
  4535. -   * 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 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.
  4536. -   *
  4537. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  4538. -   */
  4539. -  g_signal_new ("handle-set-local-rtc",
  4540. -    G_TYPE_FROM_INTERFACE (iface),
  4541. -    G_SIGNAL_RUN_LAST,
  4542. -    G_STRUCT_OFFSET (Timedate1Iface, handle_set_local_rtc),
  4543. -    g_signal_accumulator_true_handled,
  4544. -    NULL,
  4545. -    g_cclosure_marshal_generic,
  4546. -    G_TYPE_BOOLEAN,
  4547. -    4,
  4548. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
  4549. -
  4550. -  /**
  4551. -   * Timedate1::handle-set-ntp:
  4552. -   * @object: A #Timedate1.
  4553. -   * @invocation: A #GDBusMethodInvocation.
  4554. -   * @arg_use_ntp: Argument passed by remote caller.
  4555. -   * @arg_user_interaction: Argument passed by remote caller.
  4556. -   *
  4557. -   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-timedate1.SetNTP">SetNTP()</link> D-Bus method.
  4558. -   *
  4559. -   * 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 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.
  4560. -   *
  4561. -   * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
  4562. -   */
  4563. -  g_signal_new ("handle-set-ntp",
  4564. -    G_TYPE_FROM_INTERFACE (iface),
  4565. -    G_SIGNAL_RUN_LAST,
  4566. -    G_STRUCT_OFFSET (Timedate1Iface, handle_set_ntp),
  4567. -    g_signal_accumulator_true_handled,
  4568. -    NULL,
  4569. -    g_cclosure_marshal_generic,
  4570. -    G_TYPE_BOOLEAN,
  4571. -    3,
  4572. -    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
  4573. -
  4574. -  /* GObject properties for D-Bus properties: */
  4575. -  /**
  4576. -   * Timedate1:timezone:
  4577. -   *
  4578. -   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-timedate1.Timezone">"Timezone"</link>.
  4579. -   *
  4580. -   * 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.
  4581. -   */
  4582. -  g_object_interface_install_property (iface,
  4583. -    g_param_spec_string ("timezone", "Timezone", "Timezone", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  4584. -  /**
  4585. -   * Timedate1:local-rtc:
  4586. -   *
  4587. -   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-timedate1.LocalRTC">"LocalRTC"</link>.
  4588. -   *
  4589. -   * 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.
  4590. -   */
  4591. -  g_object_interface_install_property (iface,
  4592. -    g_param_spec_boolean ("local-rtc", "LocalRTC", "LocalRTC", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  4593. -  /**
  4594. -   * Timedate1:ntp:
  4595. -   *
  4596. -   * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-timedate1.NTP">"NTP"</link>.
  4597. -   *
  4598. -   * 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.
  4599. -   */
  4600. -  g_object_interface_install_property (iface,
  4601. -    g_param_spec_boolean ("ntp", "NTP", "NTP", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  4602. -}
  4603. -
  4604. -typedef Timedate1Iface Timedate1Interface;
  4605. -G_DEFINE_INTERFACE (Timedate1, timedate1, G_TYPE_OBJECT);
  4606. -
  4607. -/**
  4608. - * timedate1_get_timezone: (skip)
  4609. - * @object: A #Timedate1.
  4610. - *
  4611. - * Gets the value of the <link linkend="gdbus-property-org-freedesktop-timedate1.Timezone">"Timezone"</link> D-Bus property.
  4612. - *
  4613. - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  4614. - *
  4615. - * <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 timedate1_dup_timezone() if on another thread.</warning>
  4616. - *
  4617. - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
  4618. - */
  4619. -const gchar *
  4620. -timedate1_get_timezone (Timedate1 *object)
  4621. -{
  4622. -  return TIMEDATE1_GET_IFACE (object)->get_timezone (object);
  4623. -}
  4624. -
  4625. -/**
  4626. - * timedate1_dup_timezone: (skip)
  4627. - * @object: A #Timedate1.
  4628. - *
  4629. - * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-timedate1.Timezone">"Timezone"</link> D-Bus property.
  4630. - *
  4631. - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  4632. - *
  4633. - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
  4634. - */
  4635. -gchar *
  4636. -timedate1_dup_timezone (Timedate1 *object)
  4637. -{
  4638. -  gchar *value;
  4639. -  g_object_get (G_OBJECT (object), "timezone", &value, NULL);
  4640. -  return value;
  4641. -}
  4642. -
  4643. -/**
  4644. - * timedate1_set_timezone: (skip)
  4645. - * @object: A #Timedate1.
  4646. - * @value: The value to set.
  4647. - *
  4648. - * Sets the <link linkend="gdbus-property-org-freedesktop-timedate1.Timezone">"Timezone"</link> D-Bus property to @value.
  4649. - *
  4650. - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
  4651. - */
  4652. -void
  4653. -timedate1_set_timezone (Timedate1 *object, const gchar *value)
  4654. -{
  4655. -  g_object_set (G_OBJECT (object), "timezone", value, NULL);
  4656. -}
  4657. -
  4658. -/**
  4659. - * timedate1_get_local_rtc: (skip)
  4660. - * @object: A #Timedate1.
  4661. - *
  4662. - * Gets the value of the <link linkend="gdbus-property-org-freedesktop-timedate1.LocalRTC">"LocalRTC"</link> D-Bus property.
  4663. - *
  4664. - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  4665. - *
  4666. - * Returns: The property value.
  4667. - */
  4668. -gboolean
  4669. -timedate1_get_local_rtc (Timedate1 *object)
  4670. -{
  4671. -  return TIMEDATE1_GET_IFACE (object)->get_local_rtc (object);
  4672. -}
  4673. -
  4674. -/**
  4675. - * timedate1_set_local_rtc: (skip)
  4676. - * @object: A #Timedate1.
  4677. - * @value: The value to set.
  4678. - *
  4679. - * Sets the <link linkend="gdbus-property-org-freedesktop-timedate1.LocalRTC">"LocalRTC"</link> D-Bus property to @value.
  4680. - *
  4681. - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
  4682. - */
  4683. -void
  4684. -timedate1_set_local_rtc (Timedate1 *object, gboolean value)
  4685. -{
  4686. -  g_object_set (G_OBJECT (object), "local-rtc", value, NULL);
  4687. -}
  4688. -
  4689. -/**
  4690. - * timedate1_get_ntp: (skip)
  4691. - * @object: A #Timedate1.
  4692. - *
  4693. - * Gets the value of the <link linkend="gdbus-property-org-freedesktop-timedate1.NTP">"NTP"</link> D-Bus property.
  4694. - *
  4695. - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
  4696. - *
  4697. - * Returns: The property value.
  4698. - */
  4699. -gboolean
  4700. -timedate1_get_ntp (Timedate1 *object)
  4701. -{
  4702. -  return TIMEDATE1_GET_IFACE (object)->get_ntp (object);
  4703. -}
  4704. -
  4705. -/**
  4706. - * timedate1_set_ntp: (skip)
  4707. - * @object: A #Timedate1.
  4708. - * @value: The value to set.
  4709. - *
  4710. - * Sets the <link linkend="gdbus-property-org-freedesktop-timedate1.NTP">"NTP"</link> D-Bus property to @value.
  4711. - *
  4712. - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
  4713. - */
  4714. -void
  4715. -timedate1_set_ntp (Timedate1 *object, gboolean value)
  4716. -{
  4717. -  g_object_set (G_OBJECT (object), "ntp", value, NULL);
  4718. -}
  4719. -
  4720. -/**
  4721. - * timedate1_call_set_time:
  4722. - * @proxy: A #Timedate1Proxy.
  4723. - * @arg_usec_utc: Argument to pass with the method invocation.
  4724. - * @arg_relative: Argument to pass with the method invocation.
  4725. - * @arg_user_interaction: Argument to pass with the method invocation.
  4726. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  4727. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  4728. - * @user_data: User data to pass to @callback.
  4729. - *
  4730. - * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-timedate1.SetTime">SetTime()</link> D-Bus method on @proxy.
  4731. - * 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.
  4732. - * You can then call timedate1_call_set_time_finish() to get the result of the operation.
  4733. - *
  4734. - * See timedate1_call_set_time_sync() for the synchronous, blocking version of this method.
  4735. - */
  4736. -void
  4737. -timedate1_call_set_time (
  4738. -    Timedate1 *proxy,
  4739. -    gint64 arg_usec_utc,
  4740. -    gboolean arg_relative,
  4741. -    gboolean arg_user_interaction,
  4742. -    GCancellable *cancellable,
  4743. -    GAsyncReadyCallback callback,
  4744. -    gpointer user_data)
  4745. -{
  4746. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  4747. -    "SetTime",
  4748. -    g_variant_new ("(xbb)",
  4749. -                   arg_usec_utc,
  4750. -                   arg_relative,
  4751. -                   arg_user_interaction),
  4752. -    G_DBUS_CALL_FLAGS_NONE,
  4753. -    -1,
  4754. -    cancellable,
  4755. -    callback,
  4756. -    user_data);
  4757. -}
  4758. -
  4759. -/**
  4760. - * timedate1_call_set_time_finish:
  4761. - * @proxy: A #Timedate1Proxy.
  4762. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_time().
  4763. - * @error: Return location for error or %NULL.
  4764. - *
  4765. - * Finishes an operation started with timedate1_call_set_time().
  4766. - *
  4767. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  4768. - */
  4769. -gboolean
  4770. -timedate1_call_set_time_finish (
  4771. -    Timedate1 *proxy,
  4772. -    GAsyncResult *res,
  4773. -    GError **error)
  4774. -{
  4775. -  GVariant *_ret;
  4776. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  4777. -  if (_ret == NULL)
  4778. -    goto _out;
  4779. -  g_variant_get (_ret,
  4780. -                 "()");
  4781. -  g_variant_unref (_ret);
  4782. -_out:
  4783. -  return _ret != NULL;
  4784. -}
  4785. -
  4786. -/**
  4787. - * timedate1_call_set_time_sync:
  4788. - * @proxy: A #Timedate1Proxy.
  4789. - * @arg_usec_utc: Argument to pass with the method invocation.
  4790. - * @arg_relative: Argument to pass with the method invocation.
  4791. - * @arg_user_interaction: Argument to pass with the method invocation.
  4792. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  4793. - * @error: Return location for error or %NULL.
  4794. - *
  4795. - * 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.
  4796. - *
  4797. - * See timedate1_call_set_time() for the asynchronous version of this method.
  4798. - *
  4799. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  4800. - */
  4801. -gboolean
  4802. -timedate1_call_set_time_sync (
  4803. -    Timedate1 *proxy,
  4804. -    gint64 arg_usec_utc,
  4805. -    gboolean arg_relative,
  4806. -    gboolean arg_user_interaction,
  4807. -    GCancellable *cancellable,
  4808. -    GError **error)
  4809. -{
  4810. -  GVariant *_ret;
  4811. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  4812. -    "SetTime",
  4813. -    g_variant_new ("(xbb)",
  4814. -                   arg_usec_utc,
  4815. -                   arg_relative,
  4816. -                   arg_user_interaction),
  4817. -    G_DBUS_CALL_FLAGS_NONE,
  4818. -    -1,
  4819. -    cancellable,
  4820. -    error);
  4821. -  if (_ret == NULL)
  4822. -    goto _out;
  4823. -  g_variant_get (_ret,
  4824. -                 "()");
  4825. -  g_variant_unref (_ret);
  4826. -_out:
  4827. -  return _ret != NULL;
  4828. -}
  4829. -
  4830. -/**
  4831. - * timedate1_call_set_timezone:
  4832. - * @proxy: A #Timedate1Proxy.
  4833. - * @arg_timezone: Argument to pass with the method invocation.
  4834. - * @arg_user_interaction: Argument to pass with the method invocation.
  4835. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  4836. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  4837. - * @user_data: User data to pass to @callback.
  4838. - *
  4839. - * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-timedate1.SetTimezone">SetTimezone()</link> D-Bus method on @proxy.
  4840. - * 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.
  4841. - * You can then call timedate1_call_set_timezone_finish() to get the result of the operation.
  4842. - *
  4843. - * See timedate1_call_set_timezone_sync() for the synchronous, blocking version of this method.
  4844. - */
  4845. -void
  4846. -timedate1_call_set_timezone (
  4847. -    Timedate1 *proxy,
  4848. -    const gchar *arg_timezone,
  4849. -    gboolean arg_user_interaction,
  4850. -    GCancellable *cancellable,
  4851. -    GAsyncReadyCallback callback,
  4852. -    gpointer user_data)
  4853. -{
  4854. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  4855. -    "SetTimezone",
  4856. -    g_variant_new ("(sb)",
  4857. -                   arg_timezone,
  4858. -                   arg_user_interaction),
  4859. -    G_DBUS_CALL_FLAGS_NONE,
  4860. -    -1,
  4861. -    cancellable,
  4862. -    callback,
  4863. -    user_data);
  4864. -}
  4865. -
  4866. -/**
  4867. - * timedate1_call_set_timezone_finish:
  4868. - * @proxy: A #Timedate1Proxy.
  4869. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_timezone().
  4870. - * @error: Return location for error or %NULL.
  4871. - *
  4872. - * Finishes an operation started with timedate1_call_set_timezone().
  4873. - *
  4874. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  4875. - */
  4876. -gboolean
  4877. -timedate1_call_set_timezone_finish (
  4878. -    Timedate1 *proxy,
  4879. -    GAsyncResult *res,
  4880. -    GError **error)
  4881. -{
  4882. -  GVariant *_ret;
  4883. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  4884. -  if (_ret == NULL)
  4885. -    goto _out;
  4886. -  g_variant_get (_ret,
  4887. -                 "()");
  4888. -  g_variant_unref (_ret);
  4889. -_out:
  4890. -  return _ret != NULL;
  4891. -}
  4892. -
  4893. -/**
  4894. - * timedate1_call_set_timezone_sync:
  4895. - * @proxy: A #Timedate1Proxy.
  4896. - * @arg_timezone: Argument to pass with the method invocation.
  4897. - * @arg_user_interaction: Argument to pass with the method invocation.
  4898. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  4899. - * @error: Return location for error or %NULL.
  4900. - *
  4901. - * 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.
  4902. - *
  4903. - * See timedate1_call_set_timezone() for the asynchronous version of this method.
  4904. - *
  4905. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  4906. - */
  4907. -gboolean
  4908. -timedate1_call_set_timezone_sync (
  4909. -    Timedate1 *proxy,
  4910. -    const gchar *arg_timezone,
  4911. -    gboolean arg_user_interaction,
  4912. -    GCancellable *cancellable,
  4913. -    GError **error)
  4914. -{
  4915. -  GVariant *_ret;
  4916. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  4917. -    "SetTimezone",
  4918. -    g_variant_new ("(sb)",
  4919. -                   arg_timezone,
  4920. -                   arg_user_interaction),
  4921. -    G_DBUS_CALL_FLAGS_NONE,
  4922. -    -1,
  4923. -    cancellable,
  4924. -    error);
  4925. -  if (_ret == NULL)
  4926. -    goto _out;
  4927. -  g_variant_get (_ret,
  4928. -                 "()");
  4929. -  g_variant_unref (_ret);
  4930. -_out:
  4931. -  return _ret != NULL;
  4932. -}
  4933. -
  4934. -/**
  4935. - * timedate1_call_set_local_rtc:
  4936. - * @proxy: A #Timedate1Proxy.
  4937. - * @arg_local_rtc: Argument to pass with the method invocation.
  4938. - * @arg_fix_system: Argument to pass with the method invocation.
  4939. - * @arg_user_interaction: Argument to pass with the method invocation.
  4940. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  4941. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  4942. - * @user_data: User data to pass to @callback.
  4943. - *
  4944. - * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-timedate1.SetLocalRTC">SetLocalRTC()</link> D-Bus method on @proxy.
  4945. - * 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.
  4946. - * You can then call timedate1_call_set_local_rtc_finish() to get the result of the operation.
  4947. - *
  4948. - * See timedate1_call_set_local_rtc_sync() for the synchronous, blocking version of this method.
  4949. - */
  4950. -void
  4951. -timedate1_call_set_local_rtc (
  4952. -    Timedate1 *proxy,
  4953. -    gboolean arg_local_rtc,
  4954. -    gboolean arg_fix_system,
  4955. -    gboolean arg_user_interaction,
  4956. -    GCancellable *cancellable,
  4957. -    GAsyncReadyCallback callback,
  4958. -    gpointer user_data)
  4959. -{
  4960. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  4961. -    "SetLocalRTC",
  4962. -    g_variant_new ("(bbb)",
  4963. -                   arg_local_rtc,
  4964. -                   arg_fix_system,
  4965. -                   arg_user_interaction),
  4966. -    G_DBUS_CALL_FLAGS_NONE,
  4967. -    -1,
  4968. -    cancellable,
  4969. -    callback,
  4970. -    user_data);
  4971. -}
  4972. -
  4973. -/**
  4974. - * timedate1_call_set_local_rtc_finish:
  4975. - * @proxy: A #Timedate1Proxy.
  4976. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_local_rtc().
  4977. - * @error: Return location for error or %NULL.
  4978. - *
  4979. - * Finishes an operation started with timedate1_call_set_local_rtc().
  4980. - *
  4981. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  4982. - */
  4983. -gboolean
  4984. -timedate1_call_set_local_rtc_finish (
  4985. -    Timedate1 *proxy,
  4986. -    GAsyncResult *res,
  4987. -    GError **error)
  4988. -{
  4989. -  GVariant *_ret;
  4990. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  4991. -  if (_ret == NULL)
  4992. -    goto _out;
  4993. -  g_variant_get (_ret,
  4994. -                 "()");
  4995. -  g_variant_unref (_ret);
  4996. -_out:
  4997. -  return _ret != NULL;
  4998. -}
  4999. -
  5000. -/**
  5001. - * timedate1_call_set_local_rtc_sync:
  5002. - * @proxy: A #Timedate1Proxy.
  5003. - * @arg_local_rtc: Argument to pass with the method invocation.
  5004. - * @arg_fix_system: Argument to pass with the method invocation.
  5005. - * @arg_user_interaction: Argument to pass with the method invocation.
  5006. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5007. - * @error: Return location for error or %NULL.
  5008. - *
  5009. - * 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.
  5010. - *
  5011. - * See timedate1_call_set_local_rtc() for the asynchronous version of this method.
  5012. - *
  5013. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  5014. - */
  5015. -gboolean
  5016. -timedate1_call_set_local_rtc_sync (
  5017. -    Timedate1 *proxy,
  5018. -    gboolean arg_local_rtc,
  5019. -    gboolean arg_fix_system,
  5020. -    gboolean arg_user_interaction,
  5021. -    GCancellable *cancellable,
  5022. -    GError **error)
  5023. -{
  5024. -  GVariant *_ret;
  5025. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  5026. -    "SetLocalRTC",
  5027. -    g_variant_new ("(bbb)",
  5028. -                   arg_local_rtc,
  5029. -                   arg_fix_system,
  5030. -                   arg_user_interaction),
  5031. -    G_DBUS_CALL_FLAGS_NONE,
  5032. -    -1,
  5033. -    cancellable,
  5034. -    error);
  5035. -  if (_ret == NULL)
  5036. -    goto _out;
  5037. -  g_variant_get (_ret,
  5038. -                 "()");
  5039. -  g_variant_unref (_ret);
  5040. -_out:
  5041. -  return _ret != NULL;
  5042. -}
  5043. -
  5044. -/**
  5045. - * timedate1_call_set_ntp:
  5046. - * @proxy: A #Timedate1Proxy.
  5047. - * @arg_use_ntp: Argument to pass with the method invocation.
  5048. - * @arg_user_interaction: Argument to pass with the method invocation.
  5049. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5050. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
  5051. - * @user_data: User data to pass to @callback.
  5052. - *
  5053. - * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-timedate1.SetNTP">SetNTP()</link> D-Bus method on @proxy.
  5054. - * 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.
  5055. - * You can then call timedate1_call_set_ntp_finish() to get the result of the operation.
  5056. - *
  5057. - * See timedate1_call_set_ntp_sync() for the synchronous, blocking version of this method.
  5058. - */
  5059. -void
  5060. -timedate1_call_set_ntp (
  5061. -    Timedate1 *proxy,
  5062. -    gboolean arg_use_ntp,
  5063. -    gboolean arg_user_interaction,
  5064. -    GCancellable *cancellable,
  5065. -    GAsyncReadyCallback callback,
  5066. -    gpointer user_data)
  5067. -{
  5068. -  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
  5069. -    "SetNTP",
  5070. -    g_variant_new ("(bb)",
  5071. -                   arg_use_ntp,
  5072. -                   arg_user_interaction),
  5073. -    G_DBUS_CALL_FLAGS_NONE,
  5074. -    -1,
  5075. -    cancellable,
  5076. -    callback,
  5077. -    user_data);
  5078. -}
  5079. -
  5080. -/**
  5081. - * timedate1_call_set_ntp_finish:
  5082. - * @proxy: A #Timedate1Proxy.
  5083. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_ntp().
  5084. - * @error: Return location for error or %NULL.
  5085. - *
  5086. - * Finishes an operation started with timedate1_call_set_ntp().
  5087. - *
  5088. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  5089. - */
  5090. -gboolean
  5091. -timedate1_call_set_ntp_finish (
  5092. -    Timedate1 *proxy,
  5093. -    GAsyncResult *res,
  5094. -    GError **error)
  5095. -{
  5096. -  GVariant *_ret;
  5097. -  _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
  5098. -  if (_ret == NULL)
  5099. -    goto _out;
  5100. -  g_variant_get (_ret,
  5101. -                 "()");
  5102. -  g_variant_unref (_ret);
  5103. -_out:
  5104. -  return _ret != NULL;
  5105. -}
  5106. -
  5107. -/**
  5108. - * timedate1_call_set_ntp_sync:
  5109. - * @proxy: A #Timedate1Proxy.
  5110. - * @arg_use_ntp: Argument to pass with the method invocation.
  5111. - * @arg_user_interaction: Argument to pass with the method invocation.
  5112. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5113. - * @error: Return location for error or %NULL.
  5114. - *
  5115. - * 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.
  5116. - *
  5117. - * See timedate1_call_set_ntp() for the asynchronous version of this method.
  5118. - *
  5119. - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
  5120. - */
  5121. -gboolean
  5122. -timedate1_call_set_ntp_sync (
  5123. -    Timedate1 *proxy,
  5124. -    gboolean arg_use_ntp,
  5125. -    gboolean arg_user_interaction,
  5126. -    GCancellable *cancellable,
  5127. -    GError **error)
  5128. -{
  5129. -  GVariant *_ret;
  5130. -  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
  5131. -    "SetNTP",
  5132. -    g_variant_new ("(bb)",
  5133. -                   arg_use_ntp,
  5134. -                   arg_user_interaction),
  5135. -    G_DBUS_CALL_FLAGS_NONE,
  5136. -    -1,
  5137. -    cancellable,
  5138. -    error);
  5139. -  if (_ret == NULL)
  5140. -    goto _out;
  5141. -  g_variant_get (_ret,
  5142. -                 "()");
  5143. -  g_variant_unref (_ret);
  5144. -_out:
  5145. -  return _ret != NULL;
  5146. -}
  5147. -
  5148. -/**
  5149. - * timedate1_complete_set_time:
  5150. - * @object: A #Timedate1.
  5151. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  5152. - *
  5153. - * 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.
  5154. - *
  5155. - * This method will free @invocation, you cannot use it afterwards.
  5156. - */
  5157. -void
  5158. -timedate1_complete_set_time (
  5159. -    Timedate1 *object,
  5160. -    GDBusMethodInvocation *invocation)
  5161. -{
  5162. -  g_dbus_method_invocation_return_value (invocation,
  5163. -    g_variant_new ("()"));
  5164. -}
  5165. -
  5166. -/**
  5167. - * timedate1_complete_set_timezone:
  5168. - * @object: A #Timedate1.
  5169. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  5170. - *
  5171. - * 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.
  5172. - *
  5173. - * This method will free @invocation, you cannot use it afterwards.
  5174. - */
  5175. -void
  5176. -timedate1_complete_set_timezone (
  5177. -    Timedate1 *object,
  5178. -    GDBusMethodInvocation *invocation)
  5179. -{
  5180. -  g_dbus_method_invocation_return_value (invocation,
  5181. -    g_variant_new ("()"));
  5182. -}
  5183. -
  5184. -/**
  5185. - * timedate1_complete_set_local_rtc:
  5186. - * @object: A #Timedate1.
  5187. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  5188. - *
  5189. - * 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.
  5190. - *
  5191. - * This method will free @invocation, you cannot use it afterwards.
  5192. - */
  5193. -void
  5194. -timedate1_complete_set_local_rtc (
  5195. -    Timedate1 *object,
  5196. -    GDBusMethodInvocation *invocation)
  5197. -{
  5198. -  g_dbus_method_invocation_return_value (invocation,
  5199. -    g_variant_new ("()"));
  5200. -}
  5201. -
  5202. -/**
  5203. - * timedate1_complete_set_ntp:
  5204. - * @object: A #Timedate1.
  5205. - * @invocation: (transfer full): A #GDBusMethodInvocation.
  5206. - *
  5207. - * 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.
  5208. - *
  5209. - * This method will free @invocation, you cannot use it afterwards.
  5210. - */
  5211. -void
  5212. -timedate1_complete_set_ntp (
  5213. -    Timedate1 *object,
  5214. -    GDBusMethodInvocation *invocation)
  5215. -{
  5216. -  g_dbus_method_invocation_return_value (invocation,
  5217. -    g_variant_new ("()"));
  5218. -}
  5219. -
  5220. -/* ------------------------------------------------------------------------ */
  5221. -
  5222. -/**
  5223. - * Timedate1Proxy:
  5224. - *
  5225. - * The #Timedate1Proxy structure contains only private data and should only be accessed using the provided API.
  5226. - */
  5227. -
  5228. -/**
  5229. - * Timedate1ProxyClass:
  5230. - * @parent_class: The parent class.
  5231. - *
  5232. - * Class structure for #Timedate1Proxy.
  5233. - */
  5234. -
  5235. -struct _Timedate1ProxyPrivate
  5236. -{
  5237. -  GData *qdata;
  5238. -};
  5239. -
  5240. -static void timedate1_proxy_iface_init (Timedate1Iface *iface);
  5241. -
  5242. -G_DEFINE_TYPE_WITH_CODE (Timedate1Proxy, timedate1_proxy, G_TYPE_DBUS_PROXY,
  5243. -                         G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_proxy_iface_init));
  5244. -
  5245. -static void
  5246. -timedate1_proxy_finalize (GObject *object)
  5247. -{
  5248. -  Timedate1Proxy *proxy = TIMEDATE1_PROXY (object);
  5249. -  g_datalist_clear (&proxy->priv->qdata);
  5250. -  G_OBJECT_CLASS (timedate1_proxy_parent_class)->finalize (object);
  5251. -}
  5252. -
  5253. -static void
  5254. -timedate1_proxy_get_property (GObject      *object,
  5255. -  guint         prop_id,
  5256. -  GValue       *value,
  5257. -  GParamSpec   *pspec)
  5258. -{
  5259. -  const _ExtendedGDBusPropertyInfo *info;
  5260. -  GVariant *variant;
  5261. -  g_assert (prop_id != 0 && prop_id - 1 < 3);
  5262. -  info = _timedate1_property_info_pointers[prop_id - 1];
  5263. -  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
  5264. -  if (info->use_gvariant)
  5265. -    {
  5266. -      g_value_set_variant (value, variant);
  5267. -    }
  5268. -  else
  5269. -    {
  5270. -      if (variant != NULL)
  5271. -        g_dbus_gvariant_to_gvalue (variant, value);
  5272. -    }
  5273. -  if (variant != NULL)
  5274. -    g_variant_unref (variant);
  5275. -}
  5276. -
  5277. -static void
  5278. -timedate1_proxy_set_property_cb (GDBusProxy *proxy,
  5279. -  GAsyncResult *res,
  5280. -  gpointer      user_data)
  5281. -{
  5282. -  const _ExtendedGDBusPropertyInfo *info = user_data;
  5283. -  GError *error;
  5284. -  error = NULL;
  5285. -  if (!g_dbus_proxy_call_finish (proxy, res, &error))
  5286. -    {
  5287. -      g_warning ("Error setting property `%s' on interface org.freedesktop.timedate1: %s (%s, %d)",
  5288. -                 info->parent_struct.name,
  5289. -                 error->message, g_quark_to_string (error->domain), error->code);
  5290. -      g_error_free (error);
  5291. -    }
  5292. -}
  5293. -
  5294. -static void
  5295. -timedate1_proxy_set_property (GObject      *object,
  5296. -  guint         prop_id,
  5297. -  const GValue *value,
  5298. -  GParamSpec   *pspec)
  5299. -{
  5300. -  const _ExtendedGDBusPropertyInfo *info;
  5301. -  GVariant *variant;
  5302. -  g_assert (prop_id != 0 && prop_id - 1 < 3);
  5303. -  info = _timedate1_property_info_pointers[prop_id - 1];
  5304. -  variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
  5305. -  g_dbus_proxy_call (G_DBUS_PROXY (object),
  5306. -    "org.freedesktop.DBus.Properties.Set",
  5307. -    g_variant_new ("(ssv)", "org.freedesktop.timedate1", info->parent_struct.name, variant),
  5308. -    G_DBUS_CALL_FLAGS_NONE,
  5309. -    -1,
  5310. -    NULL, (GAsyncReadyCallback) timedate1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
  5311. -  g_variant_unref (variant);
  5312. -}
  5313. -
  5314. -static void
  5315. -timedate1_proxy_g_signal (GDBusProxy *proxy,
  5316. -  const gchar *sender_name,
  5317. -  const gchar *signal_name,
  5318. -  GVariant *parameters)
  5319. -{
  5320. -  _ExtendedGDBusSignalInfo *info;
  5321. -  GVariantIter iter;
  5322. -  GVariant *child;
  5323. -  GValue *paramv;
  5324. -  guint num_params;
  5325. -  guint n;
  5326. -  guint signal_id;
  5327. -  info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, signal_name);
  5328. -  if (info == NULL)
  5329. -    return;
  5330. -  num_params = g_variant_n_children (parameters);
  5331. -  paramv = g_new0 (GValue, num_params + 1);
  5332. -  g_value_init (&paramv[0], TYPE_TIMEDATE1);
  5333. -  g_value_set_object (&paramv[0], proxy);
  5334. -  g_variant_iter_init (&iter, parameters);
  5335. -  n = 1;
  5336. -  while ((child = g_variant_iter_next_value (&iter)) != NULL)
  5337. -    {
  5338. -      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
  5339. -      if (arg_info->use_gvariant)
  5340. -        {
  5341. -          g_value_init (&paramv[n], G_TYPE_VARIANT);
  5342. -          g_value_set_variant (&paramv[n], child);
  5343. -          n++;
  5344. -        }
  5345. -      else
  5346. -        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
  5347. -      g_variant_unref (child);
  5348. -    }
  5349. -  signal_id = g_signal_lookup (info->signal_name, TYPE_TIMEDATE1);
  5350. -  g_signal_emitv (paramv, signal_id, 0, NULL);
  5351. -  for (n = 0; n < num_params + 1; n++)
  5352. -    g_value_unset (&paramv[n]);
  5353. -  g_free (paramv);
  5354. -}
  5355. -
  5356. -static void
  5357. -timedate1_proxy_g_properties_changed (GDBusProxy *_proxy,
  5358. -  GVariant *changed_properties,
  5359. -  const gchar *const *invalidated_properties)
  5360. -{
  5361. -  Timedate1Proxy *proxy = TIMEDATE1_PROXY (_proxy);
  5362. -  guint n;
  5363. -  const gchar *key;
  5364. -  GVariantIter *iter;
  5365. -  _ExtendedGDBusPropertyInfo *info;
  5366. -  g_variant_get (changed_properties, "a{sv}", &iter);
  5367. -  while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
  5368. -    {
  5369. -      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, key);
  5370. -      g_datalist_remove_data (&proxy->priv->qdata, key);
  5371. -      if (info != NULL)
  5372. -        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
  5373. -    }
  5374. -  g_variant_iter_free (iter);
  5375. -  for (n = 0; invalidated_properties[n] != NULL; n++)
  5376. -    {
  5377. -      info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, invalidated_properties[n]);
  5378. -      g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
  5379. -      if (info != NULL)
  5380. -        g_object_notify (G_OBJECT (proxy), info->hyphen_name);
  5381. -    }
  5382. -}
  5383. -
  5384. -static const gchar *
  5385. -timedate1_proxy_get_timezone (Timedate1 *object)
  5386. -{
  5387. -  Timedate1Proxy *proxy = TIMEDATE1_PROXY (object);
  5388. -  GVariant *variant;
  5389. -  const gchar *value = NULL;
  5390. -  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Timezone");
  5391. -  if (variant != NULL)
  5392. -    {
  5393. -      value = g_variant_get_string (variant, NULL);
  5394. -      g_variant_unref (variant);
  5395. -    }
  5396. -  return value;
  5397. -}
  5398. -
  5399. -static gboolean
  5400. -timedate1_proxy_get_local_rtc (Timedate1 *object)
  5401. -{
  5402. -  Timedate1Proxy *proxy = TIMEDATE1_PROXY (object);
  5403. -  GVariant *variant;
  5404. -  gboolean value = 0;
  5405. -  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LocalRTC");
  5406. -  if (variant != NULL)
  5407. -    {
  5408. -      value = g_variant_get_boolean (variant);
  5409. -      g_variant_unref (variant);
  5410. -    }
  5411. -  return value;
  5412. -}
  5413. -
  5414. -static gboolean
  5415. -timedate1_proxy_get_ntp (Timedate1 *object)
  5416. -{
  5417. -  Timedate1Proxy *proxy = TIMEDATE1_PROXY (object);
  5418. -  GVariant *variant;
  5419. -  gboolean value = 0;
  5420. -  variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NTP");
  5421. -  if (variant != NULL)
  5422. -    {
  5423. -      value = g_variant_get_boolean (variant);
  5424. -      g_variant_unref (variant);
  5425. -    }
  5426. -  return value;
  5427. -}
  5428. -
  5429. -static void
  5430. -timedate1_proxy_init (Timedate1Proxy *proxy)
  5431. -{
  5432. -  proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_TIMEDATE1_PROXY, Timedate1ProxyPrivate);
  5433. -  g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), timedate1_interface_info ());
  5434. -}
  5435. -
  5436. -static void
  5437. -timedate1_proxy_class_init (Timedate1ProxyClass *klass)
  5438. -{
  5439. -  GObjectClass *gobject_class;
  5440. -  GDBusProxyClass *proxy_class;
  5441. -
  5442. -  g_type_class_add_private (klass, sizeof (Timedate1ProxyPrivate));
  5443. -
  5444. -  gobject_class = G_OBJECT_CLASS (klass);
  5445. -  gobject_class->finalize     = timedate1_proxy_finalize;
  5446. -  gobject_class->get_property = timedate1_proxy_get_property;
  5447. -  gobject_class->set_property = timedate1_proxy_set_property;
  5448. -
  5449. -  proxy_class = G_DBUS_PROXY_CLASS (klass);
  5450. -  proxy_class->g_signal = timedate1_proxy_g_signal;
  5451. -  proxy_class->g_properties_changed = timedate1_proxy_g_properties_changed;
  5452. -
  5453. -
  5454. -  timedate1_override_properties (gobject_class, 1);
  5455. -}
  5456. -
  5457. -static void
  5458. -timedate1_proxy_iface_init (Timedate1Iface *iface)
  5459. -{
  5460. -  iface->get_timezone = timedate1_proxy_get_timezone;
  5461. -  iface->get_local_rtc = timedate1_proxy_get_local_rtc;
  5462. -  iface->get_ntp = timedate1_proxy_get_ntp;
  5463. -}
  5464. -
  5465. -/**
  5466. - * timedate1_proxy_new:
  5467. - * @connection: A #GDBusConnection.
  5468. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  5469. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  5470. - * @object_path: An object path.
  5471. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5472. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  5473. - * @user_data: User data to pass to @callback.
  5474. - *
  5475. - * 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.
  5476. - *
  5477. - * 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.
  5478. - * You can then call timedate1_proxy_new_finish() to get the result of the operation.
  5479. - *
  5480. - * See timedate1_proxy_new_sync() for the synchronous, blocking version of this constructor.
  5481. - */
  5482. -void
  5483. -timedate1_proxy_new (
  5484. -    GDBusConnection     *connection,
  5485. -    GDBusProxyFlags      flags,
  5486. -    const gchar         *name,
  5487. -    const gchar         *object_path,
  5488. -    GCancellable        *cancellable,
  5489. -    GAsyncReadyCallback  callback,
  5490. -    gpointer             user_data)
  5491. -{
  5492. -  g_async_initable_new_async (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);
  5493. -}
  5494. -
  5495. -/**
  5496. - * timedate1_proxy_new_finish:
  5497. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_proxy_new().
  5498. - * @error: Return location for error or %NULL
  5499. - *
  5500. - * Finishes an operation started with timedate1_proxy_new().
  5501. - *
  5502. - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set.
  5503. - */
  5504. -Timedate1 *
  5505. -timedate1_proxy_new_finish (
  5506. -    GAsyncResult        *res,
  5507. -    GError             **error)
  5508. -{
  5509. -  GObject *ret;
  5510. -  GObject *source_object;
  5511. -  source_object = g_async_result_get_source_object (res);
  5512. -  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  5513. -  g_object_unref (source_object);
  5514. -  if (ret != NULL)
  5515. -    return TIMEDATE1 (ret);
  5516. -  else
  5517. -    return NULL;
  5518. -}
  5519. -
  5520. -/**
  5521. - * timedate1_proxy_new_sync:
  5522. - * @connection: A #GDBusConnection.
  5523. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  5524. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
  5525. - * @object_path: An object path.
  5526. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5527. - * @error: Return location for error or %NULL
  5528. - *
  5529. - * 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.
  5530. - *
  5531. - * The calling thread is blocked until a reply is received.
  5532. - *
  5533. - * See timedate1_proxy_new() for the asynchronous version of this constructor.
  5534. - *
  5535. - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set.
  5536. - */
  5537. -Timedate1 *
  5538. -timedate1_proxy_new_sync (
  5539. -    GDBusConnection     *connection,
  5540. -    GDBusProxyFlags      flags,
  5541. -    const gchar         *name,
  5542. -    const gchar         *object_path,
  5543. -    GCancellable        *cancellable,
  5544. -    GError             **error)
  5545. -{
  5546. -  GInitable *ret;
  5547. -  ret = g_initable_new (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);
  5548. -  if (ret != NULL)
  5549. -    return TIMEDATE1 (ret);
  5550. -  else
  5551. -    return NULL;
  5552. -}
  5553. -
  5554. -
  5555. -/**
  5556. - * timedate1_proxy_new_for_bus:
  5557. - * @bus_type: A #GBusType.
  5558. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  5559. - * @name: A bus name (well-known or unique).
  5560. - * @object_path: An object path.
  5561. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5562. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
  5563. - * @user_data: User data to pass to @callback.
  5564. - *
  5565. - * Like timedate1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
  5566. - *
  5567. - * 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.
  5568. - * You can then call timedate1_proxy_new_for_bus_finish() to get the result of the operation.
  5569. - *
  5570. - * See timedate1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
  5571. - */
  5572. -void
  5573. -timedate1_proxy_new_for_bus (
  5574. -    GBusType             bus_type,
  5575. -    GDBusProxyFlags      flags,
  5576. -    const gchar         *name,
  5577. -    const gchar         *object_path,
  5578. -    GCancellable        *cancellable,
  5579. -    GAsyncReadyCallback  callback,
  5580. -    gpointer             user_data)
  5581. -{
  5582. -  g_async_initable_new_async (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);
  5583. -}
  5584. -
  5585. -/**
  5586. - * timedate1_proxy_new_for_bus_finish:
  5587. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_proxy_new_for_bus().
  5588. - * @error: Return location for error or %NULL
  5589. - *
  5590. - * Finishes an operation started with timedate1_proxy_new_for_bus().
  5591. - *
  5592. - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set.
  5593. - */
  5594. -Timedate1 *
  5595. -timedate1_proxy_new_for_bus_finish (
  5596. -    GAsyncResult        *res,
  5597. -    GError             **error)
  5598. -{
  5599. -  GObject *ret;
  5600. -  GObject *source_object;
  5601. -  source_object = g_async_result_get_source_object (res);
  5602. -  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
  5603. -  g_object_unref (source_object);
  5604. -  if (ret != NULL)
  5605. -    return TIMEDATE1 (ret);
  5606. -  else
  5607. -    return NULL;
  5608. -}
  5609. -
  5610. -/**
  5611. - * timedate1_proxy_new_for_bus_sync:
  5612. - * @bus_type: A #GBusType.
  5613. - * @flags: Flags from the #GDBusProxyFlags enumeration.
  5614. - * @name: A bus name (well-known or unique).
  5615. - * @object_path: An object path.
  5616. - * @cancellable: (allow-none): A #GCancellable or %NULL.
  5617. - * @error: Return location for error or %NULL
  5618. - *
  5619. - * Like timedate1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
  5620. - *
  5621. - * The calling thread is blocked until a reply is received.
  5622. - *
  5623. - * See timedate1_proxy_new_for_bus() for the asynchronous version of this constructor.
  5624. - *
  5625. - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set.
  5626. - */
  5627. -Timedate1 *
  5628. -timedate1_proxy_new_for_bus_sync (
  5629. -    GBusType             bus_type,
  5630. -    GDBusProxyFlags      flags,
  5631. -    const gchar         *name,
  5632. -    const gchar         *object_path,
  5633. -    GCancellable        *cancellable,
  5634. -    GError             **error)
  5635. -{
  5636. -  GInitable *ret;
  5637. -  ret = g_initable_new (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);
  5638. -  if (ret != NULL)
  5639. -    return TIMEDATE1 (ret);
  5640. -  else
  5641. -    return NULL;
  5642. -}
  5643. -
  5644. -
  5645. -/* ------------------------------------------------------------------------ */
  5646. -
  5647. -/**
  5648. - * Timedate1Skeleton:
  5649. - *
  5650. - * The #Timedate1Skeleton structure contains only private data and should only be accessed using the provided API.
  5651. - */
  5652. -
  5653. -/**
  5654. - * Timedate1SkeletonClass:
  5655. - * @parent_class: The parent class.
  5656. - *
  5657. - * Class structure for #Timedate1Skeleton.
  5658. - */
  5659. -
  5660. -struct _Timedate1SkeletonPrivate
  5661. -{
  5662. -  GValue *properties;
  5663. -  GList *changed_properties;
  5664. -  GSource *changed_properties_idle_source;
  5665. -  GMainContext *context;
  5666. -  GMutex lock;
  5667. -};
  5668. -
  5669. -static void
  5670. -_timedate1_skeleton_handle_method_call (
  5671. -  GDBusConnection *connection,
  5672. -  const gchar *sender,
  5673. -  const gchar *object_path,
  5674. -  const gchar *interface_name,
  5675. -  const gchar *method_name,
  5676. -  GVariant *parameters,
  5677. -  GDBusMethodInvocation *invocation,
  5678. -  gpointer user_data)
  5679. -{
  5680. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data);
  5681. -  _ExtendedGDBusMethodInfo *info;
  5682. -  GVariantIter iter;
  5683. -  GVariant *child;
  5684. -  GValue *paramv;
  5685. -  guint num_params;
  5686. -  guint num_extra;
  5687. -  guint n;
  5688. -  guint signal_id;
  5689. -  GValue return_value = G_VALUE_INIT;
  5690. -  info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
  5691. -  g_assert (info != NULL);
  5692. -  num_params = g_variant_n_children (parameters);
  5693. -  num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
  5694. -  n = 0;
  5695. -  g_value_init (&paramv[n], TYPE_TIMEDATE1);
  5696. -  g_value_set_object (&paramv[n++], skeleton);
  5697. -  g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
  5698. -  g_value_set_object (&paramv[n++], invocation);
  5699. -  if (info->pass_fdlist)
  5700. -    {
  5701. -#ifdef G_OS_UNIX
  5702. -      g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
  5703. -      g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
  5704. -#else
  5705. -      g_assert_not_reached ();
  5706. -#endif
  5707. -    }
  5708. -  g_variant_iter_init (&iter, parameters);
  5709. -  while ((child = g_variant_iter_next_value (&iter)) != NULL)
  5710. -    {
  5711. -      _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
  5712. -      if (arg_info->use_gvariant)
  5713. -        {
  5714. -          g_value_init (&paramv[n], G_TYPE_VARIANT);
  5715. -          g_value_set_variant (&paramv[n], child);
  5716. -          n++;
  5717. -        }
  5718. -      else
  5719. -        g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
  5720. -      g_variant_unref (child);
  5721. -    }
  5722. -  signal_id = g_signal_lookup (info->signal_name, TYPE_TIMEDATE1);
  5723. -  g_value_init (&return_value, G_TYPE_BOOLEAN);
  5724. -  g_signal_emitv (paramv, signal_id, 0, &return_value);
  5725. -  if (!g_value_get_boolean (&return_value))
  5726. -    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);
  5727. -  g_value_unset (&return_value);
  5728. -  for (n = 0; n < num_params + num_extra; n++)
  5729. -    g_value_unset (&paramv[n]);
  5730. -  g_free (paramv);
  5731. -}
  5732. -
  5733. -static GVariant *
  5734. -_timedate1_skeleton_handle_get_property (
  5735. -  GDBusConnection *connection,
  5736. -  const gchar *sender,
  5737. -  const gchar *object_path,
  5738. -  const gchar *interface_name,
  5739. -  const gchar *property_name,
  5740. -  GError **error,
  5741. -  gpointer user_data)
  5742. -{
  5743. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data);
  5744. -  GValue value = G_VALUE_INIT;
  5745. -  GParamSpec *pspec;
  5746. -  _ExtendedGDBusPropertyInfo *info;
  5747. -  GVariant *ret;
  5748. -  ret = NULL;
  5749. -  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, property_name);
  5750. -  g_assert (info != NULL);
  5751. -  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  5752. -  if (pspec == NULL)
  5753. -    {
  5754. -      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
  5755. -    }
  5756. -  else
  5757. -    {
  5758. -      g_value_init (&value, pspec->value_type);
  5759. -      g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
  5760. -      ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
  5761. -      g_value_unset (&value);
  5762. -    }
  5763. -  return ret;
  5764. -}
  5765. -
  5766. -static gboolean
  5767. -_timedate1_skeleton_handle_set_property (
  5768. -  GDBusConnection *connection,
  5769. -  const gchar *sender,
  5770. -  const gchar *object_path,
  5771. -  const gchar *interface_name,
  5772. -  const gchar *property_name,
  5773. -  GVariant *variant,
  5774. -  GError **error,
  5775. -  gpointer user_data)
  5776. -{
  5777. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data);
  5778. -  GValue value = G_VALUE_INIT;
  5779. -  GParamSpec *pspec;
  5780. -  _ExtendedGDBusPropertyInfo *info;
  5781. -  gboolean ret;
  5782. -  ret = FALSE;
  5783. -  info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, property_name);
  5784. -  g_assert (info != NULL);
  5785. -  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
  5786. -  if (pspec == NULL)
  5787. -    {
  5788. -      g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
  5789. -    }
  5790. -  else
  5791. -    {
  5792. -      if (info->use_gvariant)
  5793. -        g_value_set_variant (&value, variant);
  5794. -      else
  5795. -        g_dbus_gvariant_to_gvalue (variant, &value);
  5796. -      g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
  5797. -      g_value_unset (&value);
  5798. -      ret = TRUE;
  5799. -    }
  5800. -  return ret;
  5801. -}
  5802. -
  5803. -static const GDBusInterfaceVTable _timedate1_skeleton_vtable =
  5804. -{
  5805. -  _timedate1_skeleton_handle_method_call,
  5806. -  _timedate1_skeleton_handle_get_property,
  5807. -  _timedate1_skeleton_handle_set_property
  5808. -};
  5809. -
  5810. -static GDBusInterfaceInfo *
  5811. -timedate1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
  5812. -{
  5813. -  return timedate1_interface_info ();
  5814. -}
  5815. -
  5816. -static GDBusInterfaceVTable *
  5817. -timedate1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
  5818. -{
  5819. -  return (GDBusInterfaceVTable *) &_timedate1_skeleton_vtable;
  5820. -}
  5821. -
  5822. -static GVariant *
  5823. -timedate1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
  5824. -{
  5825. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (_skeleton);
  5826. -
  5827. -  GVariantBuilder builder;
  5828. -  guint n;
  5829. -  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  5830. -  if (_timedate1_interface_info.parent_struct.properties == NULL)
  5831. -    goto out;
  5832. -  for (n = 0; _timedate1_interface_info.parent_struct.properties[n] != NULL; n++)
  5833. -    {
  5834. -      GDBusPropertyInfo *info = _timedate1_interface_info.parent_struct.properties[n];
  5835. -      if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
  5836. -        {
  5837. -          GVariant *value;
  5838. -          value = _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);
  5839. -          if (value != NULL)
  5840. -            {
  5841. -              g_variant_take_ref (value);
  5842. -              g_variant_builder_add (&builder, "{sv}", info->name, value);
  5843. -              g_variant_unref (value);
  5844. -            }
  5845. -        }
  5846. -    }
  5847. -out:
  5848. -  return g_variant_builder_end (&builder);
  5849. -}
  5850. -
  5851. -static gboolean _timedate1_emit_changed (gpointer user_data);
  5852. -
  5853. -static void
  5854. -timedate1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
  5855. -{
  5856. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (_skeleton);
  5857. -  gboolean emit_changed = FALSE;
  5858. -
  5859. -  g_mutex_lock (&skeleton->priv->lock);
  5860. -  if (skeleton->priv->changed_properties_idle_source != NULL)
  5861. -    {
  5862. -      g_source_destroy (skeleton->priv->changed_properties_idle_source);
  5863. -      skeleton->priv->changed_properties_idle_source = NULL;
  5864. -      emit_changed = TRUE;
  5865. -    }
  5866. -  g_mutex_unlock (&skeleton->priv->lock);
  5867. -
  5868. -  if (emit_changed)
  5869. -    _timedate1_emit_changed (skeleton);
  5870. -}
  5871. -
  5872. -static void timedate1_skeleton_iface_init (Timedate1Iface *iface);
  5873. -G_DEFINE_TYPE_WITH_CODE (Timedate1Skeleton, timedate1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
  5874. -                         G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_skeleton_iface_init));
  5875. -
  5876. -static void
  5877. -timedate1_skeleton_finalize (GObject *object)
  5878. -{
  5879. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  5880. -  guint n;
  5881. -  for (n = 0; n < 3; n++)
  5882. -    g_value_unset (&skeleton->priv->properties[n]);
  5883. -  g_free (skeleton->priv->properties);
  5884. -  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  5885. -  if (skeleton->priv->changed_properties_idle_source != NULL)
  5886. -    g_source_destroy (skeleton->priv->changed_properties_idle_source);
  5887. -  g_main_context_unref (skeleton->priv->context);
  5888. -  g_mutex_clear (&skeleton->priv->lock);
  5889. -  G_OBJECT_CLASS (timedate1_skeleton_parent_class)->finalize (object);
  5890. -}
  5891. -
  5892. -static void
  5893. -timedate1_skeleton_get_property (GObject      *object,
  5894. -  guint         prop_id,
  5895. -  GValue       *value,
  5896. -  GParamSpec   *pspec)
  5897. -{
  5898. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  5899. -  g_assert (prop_id != 0 && prop_id - 1 < 3);
  5900. -  g_mutex_lock (&skeleton->priv->lock);
  5901. -  g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
  5902. -  g_mutex_unlock (&skeleton->priv->lock);
  5903. -}
  5904. -
  5905. -static gboolean
  5906. -_timedate1_emit_changed (gpointer user_data)
  5907. -{
  5908. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data);
  5909. -  GList *l;
  5910. -  GVariantBuilder builder;
  5911. -  GVariantBuilder invalidated_builder;
  5912. -  guint num_changes;
  5913. -
  5914. -  g_mutex_lock (&skeleton->priv->lock);
  5915. -  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
  5916. -  g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
  5917. -  for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
  5918. -    {
  5919. -      ChangedProperty *cp = l->data;
  5920. -      GVariant *variant;
  5921. -      const GValue *cur_value;
  5922. -
  5923. -      cur_value = &skeleton->priv->properties[cp->prop_id - 1];
  5924. -      if (!_g_value_equal (cur_value, &cp->orig_value))
  5925. -        {
  5926. -          variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
  5927. -          g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
  5928. -          g_variant_unref (variant);
  5929. -          num_changes++;
  5930. -        }
  5931. -    }
  5932. -  if (num_changes > 0)
  5933. -    {
  5934. -      GList *connections, *ll;
  5935. -      GVariant *signal_variant;
  5936. -      signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.timedate1",
  5937. -                                           &builder, &invalidated_builder));
  5938. -      connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
  5939. -      for (ll = connections; ll != NULL; ll = ll->next)
  5940. -        {
  5941. -          GDBusConnection *connection = ll->data;
  5942. -
  5943. -          g_dbus_connection_emit_signal (connection,
  5944. -                                         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
  5945. -                                         "org.freedesktop.DBus.Properties",
  5946. -                                         "PropertiesChanged",
  5947. -                                         signal_variant,
  5948. -                                         NULL);
  5949. -        }
  5950. -      g_variant_unref (signal_variant);
  5951. -      g_list_free_full (connections, g_object_unref);
  5952. -    }
  5953. -  else
  5954. -    {
  5955. -      g_variant_builder_clear (&builder);
  5956. -      g_variant_builder_clear (&invalidated_builder);
  5957. -    }
  5958. -  g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
  5959. -  skeleton->priv->changed_properties = NULL;
  5960. -  skeleton->priv->changed_properties_idle_source = NULL;
  5961. -  g_mutex_unlock (&skeleton->priv->lock);
  5962. -  return FALSE;
  5963. -}
  5964. -
  5965. -static void
  5966. -_timedate1_schedule_emit_changed (Timedate1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
  5967. -{
  5968. -  ChangedProperty *cp;
  5969. -  GList *l;
  5970. -  cp = NULL;
  5971. -  for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
  5972. -    {
  5973. -      ChangedProperty *i_cp = l->data;
  5974. -      if (i_cp->info == info)
  5975. -        {
  5976. -          cp = i_cp;
  5977. -          break;
  5978. -        }
  5979. -    }
  5980. -  if (cp == NULL)
  5981. -    {
  5982. -      cp = g_new0 (ChangedProperty, 1);
  5983. -      cp->prop_id = prop_id;
  5984. -      cp->info = info;
  5985. -      skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
  5986. -      g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
  5987. -      g_value_copy (orig_value, &cp->orig_value);
  5988. -    }
  5989. -}
  5990. -
  5991. -static void
  5992. -timedate1_skeleton_notify (GObject      *object,
  5993. -  GParamSpec *pspec)
  5994. -{
  5995. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  5996. -  g_mutex_lock (&skeleton->priv->lock);
  5997. -  if (skeleton->priv->changed_properties != NULL &&
  5998. -      skeleton->priv->changed_properties_idle_source == NULL)
  5999. -    {
  6000. -      skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
  6001. -      g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
  6002. -      g_source_set_callback (skeleton->priv->changed_properties_idle_source, _timedate1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
  6003. -      g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
  6004. -      g_source_unref (skeleton->priv->changed_properties_idle_source);
  6005. -    }
  6006. -  g_mutex_unlock (&skeleton->priv->lock);
  6007. -}
  6008. -
  6009. -static void
  6010. -timedate1_skeleton_set_property (GObject      *object,
  6011. -  guint         prop_id,
  6012. -  const GValue *value,
  6013. -  GParamSpec   *pspec)
  6014. -{
  6015. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  6016. -  g_assert (prop_id != 0 && prop_id - 1 < 3);
  6017. -  g_mutex_lock (&skeleton->priv->lock);
  6018. -  g_object_freeze_notify (object);
  6019. -  if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
  6020. -    {
  6021. -      if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
  6022. -        _timedate1_schedule_emit_changed (skeleton, _timedate1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
  6023. -      g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
  6024. -      g_object_notify_by_pspec (object, pspec);
  6025. -    }
  6026. -  g_mutex_unlock (&skeleton->priv->lock);
  6027. -  g_object_thaw_notify (object);
  6028. -}
  6029. -
  6030. -static void
  6031. -timedate1_skeleton_init (Timedate1Skeleton *skeleton)
  6032. -{
  6033. -  skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonPrivate);
  6034. -  g_mutex_init (&skeleton->priv->lock);
  6035. -  skeleton->priv->context = g_main_context_ref_thread_default ();
  6036. -  skeleton->priv->properties = g_new0 (GValue, 3);
  6037. -  g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
  6038. -  g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN);
  6039. -  g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN);
  6040. -}
  6041. -
  6042. -static const gchar *
  6043. -timedate1_skeleton_get_timezone (Timedate1 *object)
  6044. -{
  6045. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  6046. -  const gchar *value;
  6047. -  g_mutex_lock (&skeleton->priv->lock);
  6048. -  value = g_value_get_string (&(skeleton->priv->properties[0]));
  6049. -  g_mutex_unlock (&skeleton->priv->lock);
  6050. -  return value;
  6051. -}
  6052. -
  6053. -static gboolean
  6054. -timedate1_skeleton_get_local_rtc (Timedate1 *object)
  6055. -{
  6056. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  6057. -  gboolean value;
  6058. -  g_mutex_lock (&skeleton->priv->lock);
  6059. -  value = g_value_get_boolean (&(skeleton->priv->properties[1]));
  6060. -  g_mutex_unlock (&skeleton->priv->lock);
  6061. -  return value;
  6062. -}
  6063. -
  6064. -static gboolean
  6065. -timedate1_skeleton_get_ntp (Timedate1 *object)
  6066. -{
  6067. -  Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object);
  6068. -  gboolean value;
  6069. -  g_mutex_lock (&skeleton->priv->lock);
  6070. -  value = g_value_get_boolean (&(skeleton->priv->properties[2]));
  6071. -  g_mutex_unlock (&skeleton->priv->lock);
  6072. -  return value;
  6073. -}
  6074. -
  6075. -static void
  6076. -timedate1_skeleton_class_init (Timedate1SkeletonClass *klass)
  6077. -{
  6078. -  GObjectClass *gobject_class;
  6079. -  GDBusInterfaceSkeletonClass *skeleton_class;
  6080. -
  6081. -  g_type_class_add_private (klass, sizeof (Timedate1SkeletonPrivate));
  6082. -
  6083. -  gobject_class = G_OBJECT_CLASS (klass);
  6084. -  gobject_class->finalize = timedate1_skeleton_finalize;
  6085. -  gobject_class->get_property = timedate1_skeleton_get_property;
  6086. -  gobject_class->set_property = timedate1_skeleton_set_property;
  6087. -  gobject_class->notify       = timedate1_skeleton_notify;
  6088. -
  6089. -
  6090. -  timedate1_override_properties (gobject_class, 1);
  6091. -
  6092. -  skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
  6093. -  skeleton_class->get_info = timedate1_skeleton_dbus_interface_get_info;
  6094. -  skeleton_class->get_properties = timedate1_skeleton_dbus_interface_get_properties;
  6095. -  skeleton_class->flush = timedate1_skeleton_dbus_interface_flush;
  6096. -  skeleton_class->get_vtable = timedate1_skeleton_dbus_interface_get_vtable;
  6097. -}
  6098. -
  6099. -static void
  6100. -timedate1_skeleton_iface_init (Timedate1Iface *iface)
  6101. -{
  6102. -  iface->get_timezone = timedate1_skeleton_get_timezone;
  6103. -  iface->get_local_rtc = timedate1_skeleton_get_local_rtc;
  6104. -  iface->get_ntp = timedate1_skeleton_get_ntp;
  6105. -}
  6106. -
  6107. -/**
  6108. - * timedate1_skeleton_new:
  6109. - *
  6110. - * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-timedate1.top_of_page">org.freedesktop.timedate1</link>.
  6111. - *
  6112. - * Returns: (transfer full) (type Timedate1Skeleton): The skeleton object.
  6113. - */
  6114. -Timedate1 *
  6115. -timedate1_skeleton_new (void)
  6116. -{
  6117. -  return TIMEDATE1 (g_object_new (TYPE_TIMEDATE1_SKELETON, NULL));
  6118. -}
  6119. -
  6120. diff --git a/panels/datetime/timedated.h b/panels/datetime/timedated.h
  6121. deleted file mode 100644
  6122. index 96bdecc..0000000
  6123. --- a/panels/datetime/timedated.h
  6124. +++ /dev/null
  6125. @@ -1,288 +0,0 @@
  6126. -/*
  6127. - * Generated by gdbus-codegen 2.34.1. DO NOT EDIT.
  6128. - *
  6129. - * The license of this code is the same as for the source it was derived from.
  6130. - */
  6131. -
  6132. -#ifndef __TIMEDATED_H__
  6133. -#define __TIMEDATED_H__
  6134. -
  6135. -#include <gio/gio.h>
  6136. -
  6137. -G_BEGIN_DECLS
  6138. -
  6139. -
  6140. -/* ------------------------------------------------------------------------ */
  6141. -/* Declarations for org.freedesktop.timedate1 */
  6142. -
  6143. -#define TYPE_TIMEDATE1 (timedate1_get_type ())
  6144. -#define TIMEDATE1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1, Timedate1))
  6145. -#define IS_TIMEDATE1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1))
  6146. -#define TIMEDATE1_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_TIMEDATE1, Timedate1Iface))
  6147. -
  6148. -struct _Timedate1;
  6149. -typedef struct _Timedate1 Timedate1;
  6150. -typedef struct _Timedate1Iface Timedate1Iface;
  6151. -
  6152. -struct _Timedate1Iface
  6153. -{
  6154. -  GTypeInterface parent_iface;
  6155. -
  6156. -
  6157. -  gboolean (*handle_set_local_rtc) (
  6158. -    Timedate1 *object,
  6159. -    GDBusMethodInvocation *invocation,
  6160. -    gboolean arg_local_rtc,
  6161. -    gboolean arg_fix_system,
  6162. -    gboolean arg_user_interaction);
  6163. -
  6164. -  gboolean (*handle_set_ntp) (
  6165. -    Timedate1 *object,
  6166. -    GDBusMethodInvocation *invocation,
  6167. -    gboolean arg_use_ntp,
  6168. -    gboolean arg_user_interaction);
  6169. -
  6170. -  gboolean (*handle_set_time) (
  6171. -    Timedate1 *object,
  6172. -    GDBusMethodInvocation *invocation,
  6173. -    gint64 arg_usec_utc,
  6174. -    gboolean arg_relative,
  6175. -    gboolean arg_user_interaction);
  6176. -
  6177. -  gboolean (*handle_set_timezone) (
  6178. -    Timedate1 *object,
  6179. -    GDBusMethodInvocation *invocation,
  6180. -    const gchar *arg_timezone,
  6181. -    gboolean arg_user_interaction);
  6182. -
  6183. -  gboolean  (*get_local_rtc) (Timedate1 *object);
  6184. -
  6185. -  gboolean  (*get_ntp) (Timedate1 *object);
  6186. -
  6187. -  const gchar * (*get_timezone) (Timedate1 *object);
  6188. -
  6189. -};
  6190. -
  6191. -GType timedate1_get_type (void) G_GNUC_CONST;
  6192. -
  6193. -GDBusInterfaceInfo *timedate1_interface_info (void);
  6194. -guint timedate1_override_properties (GObjectClass *klass, guint property_id_begin);
  6195. -
  6196. -
  6197. -/* D-Bus method call completion functions: */
  6198. -void timedate1_complete_set_time (
  6199. -    Timedate1 *object,
  6200. -    GDBusMethodInvocation *invocation);
  6201. -
  6202. -void timedate1_complete_set_timezone (
  6203. -    Timedate1 *object,
  6204. -    GDBusMethodInvocation *invocation);
  6205. -
  6206. -void timedate1_complete_set_local_rtc (
  6207. -    Timedate1 *object,
  6208. -    GDBusMethodInvocation *invocation);
  6209. -
  6210. -void timedate1_complete_set_ntp (
  6211. -    Timedate1 *object,
  6212. -    GDBusMethodInvocation *invocation);
  6213. -
  6214. -
  6215. -
  6216. -/* D-Bus method calls: */
  6217. -void timedate1_call_set_time (
  6218. -    Timedate1 *proxy,
  6219. -    gint64 arg_usec_utc,
  6220. -    gboolean arg_relative,
  6221. -    gboolean arg_user_interaction,
  6222. -    GCancellable *cancellable,
  6223. -    GAsyncReadyCallback callback,
  6224. -    gpointer user_data);
  6225. -
  6226. -gboolean timedate1_call_set_time_finish (
  6227. -    Timedate1 *proxy,
  6228. -    GAsyncResult *res,
  6229. -    GError **error);
  6230. -
  6231. -gboolean timedate1_call_set_time_sync (
  6232. -    Timedate1 *proxy,
  6233. -    gint64 arg_usec_utc,
  6234. -    gboolean arg_relative,
  6235. -    gboolean arg_user_interaction,
  6236. -    GCancellable *cancellable,
  6237. -    GError **error);
  6238. -
  6239. -void timedate1_call_set_timezone (
  6240. -    Timedate1 *proxy,
  6241. -    const gchar *arg_timezone,
  6242. -    gboolean arg_user_interaction,
  6243. -    GCancellable *cancellable,
  6244. -    GAsyncReadyCallback callback,
  6245. -    gpointer user_data);
  6246. -
  6247. -gboolean timedate1_call_set_timezone_finish (
  6248. -    Timedate1 *proxy,
  6249. -    GAsyncResult *res,
  6250. -    GError **error);
  6251. -
  6252. -gboolean timedate1_call_set_timezone_sync (
  6253. -    Timedate1 *proxy,
  6254. -    const gchar *arg_timezone,
  6255. -    gboolean arg_user_interaction,
  6256. -    GCancellable *cancellable,
  6257. -    GError **error);
  6258. -
  6259. -void timedate1_call_set_local_rtc (
  6260. -    Timedate1 *proxy,
  6261. -    gboolean arg_local_rtc,
  6262. -    gboolean arg_fix_system,
  6263. -    gboolean arg_user_interaction,
  6264. -    GCancellable *cancellable,
  6265. -    GAsyncReadyCallback callback,
  6266. -    gpointer user_data);
  6267. -
  6268. -gboolean timedate1_call_set_local_rtc_finish (
  6269. -    Timedate1 *proxy,
  6270. -    GAsyncResult *res,
  6271. -    GError **error);
  6272. -
  6273. -gboolean timedate1_call_set_local_rtc_sync (
  6274. -    Timedate1 *proxy,
  6275. -    gboolean arg_local_rtc,
  6276. -    gboolean arg_fix_system,
  6277. -    gboolean arg_user_interaction,
  6278. -    GCancellable *cancellable,
  6279. -    GError **error);
  6280. -
  6281. -void timedate1_call_set_ntp (
  6282. -    Timedate1 *proxy,
  6283. -    gboolean arg_use_ntp,
  6284. -    gboolean arg_user_interaction,
  6285. -    GCancellable *cancellable,
  6286. -    GAsyncReadyCallback callback,
  6287. -    gpointer user_data);
  6288. -
  6289. -gboolean timedate1_call_set_ntp_finish (
  6290. -    Timedate1 *proxy,
  6291. -    GAsyncResult *res,
  6292. -    GError **error);
  6293. -
  6294. -gboolean timedate1_call_set_ntp_sync (
  6295. -    Timedate1 *proxy,
  6296. -    gboolean arg_use_ntp,
  6297. -    gboolean arg_user_interaction,
  6298. -    GCancellable *cancellable,
  6299. -    GError **error);
  6300. -
  6301. -
  6302. -
  6303. -/* D-Bus property accessors: */
  6304. -const gchar *timedate1_get_timezone (Timedate1 *object);
  6305. -gchar *timedate1_dup_timezone (Timedate1 *object);
  6306. -void timedate1_set_timezone (Timedate1 *object, const gchar *value);
  6307. -
  6308. -gboolean timedate1_get_local_rtc (Timedate1 *object);
  6309. -void timedate1_set_local_rtc (Timedate1 *object, gboolean value);
  6310. -
  6311. -gboolean timedate1_get_ntp (Timedate1 *object);
  6312. -void timedate1_set_ntp (Timedate1 *object, gboolean value);
  6313. -
  6314. -
  6315. -/* ---- */
  6316. -
  6317. -#define TYPE_TIMEDATE1_PROXY (timedate1_proxy_get_type ())
  6318. -#define TIMEDATE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1_PROXY, Timedate1Proxy))
  6319. -#define TIMEDATE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_TIMEDATE1_PROXY, Timedate1ProxyClass))
  6320. -#define TIMEDATE1_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_TIMEDATE1_PROXY, Timedate1ProxyClass))
  6321. -#define IS_TIMEDATE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1_PROXY))
  6322. -#define IS_TIMEDATE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_TIMEDATE1_PROXY))
  6323. -
  6324. -typedef struct _Timedate1Proxy Timedate1Proxy;
  6325. -typedef struct _Timedate1ProxyClass Timedate1ProxyClass;
  6326. -typedef struct _Timedate1ProxyPrivate Timedate1ProxyPrivate;
  6327. -
  6328. -struct _Timedate1Proxy
  6329. -{
  6330. -  /*< private >*/
  6331. -  GDBusProxy parent_instance;
  6332. -  Timedate1ProxyPrivate *priv;
  6333. -};
  6334. -
  6335. -struct _Timedate1ProxyClass
  6336. -{
  6337. -  GDBusProxyClass parent_class;
  6338. -};
  6339. -
  6340. -GType timedate1_proxy_get_type (void) G_GNUC_CONST;
  6341. -
  6342. -void timedate1_proxy_new (
  6343. -    GDBusConnection     *connection,
  6344. -    GDBusProxyFlags      flags,
  6345. -    const gchar         *name,
  6346. -    const gchar         *object_path,
  6347. -    GCancellable        *cancellable,
  6348. -    GAsyncReadyCallback  callback,
  6349. -    gpointer             user_data);
  6350. -Timedate1 *timedate1_proxy_new_finish (
  6351. -    GAsyncResult        *res,
  6352. -    GError             **error);
  6353. -Timedate1 *timedate1_proxy_new_sync (
  6354. -    GDBusConnection     *connection,
  6355. -    GDBusProxyFlags      flags,
  6356. -    const gchar         *name,
  6357. -    const gchar         *object_path,
  6358. -    GCancellable        *cancellable,
  6359. -    GError             **error);
  6360. -
  6361. -void timedate1_proxy_new_for_bus (
  6362. -    GBusType             bus_type,
  6363. -    GDBusProxyFlags      flags,
  6364. -    const gchar         *name,
  6365. -    const gchar         *object_path,
  6366. -    GCancellable        *cancellable,
  6367. -    GAsyncReadyCallback  callback,
  6368. -    gpointer             user_data);
  6369. -Timedate1 *timedate1_proxy_new_for_bus_finish (
  6370. -    GAsyncResult        *res,
  6371. -    GError             **error);
  6372. -Timedate1 *timedate1_proxy_new_for_bus_sync (
  6373. -    GBusType             bus_type,
  6374. -    GDBusProxyFlags      flags,
  6375. -    const gchar         *name,
  6376. -    const gchar         *object_path,
  6377. -    GCancellable        *cancellable,
  6378. -    GError             **error);
  6379. -
  6380. -
  6381. -/* ---- */
  6382. -
  6383. -#define TYPE_TIMEDATE1_SKELETON (timedate1_skeleton_get_type ())
  6384. -#define TIMEDATE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1_SKELETON, Timedate1Skeleton))
  6385. -#define TIMEDATE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonClass))
  6386. -#define TIMEDATE1_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonClass))
  6387. -#define IS_TIMEDATE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1_SKELETON))
  6388. -#define IS_TIMEDATE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_TIMEDATE1_SKELETON))
  6389. -
  6390. -typedef struct _Timedate1Skeleton Timedate1Skeleton;
  6391. -typedef struct _Timedate1SkeletonClass Timedate1SkeletonClass;
  6392. -typedef struct _Timedate1SkeletonPrivate Timedate1SkeletonPrivate;
  6393. -
  6394. -struct _Timedate1Skeleton
  6395. -{
  6396. -  /*< private >*/
  6397. -  GDBusInterfaceSkeleton parent_instance;
  6398. -  Timedate1SkeletonPrivate *priv;
  6399. -};
  6400. -
  6401. -struct _Timedate1SkeletonClass
  6402. -{
  6403. -  GDBusInterfaceSkeletonClass parent_class;
  6404. -};
  6405. -
  6406. -GType timedate1_skeleton_get_type (void) G_GNUC_CONST;
  6407. -
  6408. -Timedate1 *timedate1_skeleton_new (void);
  6409. -
  6410. -
  6411. -G_END_DECLS
  6412. -
  6413. -#endif /* __TIMEDATED_H__ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement