/* DateTime1.c generated by valac 0.56.19, the Vala compiler
 * generated from DateTime1.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-*/
/*-
 * Copyright (c) 2014 elementary, Inc. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: Corentin Noël <corentin@elementaryos.org>
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "datetime.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define DATE_TIME_TYPE_DATE_TIME1 (date_time_date_time1_get_type ())
#define DATE_TIME_DATE_TIME1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATE_TIME_TYPE_DATE_TIME1, DateTimeDateTime1))
#define DATE_TIME_IS_DATE_TIME1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATE_TIME_TYPE_DATE_TIME1))
#define DATE_TIME_DATE_TIME1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATE_TIME_TYPE_DATE_TIME1, DateTimeDateTime1Iface))

typedef struct _DateTimeDateTime1 DateTimeDateTime1;
typedef struct _DateTimeDateTime1Iface DateTimeDateTime1Iface;

#define DATE_TIME_TYPE_DATE_TIME1_PROXY (date_time_date_time1_proxy_get_type ())
typedef GDBusProxy DateTimeDateTime1Proxy;
typedef GDBusProxyClass DateTimeDateTime1ProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _DateTimeDateTime1Iface {
	GTypeInterface parent_iface;
	void (*set_time) (DateTimeDateTime1* self, gint64 usec_utc, gboolean relative, gboolean user_interaction, GError** error);
	void (*set_timezone) (DateTimeDateTime1* self, const gchar* timezone, gboolean user_interaction, GError** error);
	void (*SetLocalRTC) (DateTimeDateTime1* self, gboolean local_rtc, gboolean fix_system, gboolean user_interaction, GError** error);
	void (*SetNTP) (DateTimeDateTime1* self, gboolean use_ntp, gboolean user_interaction, GError** error);
	gchar* (*get_Timezone) (DateTimeDateTime1* self);
	gboolean (*get_LocalRTC) (DateTimeDateTime1* self);
	gboolean (*get_CanNTP) (DateTimeDateTime1* self);
	gboolean (*get_NTP) (DateTimeDateTime1* self);
};

VALA_EXTERN GType date_time_date_time1_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint date_time_date_time1_register_object (void* object,
                                            GDBusConnection* connection,
                                            const gchar* path,
                                            GError** error);
VALA_EXTERN GType date_time_date_time1_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void date_time_date_time1_set_time (DateTimeDateTime1* self,
                                    gint64 usec_utc,
                                    gboolean relative,
                                    gboolean user_interaction,
                                    GError** error);
VALA_EXTERN void date_time_date_time1_set_timezone (DateTimeDateTime1* self,
                                        const gchar* timezone,
                                        gboolean user_interaction,
                                        GError** error);
VALA_EXTERN void date_time_date_time1_SetLocalRTC (DateTimeDateTime1* self,
                                       gboolean local_rtc,
                                       gboolean fix_system,
                                       gboolean user_interaction,
                                       GError** error);
VALA_EXTERN void date_time_date_time1_SetNTP (DateTimeDateTime1* self,
                                  gboolean use_ntp,
                                  gboolean user_interaction,
                                  GError** error);
VALA_EXTERN gchar* date_time_date_time1_get_Timezone (DateTimeDateTime1* self);
VALA_EXTERN gboolean date_time_date_time1_get_LocalRTC (DateTimeDateTime1* self);
VALA_EXTERN gboolean date_time_date_time1_get_CanNTP (DateTimeDateTime1* self);
VALA_EXTERN gboolean date_time_date_time1_get_NTP (DateTimeDateTime1* self);
static GType date_time_date_time1_get_type_once (void);
static void date_time_date_time1_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters);
static void date_time_date_time1_proxy_set_time (DateTimeDateTime1* self,
                                          gint64 usec_utc,
                                          gboolean relative,
                                          gboolean user_interaction,
                                          GError** error);
static void date_time_date_time1_proxy_set_timezone (DateTimeDateTime1* self,
                                              const gchar* timezone,
                                              gboolean user_interaction,
                                              GError** error);
static void date_time_date_time1_proxy_SetLocalRTC (DateTimeDateTime1* self,
                                             gboolean local_rtc,
                                             gboolean fix_system,
                                             gboolean user_interaction,
                                             GError** error);
static void date_time_date_time1_proxy_SetNTP (DateTimeDateTime1* self,
                                        gboolean use_ntp,
                                        gboolean user_interaction,
                                        GError** error);
static gchar* date_time_date_time1_dbus_proxy_get_Timezone (DateTimeDateTime1* self);
static gboolean date_time_date_time1_dbus_proxy_get_LocalRTC (DateTimeDateTime1* self);
static gboolean date_time_date_time1_dbus_proxy_get_CanNTP (DateTimeDateTime1* self);
static gboolean date_time_date_time1_dbus_proxy_get_NTP (DateTimeDateTime1* self);
static void date_time_date_time1_proxy_date_time_date_time1_interface_init (DateTimeDateTime1Iface* iface);
static void _dbus_date_time_date_time1_set_time (DateTimeDateTime1* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation);
static void _dbus_date_time_date_time1_set_timezone (DateTimeDateTime1* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_date_time_date_time1_SetLocalRTC (DateTimeDateTime1* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_date_time_date_time1_SetNTP (DateTimeDateTime1* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation);
static void date_time_date_time1_dbus_interface_method_call (GDBusConnection* connection,
                                                      const gchar* sender,
                                                      const gchar* object_path,
                                                      const gchar* interface_name,
                                                      const gchar* method_name,
                                                      GVariant* parameters,
                                                      GDBusMethodInvocation* invocation,
                                                      gpointer user_data);
static GVariant* date_time_date_time1_dbus_interface_get_property (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* property_name,
                                                            GError** error,
                                                            gpointer user_data);
static GVariant* _dbus_date_time_date_time1_get_Timezone (DateTimeDateTime1* self);
static GVariant* _dbus_date_time_date_time1_get_LocalRTC (DateTimeDateTime1* self);
static GVariant* _dbus_date_time_date_time1_get_CanNTP (DateTimeDateTime1* self);
static GVariant* _dbus_date_time_date_time1_get_NTP (DateTimeDateTime1* self);
static gboolean date_time_date_time1_dbus_interface_set_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GVariant* value,
                                                           GError** error,
                                                           gpointer user_data);
static void _date_time_date_time1_unregister_object (gpointer user_data);

static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_set_time_usec_utc = {-1, "usec_utc", "x", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_set_time_relative = {-1, "relative", "b", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_set_time_user_interaction = {-1, "user_interaction", "b", NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_set_time_in[] = {&_date_time_date_time1_dbus_arg_info_set_time_usec_utc, &_date_time_date_time1_dbus_arg_info_set_time_relative, &_date_time_date_time1_dbus_arg_info_set_time_user_interaction, NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_set_time_out[] = {NULL};
static const GDBusMethodInfo _date_time_date_time1_dbus_method_info_set_time = {-1, "SetTime", (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_set_time_in), (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_set_time_out), NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_set_timezone_timezone = {-1, "timezone", "s", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_set_timezone_user_interaction = {-1, "user_interaction", "b", NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_set_timezone_in[] = {&_date_time_date_time1_dbus_arg_info_set_timezone_timezone, &_date_time_date_time1_dbus_arg_info_set_timezone_user_interaction, NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_set_timezone_out[] = {NULL};
static const GDBusMethodInfo _date_time_date_time1_dbus_method_info_set_timezone = {-1, "SetTimezone", (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_set_timezone_in), (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_set_timezone_out), NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_SetLocalRTC_local_rtc = {-1, "local_rtc", "b", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_SetLocalRTC_fix_system = {-1, "fix_system", "b", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_SetLocalRTC_user_interaction = {-1, "user_interaction", "b", NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_SetLocalRTC_in[] = {&_date_time_date_time1_dbus_arg_info_SetLocalRTC_local_rtc, &_date_time_date_time1_dbus_arg_info_SetLocalRTC_fix_system, &_date_time_date_time1_dbus_arg_info_SetLocalRTC_user_interaction, NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_SetLocalRTC_out[] = {NULL};
static const GDBusMethodInfo _date_time_date_time1_dbus_method_info_SetLocalRTC = {-1, "SetLocalRTC", (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_SetLocalRTC_in), (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_SetLocalRTC_out), NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_SetNTP_use_ntp = {-1, "use_ntp", "b", NULL};
static const GDBusArgInfo _date_time_date_time1_dbus_arg_info_SetNTP_user_interaction = {-1, "user_interaction", "b", NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_SetNTP_in[] = {&_date_time_date_time1_dbus_arg_info_SetNTP_use_ntp, &_date_time_date_time1_dbus_arg_info_SetNTP_user_interaction, NULL};
static const GDBusArgInfo * const _date_time_date_time1_dbus_arg_info_SetNTP_out[] = {NULL};
static const GDBusMethodInfo _date_time_date_time1_dbus_method_info_SetNTP = {-1, "SetNTP", (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_SetNTP_in), (GDBusArgInfo **) (&_date_time_date_time1_dbus_arg_info_SetNTP_out), NULL};
static const GDBusMethodInfo * const _date_time_date_time1_dbus_method_info[] = {&_date_time_date_time1_dbus_method_info_set_time, &_date_time_date_time1_dbus_method_info_set_timezone, &_date_time_date_time1_dbus_method_info_SetLocalRTC, &_date_time_date_time1_dbus_method_info_SetNTP, NULL};
static const GDBusSignalInfo * const _date_time_date_time1_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _date_time_date_time1_dbus_property_info_Timezone = {-1, "Timezone", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _date_time_date_time1_dbus_property_info_LocalRTC = {-1, "LocalRTC", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _date_time_date_time1_dbus_property_info_CanNTP = {-1, "CanNTP", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _date_time_date_time1_dbus_property_info_NTP = {-1, "NTP", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _date_time_date_time1_dbus_property_info[] = {&_date_time_date_time1_dbus_property_info_Timezone, &_date_time_date_time1_dbus_property_info_LocalRTC, &_date_time_date_time1_dbus_property_info_CanNTP, &_date_time_date_time1_dbus_property_info_NTP, NULL};
static const GDBusInterfaceInfo _date_time_date_time1_dbus_interface_info = {-1, "org.freedesktop.timedate1", (GDBusMethodInfo **) (&_date_time_date_time1_dbus_method_info), (GDBusSignalInfo **) (&_date_time_date_time1_dbus_signal_info), (GDBusPropertyInfo **) (&_date_time_date_time1_dbus_property_info), NULL};
static const GDBusInterfaceVTable _date_time_date_time1_dbus_interface_vtable = {date_time_date_time1_dbus_interface_method_call, date_time_date_time1_dbus_interface_get_property, date_time_date_time1_dbus_interface_set_property};

void
date_time_date_time1_set_time (DateTimeDateTime1* self,
                               gint64 usec_utc,
                               gboolean relative,
                               gboolean user_interaction,
                               GError** error)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->set_time) {
		_iface_->set_time (self, usec_utc, relative, user_interaction, error);
	}
}

void
date_time_date_time1_set_timezone (DateTimeDateTime1* self,
                                   const gchar* timezone,
                                   gboolean user_interaction,
                                   GError** error)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->set_timezone) {
		_iface_->set_timezone (self, timezone, user_interaction, error);
	}
}

void
date_time_date_time1_SetLocalRTC (DateTimeDateTime1* self,
                                  gboolean local_rtc,
                                  gboolean fix_system,
                                  gboolean user_interaction,
                                  GError** error)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->SetLocalRTC) {
		_iface_->SetLocalRTC (self, local_rtc, fix_system, user_interaction, error);
	}
}

void
date_time_date_time1_SetNTP (DateTimeDateTime1* self,
                             gboolean use_ntp,
                             gboolean user_interaction,
                             GError** error)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->SetNTP) {
		_iface_->SetNTP (self, use_ntp, user_interaction, error);
	}
}

gchar*
date_time_date_time1_get_Timezone (DateTimeDateTime1* self)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->get_Timezone) {
		return _iface_->get_Timezone (self);
	}
	return NULL;
}

gboolean
date_time_date_time1_get_LocalRTC (DateTimeDateTime1* self)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->get_LocalRTC) {
		return _iface_->get_LocalRTC (self);
	}
	return FALSE;
}

gboolean
date_time_date_time1_get_CanNTP (DateTimeDateTime1* self)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->get_CanNTP) {
		return _iface_->get_CanNTP (self);
	}
	return FALSE;
}

gboolean
date_time_date_time1_get_NTP (DateTimeDateTime1* self)
{
	DateTimeDateTime1Iface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = DATE_TIME_DATE_TIME1_GET_INTERFACE (self);
	if (_iface_->get_NTP) {
		return _iface_->get_NTP (self);
	}
	return FALSE;
}

static void
date_time_date_time1_default_init (DateTimeDateTime1Iface * iface,
                                   gpointer iface_data)
{
}

static GType
date_time_date_time1_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DateTimeDateTime1Iface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) date_time_date_time1_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType date_time_date_time1_type_id;
	date_time_date_time1_type_id = g_type_register_static (G_TYPE_INTERFACE, "DateTimeDateTime1", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (date_time_date_time1_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (date_time_date_time1_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) date_time_date_time1_proxy_get_type);
	g_type_set_qdata (date_time_date_time1_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.timedate1");
	g_type_set_qdata (date_time_date_time1_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_date_time_date_time1_dbus_interface_info));
	g_type_set_qdata (date_time_date_time1_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) date_time_date_time1_register_object);
	return date_time_date_time1_type_id;
}

GType
date_time_date_time1_get_type (void)
{
	static volatile gsize date_time_date_time1_type_id__once = 0;
	if (g_once_init_enter (&date_time_date_time1_type_id__once)) {
		GType date_time_date_time1_type_id;
		date_time_date_time1_type_id = date_time_date_time1_get_type_once ();
		g_once_init_leave (&date_time_date_time1_type_id__once, date_time_date_time1_type_id);
	}
	return date_time_date_time1_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (DateTimeDateTime1Proxy, date_time_date_time1_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DATE_TIME_TYPE_DATE_TIME1, date_time_date_time1_proxy_date_time_date_time1_interface_init) )
static void
date_time_date_time1_proxy_class_init (DateTimeDateTime1ProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = date_time_date_time1_proxy_g_signal;
}

static void
date_time_date_time1_proxy_g_signal (GDBusProxy* proxy,
                                     const gchar* sender_name,
                                     const gchar* signal_name,
                                     GVariant* parameters)
{
}

static void
date_time_date_time1_proxy_init (DateTimeDateTime1Proxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_date_time_date_time1_dbus_interface_info));
}

static void
date_time_date_time1_proxy_set_time (DateTimeDateTime1* self,
                                     gint64 usec_utc,
                                     gboolean relative,
                                     gboolean user_interaction,
                                     GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.timedate1", "SetTime");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_int64 (usec_utc));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (relative));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (user_interaction));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
date_time_date_time1_proxy_set_timezone (DateTimeDateTime1* self,
                                         const gchar* timezone,
                                         gboolean user_interaction,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.timedate1", "SetTimezone");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (timezone));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (user_interaction));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
date_time_date_time1_proxy_SetLocalRTC (DateTimeDateTime1* self,
                                        gboolean local_rtc,
                                        gboolean fix_system,
                                        gboolean user_interaction,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.timedate1", "SetLocalRTC");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (local_rtc));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (fix_system));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (user_interaction));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
date_time_date_time1_proxy_SetNTP (DateTimeDateTime1* self,
                                   gboolean use_ntp,
                                   gboolean user_interaction,
                                   GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.timedate1", "SetNTP");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (use_ntp));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (user_interaction));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gchar*
date_time_date_time1_dbus_proxy_get_Timezone (DateTimeDateTime1* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Timezone");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Timezone"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
date_time_date_time1_dbus_proxy_get_LocalRTC (DateTimeDateTime1* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "LocalRTC");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("LocalRTC"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp0_ = FALSE;
			return _tmp0_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
date_time_date_time1_dbus_proxy_get_CanNTP (DateTimeDateTime1* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanNTP");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanNTP"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp1_ = FALSE;
			return _tmp1_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
date_time_date_time1_dbus_proxy_get_NTP (DateTimeDateTime1* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "NTP");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("NTP"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp2_ = FALSE;
			return _tmp2_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
date_time_date_time1_proxy_date_time_date_time1_interface_init (DateTimeDateTime1Iface* iface)
{
	iface->set_time = date_time_date_time1_proxy_set_time;
	iface->set_timezone = date_time_date_time1_proxy_set_timezone;
	iface->SetLocalRTC = date_time_date_time1_proxy_SetLocalRTC;
	iface->SetNTP = date_time_date_time1_proxy_SetNTP;
	iface->get_Timezone = date_time_date_time1_dbus_proxy_get_Timezone;
	iface->get_LocalRTC = date_time_date_time1_dbus_proxy_get_LocalRTC;
	iface->get_CanNTP = date_time_date_time1_dbus_proxy_get_CanNTP;
	iface->get_NTP = date_time_date_time1_dbus_proxy_get_NTP;
}

static void
_dbus_date_time_date_time1_set_time (DateTimeDateTime1* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint64 usec_utc = 0LL;
	GVariant* _tmp3_;
	gboolean relative = FALSE;
	GVariant* _tmp4_;
	gboolean user_interaction = FALSE;
	GVariant* _tmp5_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	usec_utc = g_variant_get_int64 (_tmp3_);
	g_variant_unref (_tmp3_);
	_tmp4_ = g_variant_iter_next_value (&_arguments_iter);
	relative = g_variant_get_boolean (_tmp4_);
	g_variant_unref (_tmp4_);
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	user_interaction = g_variant_get_boolean (_tmp5_);
	g_variant_unref (_tmp5_);
	date_time_date_time1_set_time (self, usec_utc, relative, user_interaction, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_date_time_date_time1_set_timezone (DateTimeDateTime1* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* timezone = NULL;
	GVariant* _tmp6_;
	gboolean user_interaction = FALSE;
	GVariant* _tmp7_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	timezone = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	user_interaction = g_variant_get_boolean (_tmp7_);
	g_variant_unref (_tmp7_);
	date_time_date_time1_set_timezone (self, timezone, user_interaction, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (timezone);
	;
}

static void
_dbus_date_time_date_time1_SetLocalRTC (DateTimeDateTime1* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean local_rtc = FALSE;
	GVariant* _tmp8_;
	gboolean fix_system = FALSE;
	GVariant* _tmp9_;
	gboolean user_interaction = FALSE;
	GVariant* _tmp10_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	local_rtc = g_variant_get_boolean (_tmp8_);
	g_variant_unref (_tmp8_);
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	fix_system = g_variant_get_boolean (_tmp9_);
	g_variant_unref (_tmp9_);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	user_interaction = g_variant_get_boolean (_tmp10_);
	g_variant_unref (_tmp10_);
	date_time_date_time1_SetLocalRTC (self, local_rtc, fix_system, user_interaction, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_date_time_date_time1_SetNTP (DateTimeDateTime1* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean use_ntp = FALSE;
	GVariant* _tmp11_;
	gboolean user_interaction = FALSE;
	GVariant* _tmp12_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	use_ntp = g_variant_get_boolean (_tmp11_);
	g_variant_unref (_tmp11_);
	_tmp12_ = g_variant_iter_next_value (&_arguments_iter);
	user_interaction = g_variant_get_boolean (_tmp12_);
	g_variant_unref (_tmp12_);
	date_time_date_time1_SetNTP (self, use_ntp, user_interaction, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
date_time_date_time1_dbus_interface_method_call (GDBusConnection* connection,
                                                 const gchar* sender,
                                                 const gchar* object_path,
                                                 const gchar* interface_name,
                                                 const gchar* method_name,
                                                 GVariant* parameters,
                                                 GDBusMethodInvocation* invocation,
                                                 gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "SetTime") == 0) {
		_dbus_date_time_date_time1_set_time (object, parameters, invocation);
	} else if (strcmp (method_name, "SetTimezone") == 0) {
		_dbus_date_time_date_time1_set_timezone (object, parameters, invocation);
	} else if (strcmp (method_name, "SetLocalRTC") == 0) {
		_dbus_date_time_date_time1_SetLocalRTC (object, parameters, invocation);
	} else if (strcmp (method_name, "SetNTP") == 0) {
		_dbus_date_time_date_time1_SetNTP (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_date_time_date_time1_get_Timezone (DateTimeDateTime1* self)
{
	gchar* result;
	GVariant* _reply;
	result = date_time_date_time1_get_Timezone (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_date_time_date_time1_get_LocalRTC (DateTimeDateTime1* self)
{
	gboolean result;
	GVariant* _reply;
	result = date_time_date_time1_get_LocalRTC (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_date_time_date_time1_get_CanNTP (DateTimeDateTime1* self)
{
	gboolean result;
	GVariant* _reply;
	result = date_time_date_time1_get_CanNTP (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_date_time_date_time1_get_NTP (DateTimeDateTime1* self)
{
	gboolean result;
	GVariant* _reply;
	result = date_time_date_time1_get_NTP (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
date_time_date_time1_dbus_interface_get_property (GDBusConnection* connection,
                                                  const gchar* sender,
                                                  const gchar* object_path,
                                                  const gchar* interface_name,
                                                  const gchar* property_name,
                                                  GError** error,
                                                  gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Timezone") == 0) {
		return _dbus_date_time_date_time1_get_Timezone (object);
	} else if (strcmp (property_name, "LocalRTC") == 0) {
		return _dbus_date_time_date_time1_get_LocalRTC (object);
	} else if (strcmp (property_name, "CanNTP") == 0) {
		return _dbus_date_time_date_time1_get_CanNTP (object);
	} else if (strcmp (property_name, "NTP") == 0) {
		return _dbus_date_time_date_time1_get_NTP (object);
	}
	return NULL;
}

static gboolean
date_time_date_time1_dbus_interface_set_property (GDBusConnection* connection,
                                                  const gchar* sender,
                                                  const gchar* object_path,
                                                  const gchar* interface_name,
                                                  const gchar* property_name,
                                                  GVariant* value,
                                                  GError** error,
                                                  gpointer user_data)
{
	return FALSE;
}

guint
date_time_date_time1_register_object (gpointer object,
                                      GDBusConnection* connection,
                                      const gchar* path,
                                      GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_date_time_date_time1_dbus_interface_info), &_date_time_date_time1_dbus_interface_vtable, data, _date_time_date_time1_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_date_time_date_time1_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

