Commit 90f78394 authored by Tomáš Bžatek's avatar Tomáš Bžatek Committed by Bastien Nocera

datetime: Port to systemd's timedated service

https://bugzilla.gnome.org/show_bug.cgi?id=658352
parent 886dd007
......@@ -76,7 +76,7 @@ DESKTOP_SCHEMAS_REQUIRED_VERSION=3.0.2
PA_REQUIRED_VERSION=0.9.16
CANBERRA_REQUIRED_VERSION=0.13
GDKPIXBUF_REQUIRED_VERSION=2.23.0
POLKIT_REQUIRED_VERSION=0.97
POLKIT_REQUIRED_VERSION=0.103
GSD_REQUIRED_VERSION=3.3.4
NETWORK_MANAGER_REQUIRED_VERSION=0.8.992
LIBNOTIFY_REQUIRED_VERSION=0.7.3
......
......@@ -98,11 +98,23 @@ check-local: test-timezone-gfx test-endianess test-timezone
ccpanelsdir = $(PANELS_DIR)
ccpanels_LTLIBRARIES = libdate_time.la
# FIXME add a way to regenerate the dtm.[ch]
# gdbus-codegen --generate-c-code dtm --interface-prefix org.gnome.SettingsDaemon /path/to/gnome-settings-daemon/plugins/datetime/gsd-datetime-mechanism.xml
# See also:
# https://bugzilla.gnome.org/show_bug.cgi?id=650875
# https://bugzilla.gnome.org/show_bug.cgi?id=650874
# This requires running d-bus session and accessible timedate1 daemon
# FIXME: need to find a way how to filter out unnecessary d-bus stuff (introspectable, properties)
#timedated1-interface.xml:
# gdbus introspect \
# --xml \
# --system \
# --dest org.freedesktop.timedate1 \
# --object-path /org/freedesktop/timedate1 \
# > timedated1-interface.xml
dbus_built_sources = timedated.c timedated.h
$(dbus_built_sources) : Makefile.am timedated1-interface.xml
gdbus-codegen \
--interface-prefix org.freedesktop. \
--generate-c-code timedated \
timedated1-interface.xml
libdate_time_la_SOURCES = \
datetime-module.c \
......@@ -110,22 +122,37 @@ libdate_time_la_SOURCES = \
cc-datetime-panel.h \
cc-timezone-map.c \
cc-timezone-map.h \
dtm.c \
dtm.h \
date-endian.c \
date-endian.h \
tz.c tz.h
tz.c tz.h \
$(dbus_built_sources) \
$(NULL)
libdate_time_la_LIBADD = $(PANEL_LIBS) $(DATETIME_PANEL_LIBS)
libdate_time_la_LDFLAGS = $(PANEL_LDFLAGS)
polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.gnome.controlcenter.datetime.policy.in
@INTLTOOL_POLICY_RULE@
polkit_DATA = $(polkit_in_files:.policy.in=.policy)
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = gnome-datetime-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA)
CLEANFILES = \
$(desktop_in_files) \
$(desktop_DATA) \
$(dbus_built_sources) \
org.gnome.controlcenter.datetime.policy
-include $(top_srcdir)/git.mk
EXTRA_DIST = \
timedated1-interface.xml \
$(polkit_in_files)
-include $(top_srcdir)/git.mk
......@@ -24,7 +24,7 @@
#include <sys/time.h>
#include "cc-timezone-map.h"
#include "dtm.h"
#include "timedated.h"
#include "date-endian.h"
#define GNOME_DESKTOP_USE_UNSTABLE_API
......@@ -82,7 +82,7 @@ struct _CcDateTimePanelPrivate
GnomeWallClock *clock_tracker;
DateTimeMechanism *dtm;
Timedate1 *dtm;
GCancellable *cancellable;
GPermission *permission;
......@@ -300,9 +300,9 @@ set_time_cb (GObject *source,
GError *error;
error = NULL;
if (!date_time_mechanism_call_set_time_finish (self->priv->dtm,
res,
&error))
if (!timedate1_call_set_time_finish (self->priv->dtm,
res,
&error))
{
/* TODO: display any error in a user friendly way */
g_warning ("Could not set system time: %s", error->message);
......@@ -323,9 +323,9 @@ set_timezone_cb (GObject *source,
GError *error;
error = NULL;
if (!date_time_mechanism_call_set_timezone_finish (self->priv->dtm,
res,
&error))
if (!timedate1_call_set_timezone_finish (self->priv->dtm,
res,
&error))
{
/* TODO: display any error in a user friendly way */
g_warning ("Could not set system timezone: %s", error->message);
......@@ -342,9 +342,9 @@ set_using_ntp_cb (GObject *source,
GError *error;
error = NULL;
if (!date_time_mechanism_call_set_using_ntp_finish (self->priv->dtm,
res,
&error))
if (!timedate1_call_set_ntp_finish (self->priv->dtm,
res,
&error))
{
/* TODO: display any error in a user friendly way */
g_warning ("Could not set system to use NTP: %s", error->message);
......@@ -357,14 +357,16 @@ queue_set_datetime (CcDateTimePanel *self)
{
time_t unixtime;
/* for now just do it */
/* timedated expects number of microseconds since 1 Jan 1970 UTC */
unixtime = g_date_time_to_unix (self->priv->date);
date_time_mechanism_call_set_time (self->priv->dtm,
unixtime,
self->priv->cancellable,
set_time_cb,
self);
timedate1_call_set_time (self->priv->dtm,
unixtime * 1000000,
FALSE,
TRUE,
self->priv->cancellable,
set_time_cb,
self);
}
static void
......@@ -375,11 +377,12 @@ queue_set_ntp (CcDateTimePanel *self)
/* for now just do it */
using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch")));
date_time_mechanism_call_set_using_ntp (self->priv->dtm,
using_ntp,
self->priv->cancellable,
set_using_ntp_cb,
self);
timedate1_call_set_ntp (self->priv->dtm,
using_ntp,
TRUE,
self->priv->cancellable,
set_using_ntp_cb,
self);
}
static void
......@@ -388,11 +391,12 @@ queue_set_timezone (CcDateTimePanel *self)
/* for now just do it */
if (self->priv->current_location)
{
date_time_mechanism_call_set_timezone (self->priv->dtm,
self->priv->current_location->zone,
self->priv->cancellable,
set_timezone_cb,
self);
timedate1_call_set_timezone (self->priv->dtm,
self->priv->current_location->zone,
TRUE,
self->priv->cancellable,
set_timezone_cb,
self);
}
}
......@@ -549,46 +553,18 @@ location_changed_cb (CcTimezoneMap *map,
}
static void
get_timezone_cb (GObject *source,
GAsyncResult *res,
gpointer user_data)
get_initial_timezone (CcDateTimePanel *self)
{
CcDateTimePanel *self = user_data;
GtkWidget *widget;
gchar *timezone;
GError *error;
const gchar *timezone;
error = NULL;
if (!date_time_mechanism_call_get_timezone_finish (self->priv->dtm, &timezone, res, &error))
{
g_warning ("Could not get current timezone: %s", error->message);
g_error_free (error);
}
else
timezone = timedate1_get_timezone (self->priv->dtm);
if (!cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), timezone))
{
if (!cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), timezone))
{
g_warning ("Timezone '%s' is unhandled, setting %s as default", timezone, DEFAULT_TZ);
cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), DEFAULT_TZ);
}
self->priv->current_location = cc_timezone_map_get_location (CC_TIMEZONE_MAP (self->priv->map));
update_timezone (self);
g_warning ("Timezone '%s' is unhandled, setting %s as default", timezone, DEFAULT_TZ);
cc_timezone_map_set_timezone (CC_TIMEZONE_MAP (self->priv->map), DEFAULT_TZ);
}
/* now that the initial state is loaded set connect the signals */
widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
"region_combobox");
g_signal_connect (widget, "changed", G_CALLBACK (region_changed_cb), self);
widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
"city_combobox");
g_signal_connect (widget, "changed", G_CALLBACK (city_changed_cb), self);
g_signal_connect (self->priv->map, "location-changed",
G_CALLBACK (location_changed_cb), self);
g_free (timezone);
self->priv->current_location = cc_timezone_map_get_location (CC_TIMEZONE_MAP (self->priv->map));
update_timezone (self);
}
/* load region and city tree models */
......@@ -719,9 +695,13 @@ update_widget_state_for_ntp (CcDateTimePanel *panel,
gboolean using_ntp)
{
CcDateTimePanelPrivate *priv = panel->priv;
gboolean allowed;
/* need to check polkit before revealing to user */
allowed = (! priv->permission || g_permission_get_allowed (priv->permission));
gtk_widget_set_sensitive (W("table1"), !using_ntp);
gtk_widget_set_sensitive (W("table2"), !using_ntp);
gtk_widget_set_sensitive (W("table1"), !using_ntp && allowed);
gtk_widget_set_sensitive (W("table2"), !using_ntp && allowed);
}
static void
......@@ -830,7 +810,82 @@ on_permission_changed (GPermission *permission,
gtk_widget_set_sensitive (W("map-vbox"), allowed);
gtk_widget_set_sensitive (W("hbox2"), allowed);
gtk_widget_set_sensitive (W("alignment2"), allowed);
gtk_widget_set_sensitive (W("table1"), allowed && !using_ntp);
update_widget_state_for_ntp (data, using_ntp);
}
static void
update_ntp_switch_from_system (CcDateTimePanel *self)
{
CcDateTimePanelPrivate *priv = self->priv;
gboolean using_ntp;
GtkWidget *switch_widget;
using_ntp = timedate1_get_ntp (self->priv->dtm);
switch_widget = W("network_time_switch");
g_signal_handlers_block_by_func (switch_widget, change_ntp, self);
gtk_switch_set_active (GTK_SWITCH (switch_widget), using_ntp);
update_widget_state_for_ntp (self, using_ntp);
g_signal_handlers_unblock_by_func (switch_widget, change_ntp, self);
}
static void
on_ntp_changed (CcDateTimePanel *self)
{
update_ntp_switch_from_system (self);
}
static void
on_timezone_changed (CcDateTimePanel *self)
{
CcDateTimePanelPrivate *priv = self->priv;
GtkWidget *region_combo, *city_combo;
region_combo = W("region_combobox");
city_combo = W("city_combobox");
g_signal_handlers_block_by_func (region_combo, region_changed_cb, self);
g_signal_handlers_block_by_func (city_combo, city_changed_cb, self);
g_signal_handlers_block_by_func (self->priv->map, location_changed_cb, self);
get_initial_timezone (self);
g_signal_handlers_unblock_by_func (region_combo, region_changed_cb, self);
g_signal_handlers_unblock_by_func (city_combo, city_changed_cb, self);
g_signal_handlers_unblock_by_func (self->priv->map, location_changed_cb, self);
}
static void
on_timedated_properties_changed (GDBusProxy *proxy,
GVariant *changed_properties,
const gchar **invalidated_properties,
CcDateTimePanel *self)
{
GError *error;
GVariant *variant;
GVariant *v;
guint i;
if (invalidated_properties != NULL)
for (i = 0; invalidated_properties[i] != NULL; i++) {
error = NULL;
/* See https://bugs.freedesktop.org/show_bug.cgi?id=37632 for the reason why we're doing this */
variant = g_dbus_proxy_call_sync (proxy,
"org.freedesktop.DBus.Properties.Get",
g_variant_new ("(ss)", "org.freedesktop.timedate1", invalidated_properties[i]),
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
&error);
if (variant == NULL) {
g_warning ("Failed to get property '%s': %s", invalidated_properties[i], error->message);
g_error_free (error);
} else {
g_variant_get (variant, "(v)", &v);
g_dbus_proxy_set_cached_property (proxy, invalidated_properties[i], v);
g_variant_unref (variant);
}
}
}
static void
......@@ -881,8 +936,6 @@ cc_date_time_panel_init (CcDateTimePanel *self)
GtkTreeModelFilter *city_modelfilter;
GtkTreeModelSort *city_modelsort;
guint i, num_days;
gboolean using_ntp;
gboolean can_use_ntp;
int ret;
DateEndianess endianess;
GError *error;
......@@ -891,12 +944,12 @@ cc_date_time_panel_init (CcDateTimePanel *self)
priv->cancellable = g_cancellable_new ();
error = NULL;
priv->dtm = date_time_mechanism_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
"org.gnome.SettingsDaemon.DateTimeMechanism",
"/",
priv->cancellable,
&error);
priv->dtm = timedate1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
"org.freedesktop.timedate1",
"/org/freedesktop/timedate1",
priv->cancellable,
&error);
if (priv->dtm == NULL) {
g_warning ("could not get proxy for DateTimeMechanism: %s", error->message);
g_error_free (error);
......@@ -916,20 +969,7 @@ cc_date_time_panel_init (CcDateTimePanel *self)
}
/* set up network time button */
error = NULL;
using_ntp = can_use_ntp = FALSE;
if (!date_time_mechanism_call_get_using_ntp_sync (priv->dtm,
&can_use_ntp,
&using_ntp,
priv->cancellable,
&error))
{
g_warning ("Failed to get using ntp: %s", error->message);
g_error_free (error);
}
gtk_switch_set_active (GTK_SWITCH (W("network_time_switch")), using_ntp);
update_widget_state_for_ntp (self, using_ntp);
update_ntp_switch_from_system (self);
g_signal_connect (W("network_time_switch"), "notify::active",
G_CALLBACK (change_ntp), self);
......@@ -1020,17 +1060,34 @@ cc_date_time_panel_init (CcDateTimePanel *self)
/* After the initial setup, so we can be sure that
* the model is filled up */
date_time_mechanism_call_get_timezone (priv->dtm,
priv->cancellable,
get_timezone_cb,
self);
get_initial_timezone (self);
widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
"region_combobox");
g_signal_connect (widget, "changed", G_CALLBACK (region_changed_cb), self);
widget = (GtkWidget*) gtk_builder_get_object (self->priv->builder,
"city_combobox");
g_signal_connect (widget, "changed", G_CALLBACK (city_changed_cb), self);
g_signal_connect (self->priv->map, "location-changed",
G_CALLBACK (location_changed_cb), self);
/* Watch changes of timedated remote service properties */
g_signal_connect (priv->dtm, "g-properties-changed",
G_CALLBACK (on_timedated_properties_changed), self);
g_signal_connect_swapped (priv->dtm, "notify::ntp",
G_CALLBACK (on_ntp_changed), self);
g_signal_connect_swapped (priv->dtm, "notify::timezone",
G_CALLBACK (on_timezone_changed), self);
/* We ignore UTC <--> LocalRTC changes at the moment */
/* add the lock button */
priv->permission = polkit_permission_new_sync ("org.gnome.settingsdaemon.datetimemechanism.configure", NULL, NULL, NULL);
priv->permission = polkit_permission_new_sync ("org.gnome.controlcenter.datetime.configure", NULL, NULL, NULL);
if (priv->permission == NULL)
{
g_warning ("Your system does not have the '%s' PolicyKit files installed. Please check your installation",
"org.gnome.settingsdaemon.datetimemechanism.configure");
"org.gnome.controlcenter.datetime.configure");
return;
}
......
This diff is collapsed.
/*
* Generated by gdbus-codegen 2.29.5. DO NOT EDIT.
*
* The license of this code is the same as for the source it was derived from.
*/
#ifndef __DTM_H__
#define __DTM_H__
#include <gio/gio.h>
G_BEGIN_DECLS
/* ------------------------------------------------------------------------ */
/* Declarations for org.gnome.SettingsDaemon.DateTimeMechanism */
#define TYPE_DATE_TIME_MECHANISM (date_time_mechanism_get_type ())
#define DATE_TIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DATE_TIME_MECHANISM, DateTimeMechanism))
#define IS_DATE_TIME_MECHANISM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DATE_TIME_MECHANISM))
#define DATE_TIME_MECHANISM_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_DATE_TIME_MECHANISM, DateTimeMechanism))
struct _DateTimeMechanism;
typedef struct _DateTimeMechanism DateTimeMechanism;
typedef struct _DateTimeMechanismIface DateTimeMechanismIface;
struct _DateTimeMechanismIface
{
GTypeInterface parent_iface;
gboolean (*handle_adjust_time) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gint64 seconds_to_add);
gboolean (*handle_can_set_time) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_can_set_timezone) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_can_set_using_ntp) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_get_hardware_clock_using_utc) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_get_timezone) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_get_using_ntp) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
gboolean (*handle_set_date) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
guint day,
guint month,
guint year);
gboolean (*handle_set_hardware_clock_using_utc) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gboolean is_using_utc);
gboolean (*handle_set_time) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gint64 seconds_since_epoch);
gboolean (*handle_set_timezone) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
const gchar *tz);
gboolean (*handle_set_using_ntp) (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gboolean is_using_ntp);
};
GType date_time_mechanism_get_type (void) G_GNUC_CONST;
GDBusInterfaceInfo *date_time_mechanism_interface_info (void);
/* D-Bus method call completion functions: */
void date_time_mechanism_complete_set_timezone (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_get_timezone (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
const gchar *timezone);
void date_time_mechanism_complete_can_set_timezone (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gint value);
void date_time_mechanism_complete_set_date (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_set_time (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_can_set_time (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gint value);
void date_time_mechanism_complete_adjust_time (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_get_hardware_clock_using_utc (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gboolean is_using_utc);
void date_time_mechanism_complete_set_hardware_clock_using_utc (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_get_using_ntp (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gboolean can_use_ntp,
gboolean is_using_ntp);
void date_time_mechanism_complete_set_using_ntp (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation);
void date_time_mechanism_complete_can_set_using_ntp (
DateTimeMechanism *object,
GDBusMethodInvocation *invocation,
gint value);
/* D-Bus method calls: */
void date_time_mechanism_call_set_timezone (
DateTimeMechanism *proxy,
const gchar *tz,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_set_timezone_finish (
DateTimeMechanism *proxy,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_set_timezone_sync (
DateTimeMechanism *proxy,
const gchar *tz,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_get_timezone (
DateTimeMechanism *proxy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_get_timezone_finish (
DateTimeMechanism *proxy,
gchar **out_timezone,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_get_timezone_sync (
DateTimeMechanism *proxy,
gchar **out_timezone,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_can_set_timezone (
DateTimeMechanism *proxy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_can_set_timezone_finish (
DateTimeMechanism *proxy,
gint *out_value,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_can_set_timezone_sync (
DateTimeMechanism *proxy,
gint *out_value,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_set_date (
DateTimeMechanism *proxy,
guint day,
guint month,
guint year,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_set_date_finish (
DateTimeMechanism *proxy,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_set_date_sync (
DateTimeMechanism *proxy,
guint day,
guint month,
guint year,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_set_time (
DateTimeMechanism *proxy,
gint64 seconds_since_epoch,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_set_time_finish (
DateTimeMechanism *proxy,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_set_time_sync (
DateTimeMechanism *proxy,
gint64 seconds_since_epoch,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_can_set_time (
DateTimeMechanism *proxy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_can_set_time_finish (
DateTimeMechanism *proxy,
gint *out_value,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_can_set_time_sync (
DateTimeMechanism *proxy,
gint *out_value,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_adjust_time (
DateTimeMechanism *proxy,
gint64 seconds_to_add,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_adjust_time_finish (
DateTimeMechanism *proxy,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_adjust_time_sync (
DateTimeMechanism *proxy,
gint64 seconds_to_add,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_get_hardware_clock_using_utc (
DateTimeMechanism *proxy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean date_time_mechanism_call_get_hardware_clock_using_utc_finish (
DateTimeMechanism *proxy,
gboolean *out_is_using_utc,
GAsyncResult *res,
GError **error);
gboolean date_time_mechanism_call_get_hardware_clock_using_utc_sync (
DateTimeMechanism *proxy,
gboolean *out_is_using_utc,
GCancellable *cancellable,
GError **error);
void date_time_mechanism_call_set_hardware_clock_using_utc (