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

/*
 * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel)
 *
 * 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 2 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, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <stdlib.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 TYPE_MANAGER (manager_get_type ())
#define MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MANAGER, Manager))
#define IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MANAGER))
#define MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MANAGER, ManagerIface))

typedef struct _Manager Manager;
typedef struct _ManagerIface ManagerIface;

#define TYPE_MANAGER_PROXY (manager_proxy_get_type ())
enum  {
	MANAGER_PREPARE_FOR_SLEEP_SIGNAL,
	MANAGER_NUM_SIGNALS
};
static guint manager_signals[MANAGER_NUM_SIGNALS] = {0};
typedef GDBusProxy ManagerProxy;
typedef GDBusProxyClass ManagerProxyClass;

#define PANTHEON_TYPE_ACCOUNTS_SERVICE (pantheon_accounts_service_get_type ())
#define PANTHEON_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE, PantheonAccountsService))
#define PANTHEON_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE))
#define PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE, PantheonAccountsServiceIface))

typedef struct _PantheonAccountsService PantheonAccountsService;
typedef struct _PantheonAccountsServiceIface PantheonAccountsServiceIface;

#define PANTHEON_TYPE_ACCOUNTS_SERVICE_PROXY (pantheon_accounts_service_proxy_get_type ())
typedef GDBusProxy PantheonAccountsServiceProxy;
typedef GDBusProxyClass PantheonAccountsServiceProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define FDO_TYPE_ACCOUNTS (fdo_accounts_get_type ())
#define FDO_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FDO_TYPE_ACCOUNTS, FDOAccounts))
#define FDO_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FDO_TYPE_ACCOUNTS))
#define FDO_ACCOUNTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FDO_TYPE_ACCOUNTS, FDOAccountsIface))

typedef struct _FDOAccounts FDOAccounts;
typedef struct _FDOAccountsIface FDOAccountsIface;

#define FDO_TYPE_ACCOUNTS_PROXY (fdo_accounts_proxy_get_type ())
typedef GDBusProxy FDOAccountsProxy;
typedef GDBusProxyClass FDOAccountsProxyClass;
enum  {
	DATE_TIME_SERVICES_TIME_MANAGER_0_PROPERTY,
	DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY,
	DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY,
	DATE_TIME_SERVICES_TIME_MANAGER_NUM_PROPERTIES
};
static GParamSpec* date_time_services_time_manager_properties[DATE_TIME_SERVICES_TIME_MANAGER_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block9Data Block9Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _Block10Data Block10Data;
typedef struct _DateTimeServicesTimeManagerSetupTimeFormatData DateTimeServicesTimeManagerSetupTimeFormatData;
typedef struct _Block11Data Block11Data;
enum  {
	DATE_TIME_SERVICES_TIME_MANAGER_MINUTE_CHANGED_SIGNAL,
	DATE_TIME_SERVICES_TIME_MANAGER_NUM_SIGNALS
};
static guint date_time_services_time_manager_signals[DATE_TIME_SERVICES_TIME_MANAGER_NUM_SIGNALS] = {0};

struct _ManagerIface {
	GTypeInterface parent_iface;
};

struct _PantheonAccountsServiceIface {
	GTypeInterface parent_iface;
	gchar* (*get_time_format) (PantheonAccountsService* self);
	void (*set_time_format) (PantheonAccountsService* self, const gchar* value);
};

struct _FDOAccountsIface {
	GTypeInterface parent_iface;
	gchar* (*find_user_by_name) (FDOAccounts* self, const gchar* username, GError** error);
};

struct _DateTimeServicesTimeManagerPrivate {
	GDateTime* current_time;
	guint timeout_id;
	Manager* manager;
	gboolean _clock_show_seconds;
	gboolean _is_12h;
};

struct _Block9Data {
	int _ref_count_;
	DateTimeServicesTimeManager* self;
	PantheonAccountsService* greeter_act;
};

struct _Block10Data {
	int _ref_count_;
	DateTimeServicesTimeManager* self;
	GSettings* clock_settings;
};

struct _DateTimeServicesTimeManagerSetupTimeFormatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DateTimeServicesTimeManager* self;
	Block9Data* _data9_;
	FDOAccounts* accounts_service;
	FDOAccounts* _tmp0_;
	gchar* user_path;
	FDOAccounts* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	PantheonAccountsService* _tmp5_;
	PantheonAccountsService* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	PantheonAccountsService* _tmp10_;
	GError* e;
	Block10Data* _data10_;
	GError* _tmp11_;
	const gchar* _tmp12_;
	GSettings* _tmp13_;
	GSettings* _tmp14_;
	GSettings* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	GError* _inner_error0_;
};

struct _Block11Data {
	int _ref_count_;
	DateTimeServicesTimeManager* self;
	gboolean update_fast;
};

static gint DateTimeServicesTimeManager_private_offset;
static gpointer date_time_services_time_manager_parent_class = NULL;
static DateTimeServicesTimeManager* date_time_services_time_manager_instance;
static DateTimeServicesTimeManager* date_time_services_time_manager_instance = NULL;

VALA_EXTERN GType manager_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType manager_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint manager_register_object (void* object,
                               GDBusConnection* connection,
                               const gchar* path,
                               GError** error);
static GType manager_get_type_once (void);
static void manager_proxy_g_signal (GDBusProxy* proxy,
                             const gchar* sender_name,
                             const gchar* signal_name,
                             GVariant* parameters);
static void _dbus_handle_manager_prepare_for_sleep (Manager* self,
                                             GVariant* parameters);
static void manager_proxy_manager_interface_init (ManagerIface* iface);
static void manager_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* manager_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 gboolean manager_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 _dbus_manager_prepare_for_sleep (GObject* _sender,
                                      gboolean sleeping,
                                      gpointer* _data);
static void _manager_unregister_object (gpointer user_data);
VALA_EXTERN GType pantheon_accounts_service_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType pantheon_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint pantheon_accounts_service_register_object (void* object,
                                                 GDBusConnection* connection,
                                                 const gchar* path,
                                                 GError** error);
VALA_EXTERN gchar* pantheon_accounts_service_get_time_format (PantheonAccountsService* self);
VALA_EXTERN void pantheon_accounts_service_set_time_format (PantheonAccountsService* self,
                                                const gchar* value);
static GType pantheon_accounts_service_get_type_once (void);
static void pantheon_accounts_service_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static gchar* pantheon_accounts_service_dbus_proxy_get_time_format (PantheonAccountsService* self);
static void pantheon_accounts_service_dbus_proxy_set_time_format (PantheonAccountsService* self,
                                                           const gchar* value);
static void pantheon_accounts_service_proxy_pantheon_accounts_service_interface_init (PantheonAccountsServiceIface* iface);
static void pantheon_accounts_service_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* pantheon_accounts_service_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_pantheon_accounts_service_get_time_format (PantheonAccountsService* self);
static gboolean pantheon_accounts_service_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 _dbus_pantheon_accounts_service_set_time_format (PantheonAccountsService* self,
                                                      GVariant* _value);
static void _pantheon_accounts_service_unregister_object (gpointer user_data);
VALA_EXTERN GType fdo_accounts_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint fdo_accounts_register_object (void* object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error);
VALA_EXTERN GType fdo_accounts_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* fdo_accounts_find_user_by_name (FDOAccounts* self,
                                       const gchar* username,
                                       GError** error);
static GType fdo_accounts_get_type_once (void);
static void fdo_accounts_proxy_g_signal (GDBusProxy* proxy,
                                  const gchar* sender_name,
                                  const gchar* signal_name,
                                  GVariant* parameters);
static gchar* fdo_accounts_proxy_find_user_by_name (FDOAccounts* self,
                                             const gchar* username,
                                             GError** error);
static void fdo_accounts_proxy_fdo_accounts_interface_init (FDOAccountsIface* iface);
static void _dbus_fdo_accounts_find_user_by_name (FDOAccounts* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void fdo_accounts_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* fdo_accounts_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 gboolean fdo_accounts_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 _fdo_accounts_unregister_object (gpointer user_data);
static void date_time_services_time_manager_update_current_time (DateTimeServicesTimeManager* self);
static void date_time_services_time_manager_add_timeout (DateTimeServicesTimeManager* self,
                                                  gboolean update_fast);
static void ___lambda5_ (DateTimeServicesTimeManager* self);
static void ____lambda5__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void date_time_services_time_manager_on_watch (DateTimeServicesTimeManager* self,
                                               GDBusConnection* conn);
static void _date_time_services_time_manager_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                            const gchar* name,
                                                                            const gchar* name_owner,
                                                                            gpointer self);
static void date_time_services_time_manager_on_unwatch (DateTimeServicesTimeManager* self,
                                                 GDBusConnection* conn);
static void _date_time_services_time_manager_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                              const gchar* name,
                                                                              gpointer self);
static void ___lambda6_ (DateTimeServicesTimeManager* self,
                  gboolean sleeping);
static void ____lambda6__manager_prepare_for_sleep (Manager* _sender,
                                             gboolean sleeping,
                                             gpointer self);
static void date_time_services_time_manager_setup_time_format_data_free (gpointer _data);
static void date_time_services_time_manager_setup_time_format (DateTimeServicesTimeManager* self,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static void date_time_services_time_manager_setup_time_format_finish (DateTimeServicesTimeManager* self,
                                                               GAsyncResult* _res_);
static gboolean date_time_services_time_manager_setup_time_format_co (DateTimeServicesTimeManagerSetupTimeFormatData* _data_);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static void date_time_services_time_manager_setup_time_format_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_);
static void ___lambda7_ (Block9Data* _data9_,
                  GVariant* changed_properties,
                  gchar** invalidated_properties);
static void ____lambda7__g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                     GVariant* changed_properties,
                                                     gchar** invalidated_properties,
                                                     gpointer self);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static void ___lambda8_ (Block10Data* _data10_);
static void ____lambda8__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static guint date_time_services_time_manager_calculate_time_until_next_minute (DateTimeServicesTimeManager* self);
static gboolean __lambda4_ (Block11Data* _data11_);
static gboolean ___lambda4__gsource_func (gpointer self);
static GObject * date_time_services_time_manager_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties);
static void date_time_services_time_manager_finalize (GObject * obj);
static GType date_time_services_time_manager_get_type_once (void);
static void _vala_date_time_services_time_manager_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_date_time_services_time_manager_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);

static const GDBusMethodInfo * const _manager_dbus_method_info[] = {NULL};
static const GDBusArgInfo _manager_dbus_arg_info_prepare_for_sleep_sleeping = {-1, "sleeping", "b", NULL};
static const GDBusArgInfo * const _manager_dbus_arg_info_prepare_for_sleep[] = {&_manager_dbus_arg_info_prepare_for_sleep_sleeping, NULL};
static const GDBusSignalInfo _manager_dbus_signal_info_prepare_for_sleep = {-1, "PrepareForSleep", (GDBusArgInfo **) (&_manager_dbus_arg_info_prepare_for_sleep), NULL};
static const GDBusSignalInfo * const _manager_dbus_signal_info[] = {&_manager_dbus_signal_info_prepare_for_sleep, NULL};
static const GDBusPropertyInfo * const _manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _manager_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_manager_dbus_method_info), (GDBusSignalInfo **) (&_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _manager_dbus_interface_vtable = {manager_dbus_interface_method_call, manager_dbus_interface_get_property, manager_dbus_interface_set_property};
static const GDBusMethodInfo * const _pantheon_accounts_service_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _pantheon_accounts_service_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _pantheon_accounts_service_dbus_property_info_time_format = {-1, "TimeFormat", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo * const _pantheon_accounts_service_dbus_property_info[] = {&_pantheon_accounts_service_dbus_property_info_time_format, NULL};
static const GDBusInterfaceInfo _pantheon_accounts_service_dbus_interface_info = {-1, "io.elementary.pantheon.AccountsService", (GDBusMethodInfo **) (&_pantheon_accounts_service_dbus_method_info), (GDBusSignalInfo **) (&_pantheon_accounts_service_dbus_signal_info), (GDBusPropertyInfo **) (&_pantheon_accounts_service_dbus_property_info), NULL};
static const GDBusInterfaceVTable _pantheon_accounts_service_dbus_interface_vtable = {pantheon_accounts_service_dbus_interface_method_call, pantheon_accounts_service_dbus_interface_get_property, pantheon_accounts_service_dbus_interface_set_property};
static const GDBusArgInfo _fdo_accounts_dbus_arg_info_find_user_by_name_username = {-1, "username", "s", NULL};
static const GDBusArgInfo _fdo_accounts_dbus_arg_info_find_user_by_name_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _fdo_accounts_dbus_arg_info_find_user_by_name_in[] = {&_fdo_accounts_dbus_arg_info_find_user_by_name_username, NULL};
static const GDBusArgInfo * const _fdo_accounts_dbus_arg_info_find_user_by_name_out[] = {&_fdo_accounts_dbus_arg_info_find_user_by_name_result, NULL};
static const GDBusMethodInfo _fdo_accounts_dbus_method_info_find_user_by_name = {-1, "FindUserByName", (GDBusArgInfo **) (&_fdo_accounts_dbus_arg_info_find_user_by_name_in), (GDBusArgInfo **) (&_fdo_accounts_dbus_arg_info_find_user_by_name_out), NULL};
static const GDBusMethodInfo * const _fdo_accounts_dbus_method_info[] = {&_fdo_accounts_dbus_method_info_find_user_by_name, NULL};
static const GDBusSignalInfo * const _fdo_accounts_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _fdo_accounts_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _fdo_accounts_dbus_interface_info = {-1, "org.freedesktop.Accounts", (GDBusMethodInfo **) (&_fdo_accounts_dbus_method_info), (GDBusSignalInfo **) (&_fdo_accounts_dbus_signal_info), (GDBusPropertyInfo **) (&_fdo_accounts_dbus_property_info), NULL};
static const GDBusInterfaceVTable _fdo_accounts_dbus_interface_vtable = {fdo_accounts_dbus_interface_method_call, fdo_accounts_dbus_interface_get_property, fdo_accounts_dbus_interface_set_property};

static void
manager_default_init (ManagerIface * iface,
                      gpointer iface_data)
{
	manager_signals[MANAGER_PREPARE_FOR_SLEEP_SIGNAL] = g_signal_new ("prepare-for-sleep", TYPE_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

static GType
manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType manager_type_id;
	manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "Manager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) manager_proxy_get_type);
	g_type_set_qdata (manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_manager_dbus_interface_info));
	g_type_set_qdata (manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) manager_register_object);
	return manager_type_id;
}

GType
manager_get_type (void)
{
	static volatile gsize manager_type_id__once = 0;
	if (g_once_init_enter (&manager_type_id__once)) {
		GType manager_type_id;
		manager_type_id = manager_get_type_once ();
		g_once_init_leave (&manager_type_id__once, manager_type_id);
	}
	return manager_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (ManagerProxy, manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MANAGER, manager_proxy_manager_interface_init) )
static void
manager_proxy_class_init (ManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = manager_proxy_g_signal;
}

static void
_dbus_handle_manager_prepare_for_sleep (Manager* self,
                                        GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gboolean sleeping = FALSE;
	GVariant* _tmp0_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	sleeping = g_variant_get_boolean (_tmp0_);
	g_variant_unref (_tmp0_);
	g_signal_emit_by_name (self, "prepare-for-sleep", sleeping);
}

static void
manager_proxy_g_signal (GDBusProxy* proxy,
                        const gchar* sender_name,
                        const gchar* signal_name,
                        GVariant* parameters)
{
	if (strcmp (signal_name, "PrepareForSleep") == 0) {
		_dbus_handle_manager_prepare_for_sleep ((Manager*) proxy, parameters);
	}
}

static void
manager_proxy_init (ManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_manager_dbus_interface_info));
}

static void
manager_proxy_manager_interface_init (ManagerIface* iface)
{
}

static void
manager_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)
{
	g_object_unref (invocation);
}

static GVariant*
manager_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)
{
	return NULL;
}

static gboolean
manager_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;
}

static void
_dbus_manager_prepare_for_sleep (GObject* _sender,
                                 gboolean sleeping,
                                 gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (sleeping));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.login1.Manager", "PrepareForSleep", _arguments, NULL);
}

guint
manager_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 *) (&_manager_dbus_interface_info), &_manager_dbus_interface_vtable, data, _manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "prepare-for-sleep", (GCallback) _dbus_manager_prepare_for_sleep, data);
	return result;
}

static void
_manager_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_manager_prepare_for_sleep, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

gchar*
pantheon_accounts_service_get_time_format (PantheonAccountsService* self)
{
	PantheonAccountsServiceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE (self);
	if (_iface_->get_time_format) {
		return _iface_->get_time_format (self);
	}
	return NULL;
}

void
pantheon_accounts_service_set_time_format (PantheonAccountsService* self,
                                           const gchar* value)
{
	PantheonAccountsServiceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE (self);
	if (_iface_->set_time_format) {
		_iface_->set_time_format (self, value);
	}
}

static void
pantheon_accounts_service_default_init (PantheonAccountsServiceIface * iface,
                                        gpointer iface_data)
{
}

static GType
pantheon_accounts_service_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PantheonAccountsServiceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pantheon_accounts_service_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType pantheon_accounts_service_type_id;
	pantheon_accounts_service_type_id = g_type_register_static (G_TYPE_INTERFACE, "PantheonAccountsService", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (pantheon_accounts_service_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) pantheon_accounts_service_proxy_get_type);
	g_type_set_qdata (pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "io.elementary.pantheon.AccountsService");
	g_type_set_qdata (pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_pantheon_accounts_service_dbus_interface_info));
	g_type_set_qdata (pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) pantheon_accounts_service_register_object);
	return pantheon_accounts_service_type_id;
}

GType
pantheon_accounts_service_get_type (void)
{
	static volatile gsize pantheon_accounts_service_type_id__once = 0;
	if (g_once_init_enter (&pantheon_accounts_service_type_id__once)) {
		GType pantheon_accounts_service_type_id;
		pantheon_accounts_service_type_id = pantheon_accounts_service_get_type_once ();
		g_once_init_leave (&pantheon_accounts_service_type_id__once, pantheon_accounts_service_type_id);
	}
	return pantheon_accounts_service_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (PantheonAccountsServiceProxy, pantheon_accounts_service_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (PANTHEON_TYPE_ACCOUNTS_SERVICE, pantheon_accounts_service_proxy_pantheon_accounts_service_interface_init) )
static void
pantheon_accounts_service_proxy_class_init (PantheonAccountsServiceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = pantheon_accounts_service_proxy_g_signal;
}

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

static void
pantheon_accounts_service_proxy_init (PantheonAccountsServiceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_pantheon_accounts_service_dbus_interface_info));
}

static gchar*
pantheon_accounts_service_dbus_proxy_get_time_format (PantheonAccountsService* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "TimeFormat");
	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 ("io.elementary.pantheon.AccountsService"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("TimeFormat"));
		_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 void
pantheon_accounts_service_dbus_proxy_set_time_format (PantheonAccountsService* self,
                                                      const gchar* value)
{
	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 ("io.elementary.pantheon.AccountsService"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("TimeFormat"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static void
pantheon_accounts_service_proxy_pantheon_accounts_service_interface_init (PantheonAccountsServiceIface* iface)
{
	iface->get_time_format = pantheon_accounts_service_dbus_proxy_get_time_format;
	iface->set_time_format = pantheon_accounts_service_dbus_proxy_set_time_format;
}

static void
pantheon_accounts_service_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)
{
	g_object_unref (invocation);
}

static GVariant*
_dbus_pantheon_accounts_service_get_time_format (PantheonAccountsService* self)
{
	gchar* result;
	GVariant* _reply;
	result = pantheon_accounts_service_get_time_format (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
pantheon_accounts_service_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, "TimeFormat") == 0) {
		return _dbus_pantheon_accounts_service_get_time_format (object);
	}
	return NULL;
}

static void
_dbus_pantheon_accounts_service_set_time_format (PantheonAccountsService* self,
                                                 GVariant* _value)
{
	gchar* value = NULL;
	value = g_variant_dup_string (_value, NULL);
	pantheon_accounts_service_set_time_format (self, value);
	_g_free0 (value);
}

static gboolean
pantheon_accounts_service_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "TimeFormat") == 0) {
		_dbus_pantheon_accounts_service_set_time_format (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
pantheon_accounts_service_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 *) (&_pantheon_accounts_service_dbus_interface_info), &_pantheon_accounts_service_dbus_interface_vtable, data, _pantheon_accounts_service_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_pantheon_accounts_service_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);
}

gchar*
fdo_accounts_find_user_by_name (FDOAccounts* self,
                                const gchar* username,
                                GError** error)
{
	FDOAccountsIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FDO_ACCOUNTS_GET_INTERFACE (self);
	if (_iface_->find_user_by_name) {
		return _iface_->find_user_by_name (self, username, error);
	}
	return NULL;
}

static void
fdo_accounts_default_init (FDOAccountsIface * iface,
                           gpointer iface_data)
{
}

static GType
fdo_accounts_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FDOAccountsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fdo_accounts_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType fdo_accounts_type_id;
	fdo_accounts_type_id = g_type_register_static (G_TYPE_INTERFACE, "FDOAccounts", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (fdo_accounts_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) fdo_accounts_proxy_get_type);
	g_type_set_qdata (fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Accounts");
	g_type_set_qdata (fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_fdo_accounts_dbus_interface_info));
	g_type_set_qdata (fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) fdo_accounts_register_object);
	return fdo_accounts_type_id;
}

GType
fdo_accounts_get_type (void)
{
	static volatile gsize fdo_accounts_type_id__once = 0;
	if (g_once_init_enter (&fdo_accounts_type_id__once)) {
		GType fdo_accounts_type_id;
		fdo_accounts_type_id = fdo_accounts_get_type_once ();
		g_once_init_leave (&fdo_accounts_type_id__once, fdo_accounts_type_id);
	}
	return fdo_accounts_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (FDOAccountsProxy, fdo_accounts_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (FDO_TYPE_ACCOUNTS, fdo_accounts_proxy_fdo_accounts_interface_init) )
static void
fdo_accounts_proxy_class_init (FDOAccountsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = fdo_accounts_proxy_g_signal;
}

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

static void
fdo_accounts_proxy_init (FDOAccountsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_fdo_accounts_dbus_interface_info));
}

static gchar*
fdo_accounts_proxy_find_user_by_name (FDOAccounts* self,
                                      const gchar* username,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp1_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.Accounts", "FindUserByName");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (username));
	_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 NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp1_, NULL);
	g_variant_unref (_tmp1_);
	g_object_unref (_reply_message);
	return _result;
}

static void
fdo_accounts_proxy_fdo_accounts_interface_init (FDOAccountsIface* iface)
{
	iface->find_user_by_name = fdo_accounts_proxy_find_user_by_name;
}

static void
_dbus_fdo_accounts_find_user_by_name (FDOAccounts* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* username = NULL;
	GVariant* _tmp2_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	username = g_variant_dup_string (_tmp2_, NULL);
	g_variant_unref (_tmp2_);
	result = fdo_accounts_find_user_by_name (self, username, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
	_g_free0 (result);
	_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 (username);
	;
}

static void
fdo_accounts_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, "FindUserByName") == 0) {
		_dbus_fdo_accounts_find_user_by_name (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
fdo_accounts_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)
{
	return NULL;
}

static gboolean
fdo_accounts_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
fdo_accounts_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 *) (&_fdo_accounts_dbus_interface_info), &_fdo_accounts_dbus_interface_vtable, data, _fdo_accounts_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_fdo_accounts_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);
}

static inline gpointer
date_time_services_time_manager_get_instance_private (DateTimeServicesTimeManager* self)
{
	return G_STRUCT_MEMBER_P (self, DateTimeServicesTimeManager_private_offset);
}

static void
___lambda5_ (DateTimeServicesTimeManager* self)
{
	date_time_services_time_manager_add_timeout (self, FALSE);
}

static void
____lambda5__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	___lambda5_ ((DateTimeServicesTimeManager*) self);
}

static void
_date_time_services_time_manager_on_watch_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                       const gchar* name,
                                                                       const gchar* name_owner,
                                                                       gpointer self)
{
	date_time_services_time_manager_on_watch ((DateTimeServicesTimeManager*) self, connection);
}

static void
_date_time_services_time_manager_on_unwatch_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                         const gchar* name,
                                                                         gpointer self)
{
	date_time_services_time_manager_on_unwatch ((DateTimeServicesTimeManager*) self, connection);
}

static void
___lambda6_ (DateTimeServicesTimeManager* self,
             gboolean sleeping)
{
	if (!sleeping) {
		date_time_services_time_manager_update_current_time (self);
		g_signal_emit (self, date_time_services_time_manager_signals[DATE_TIME_SERVICES_TIME_MANAGER_MINUTE_CHANGED_SIGNAL], 0);
		date_time_services_time_manager_add_timeout (self, FALSE);
	}
}

static void
____lambda6__manager_prepare_for_sleep (Manager* _sender,
                                        gboolean sleeping,
                                        gpointer self)
{
	___lambda6_ ((DateTimeServicesTimeManager*) self, sleeping);
}

DateTimeServicesTimeManager*
date_time_services_time_manager_construct (GType object_type)
{
	DateTimeServicesTimeManager * self = NULL;
	GDateTime* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = (DateTimeServicesTimeManager*) g_object_new (object_type, NULL);
	date_time_services_time_manager_update_current_time (self);
	_tmp0_ = self->priv->current_time;
	if (_tmp0_ == NULL) {
		return self;
	}
	date_time_services_time_manager_add_timeout (self, FALSE);
	{
		GSettings* clock_settings = NULL;
		GSettings* _tmp1_;
		GSettings* _tmp2_;
		Manager* _tmp3_ = NULL;
		Manager* _tmp4_;
		Manager* _tmp5_;
		Manager* _tmp6_;
		_tmp1_ = g_settings_new ("io.elementary.desktop.wingpanel.datetime");
		clock_settings = _tmp1_;
		_tmp2_ = clock_settings;
		g_settings_bind (_tmp2_, "clock-show-seconds", (GObject*) self, "clock-show-seconds", G_SETTINGS_BIND_DEFAULT);
		g_signal_connect_object ((GObject*) self, "notify::clock-show-seconds", (GCallback) ____lambda5__g_object_notify, self, 0);
		g_bus_watch_name_with_closures (G_BUS_TYPE_SYSTEM, "org.freedesktop.timedate1", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_date_time_services_time_manager_on_watch_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _date_time_services_time_manager_on_watch_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_date_time_services_time_manager_on_unwatch_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _date_time_services_time_manager_on_unwatch_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
		_tmp4_ = (Manager*) g_initable_new (TYPE_MANAGER_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.freedesktop.login1", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/login1", "g-interface-name", "org.freedesktop.login1.Manager", NULL);
		_tmp3_ = (Manager*) _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (clock_settings);
			goto __catch0_g_error;
		}
		_tmp5_ = _tmp3_;
		_tmp3_ = NULL;
		_g_object_unref0 (self->priv->manager);
		self->priv->manager = _tmp5_;
		_tmp6_ = self->priv->manager;
		g_signal_connect_object (_tmp6_, "prepare-for-sleep", (GCallback) ____lambda6__manager_prepare_for_sleep, self, 0);
		_g_object_unref0 (_tmp3_);
		_g_object_unref0 (clock_settings);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning ("TimeManager.vala:75: %s", _tmp8_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	return self;
}

DateTimeServicesTimeManager*
date_time_services_time_manager_new (void)
{
	return date_time_services_time_manager_construct (DATE_TIME_SERVICES_TYPE_TIME_MANAGER);
}

static void
date_time_services_time_manager_setup_time_format_data_free (gpointer _data)
{
	DateTimeServicesTimeManagerSetupTimeFormatData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DateTimeServicesTimeManagerSetupTimeFormatData, _data_);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
date_time_services_time_manager_setup_time_format (DateTimeServicesTimeManager* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	DateTimeServicesTimeManagerSetupTimeFormatData* _data_;
	DateTimeServicesTimeManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DateTimeServicesTimeManagerSetupTimeFormatData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, date_time_services_time_manager_setup_time_format_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	date_time_services_time_manager_setup_time_format_co (_data_);
}

static void
date_time_services_time_manager_setup_time_format_finish (DateTimeServicesTimeManager* self,
                                                          GAsyncResult* _res_)
{
	DateTimeServicesTimeManagerSetupTimeFormatData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		DateTimeServicesTimeManager* self;
		self = _data9_->self;
		_g_object_unref0 (_data9_->greeter_act);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static void
date_time_services_time_manager_setup_time_format_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_)
{
	DateTimeServicesTimeManagerSetupTimeFormatData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	date_time_services_time_manager_setup_time_format_co (_data_);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static void
___lambda7_ (Block9Data* _data9_,
             GVariant* changed_properties,
             gchar** invalidated_properties)
{
	DateTimeServicesTimeManager* self;
	const GVariantType* _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	gboolean _tmp3_;
	self = _data9_->self;
	g_return_if_fail (changed_properties != NULL);
	_tmp0_ = G_VARIANT_TYPE_STRING;
	_tmp1_ = g_variant_lookup_value (changed_properties, "TimeFormat", _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_variant_unref0 (_tmp2_);
	if (_tmp3_) {
		PantheonAccountsService* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = _data9_->greeter_act;
		_tmp5_ = pantheon_accounts_service_get_time_format (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		date_time_services_time_manager_set_is_12h (self, string_contains (_tmp7_, "12h"));
		_g_free0 (_tmp7_);
	}
}

static void
____lambda7__g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                GVariant* changed_properties,
                                                gchar** invalidated_properties,
                                                gpointer self)
{
	___lambda7_ (self, changed_properties, invalidated_properties);
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		DateTimeServicesTimeManager* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->clock_settings);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

static void
___lambda8_ (Block10Data* _data10_)
{
	DateTimeServicesTimeManager* self;
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self = _data10_->self;
	_tmp0_ = _data10_->clock_settings;
	_tmp1_ = g_settings_get_string (_tmp0_, "clock-format");
	_tmp2_ = _tmp1_;
	date_time_services_time_manager_set_is_12h (self, string_contains (_tmp2_, "12h"));
	_g_free0 (_tmp2_);
}

static void
____lambda8__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	___lambda8_ (self);
}

static gboolean
date_time_services_time_manager_setup_time_format_co (DateTimeServicesTimeManagerSetupTimeFormatData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_data9_ = g_slice_new0 (Block9Data);
		_data_->_data9_->_ref_count_ = 1;
		_data_->_data9_->self = g_object_ref (_data_->self);
		_data_->_state_ = 1;
		g_async_initable_new_async (FDO_TYPE_ACCOUNTS_PROXY, 0, NULL, date_time_services_time_manager_setup_time_format_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/Accounts", "g-interface-name", "org.freedesktop.Accounts", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = (FDOAccounts*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->accounts_service = (FDOAccounts*) _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			block9_data_unref (_data_->_data9_);
			_data_->_data9_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->accounts_service;
		_data_->_tmp2_ = g_get_user_name ();
		_data_->_tmp3_ = fdo_accounts_find_user_by_name (_data_->_tmp1_, _data_->_tmp2_, &_data_->_inner_error0_);
		_data_->user_path = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->accounts_service);
			block9_data_unref (_data_->_data9_);
			_data_->_data9_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->user_path;
		_data_->_state_ = 2;
		g_async_initable_new_async (PANTHEON_TYPE_ACCOUNTS_SERVICE_PROXY, 0, NULL, date_time_services_time_manager_setup_time_format_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "g-name", "org.freedesktop.Accounts", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", _data_->_tmp4_, "g-interface-name", "io.elementary.pantheon.AccountsService", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp5_ = (PantheonAccountsService*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_data9_->greeter_act = (PantheonAccountsService*) _data_->_tmp5_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->user_path);
			_g_object_unref0 (_data_->accounts_service);
			block9_data_unref (_data_->_data9_);
			_data_->_data9_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp6_ = _data_->_data9_->greeter_act;
		_data_->_tmp7_ = pantheon_accounts_service_get_time_format (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = _data_->_tmp8_;
		date_time_services_time_manager_set_is_12h (_data_->self, string_contains (_data_->_tmp9_, "12h"));
		_g_free0 (_data_->_tmp9_);
		_data_->_tmp10_ = _data_->_data9_->greeter_act;
		g_signal_connect_data (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, g_dbus_proxy_get_type (), GDBusProxy), "g-properties-changed", (GCallback) ____lambda7__g_dbus_proxy_g_properties_changed, block9_data_ref (_data_->_data9_), (GClosureNotify) block9_data_unref, 0);
		_g_free0 (_data_->user_path);
		_g_object_unref0 (_data_->accounts_service);
		block9_data_unref (_data_->_data9_);
		_data_->_data9_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_data10_ = g_slice_new0 (Block10Data);
		_data_->_data10_->_ref_count_ = 1;
		_data_->_data10_->self = g_object_ref (_data_->self);
		_data_->_tmp11_ = _data_->e;
		_data_->_tmp12_ = _data_->_tmp11_->message;
		g_critical ("TimeManager.vala:101: %s", _data_->_tmp12_);
		_data_->_tmp13_ = g_settings_new ("org.gnome.desktop.interface");
		_data_->_data10_->clock_settings = _data_->_tmp13_;
		_data_->_tmp14_ = _data_->_data10_->clock_settings;
		g_signal_connect_data (_data_->_tmp14_, "changed::clock-format", (GCallback) ____lambda8__g_settings_changed, block10_data_ref (_data_->_data10_), (GClosureNotify) block10_data_unref, 0);
		_data_->_tmp15_ = _data_->_data10_->clock_settings;
		_data_->_tmp16_ = g_settings_get_string (_data_->_tmp15_, "clock-format");
		_data_->_tmp17_ = _data_->_tmp16_;
		date_time_services_time_manager_set_is_12h (_data_->self, string_contains (_data_->_tmp17_, "12h"));
		_g_free0 (_data_->_tmp17_);
		_g_error_free0 (_data_->e);
		block10_data_unref (_data_->_data10_);
		_data_->_data10_ = NULL;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
date_time_services_time_manager_on_watch (DateTimeServicesTimeManager* self,
                                          GDBusConnection* conn)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	date_time_services_time_manager_add_timeout (self, TRUE);
}

static void
date_time_services_time_manager_on_unwatch (DateTimeServicesTimeManager* self,
                                            GDBusConnection* conn)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	date_time_services_time_manager_add_timeout (self, FALSE);
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		DateTimeServicesTimeManager* self;
		self = _data11_->self;
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static gboolean
__lambda4_ (Block11Data* _data11_)
{
	DateTimeServicesTimeManager* self;
	gboolean result;
	self = _data11_->self;
	date_time_services_time_manager_update_current_time (self);
	g_signal_emit (self, date_time_services_time_manager_signals[DATE_TIME_SERVICES_TIME_MANAGER_MINUTE_CHANGED_SIGNAL], 0);
	date_time_services_time_manager_add_timeout (self, _data11_->update_fast);
	result = FALSE;
	return result;
}

static gboolean
___lambda4__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda4_ (self);
	return result;
}

static void
date_time_services_time_manager_add_timeout (DateTimeServicesTimeManager* self,
                                             gboolean update_fast)
{
	Block11Data* _data11_;
	guint interval = 0U;
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_data11_->update_fast = update_fast;
	if (_data11_->update_fast) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_clock_show_seconds;
		_tmp0_ = _tmp1_;
	}
	if (_tmp0_) {
		interval = (guint) 500;
	} else {
		interval = date_time_services_time_manager_calculate_time_until_next_minute (self);
	}
	if (self->priv->timeout_id > ((guint) 0)) {
		g_source_remove (self->priv->timeout_id);
	}
	self->priv->timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, interval, ___lambda4__gsource_func, block11_data_ref (_data11_), block11_data_unref);
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

gchar*
date_time_services_time_manager_format (DateTimeServicesTimeManager* self,
                                        const gchar* format)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (format != NULL, NULL);
	_tmp0_ = self->priv->current_time;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("undef");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->current_time;
	_tmp3_ = g_date_time_format (_tmp2_, format);
	result = _tmp3_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

GDateTime*
date_time_services_time_manager_get_current_time (DateTimeServicesTimeManager* self)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->current_time;
	_tmp1_ = _g_date_time_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
date_time_services_time_manager_update_current_time (DateTimeServicesTimeManager* self)
{
	GDateTime* local_time = NULL;
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_date_time_new_now_local ();
	local_time = _tmp0_;
	_tmp1_ = local_time;
	if (_tmp1_ == NULL) {
		g_critical ("TimeManager.vala:159: Can't get the local time.");
		_g_date_time_unref0 (local_time);
		return;
	}
	_tmp2_ = local_time;
	_tmp3_ = _g_date_time_ref0 (_tmp2_);
	_g_date_time_unref0 (self->priv->current_time);
	self->priv->current_time = _tmp3_;
	_g_date_time_unref0 (local_time);
}

static guint
date_time_services_time_manager_calculate_time_until_next_minute (DateTimeServicesTimeManager* self)
{
	GDateTime* _tmp0_;
	gint64 seconds_until_next_minute = 0LL;
	GDateTime* _tmp1_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->current_time;
	if (_tmp0_ == NULL) {
		result = (guint) (60 * 1000);
		return result;
	}
	_tmp1_ = self->priv->current_time;
	seconds_until_next_minute = 60 - (g_date_time_to_unix (_tmp1_) % 60);
	result = ((guint) seconds_until_next_minute) * 1000;
	return result;
}

DateTimeServicesTimeManager*
date_time_services_time_manager_get_default (void)
{
	DateTimeServicesTimeManager* _tmp0_;
	DateTimeServicesTimeManager* _tmp2_;
	DateTimeServicesTimeManager* _tmp3_;
	DateTimeServicesTimeManager* result;
	_tmp0_ = date_time_services_time_manager_instance;
	if (_tmp0_ == NULL) {
		DateTimeServicesTimeManager* _tmp1_;
		_tmp1_ = date_time_services_time_manager_new ();
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (date_time_services_time_manager_instance);
		date_time_services_time_manager_instance = _tmp1_;
	}
	_tmp2_ = date_time_services_time_manager_instance;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

gboolean
date_time_services_time_manager_get_clock_show_seconds (DateTimeServicesTimeManager* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clock_show_seconds;
	return result;
}

void
date_time_services_time_manager_set_clock_show_seconds (DateTimeServicesTimeManager* self,
                                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = date_time_services_time_manager_get_clock_show_seconds (self);
	if (old_value != value) {
		self->priv->_clock_show_seconds = value;
		g_object_notify_by_pspec ((GObject *) self, date_time_services_time_manager_properties[DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY]);
	}
}

gboolean
date_time_services_time_manager_get_is_12h (DateTimeServicesTimeManager* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_12h;
	return result;
}

void
date_time_services_time_manager_set_is_12h (DateTimeServicesTimeManager* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = date_time_services_time_manager_get_is_12h (self);
	if (old_value != value) {
		self->priv->_is_12h = value;
		g_object_notify_by_pspec ((GObject *) self, date_time_services_time_manager_properties[DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY]);
	}
}

static GObject *
date_time_services_time_manager_constructor (GType type,
                                             guint n_construct_properties,
                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DateTimeServicesTimeManager * self;
	parent_class = G_OBJECT_CLASS (date_time_services_time_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATE_TIME_SERVICES_TYPE_TIME_MANAGER, DateTimeServicesTimeManager);
	date_time_services_time_manager_setup_time_format (self, NULL, NULL);
	return obj;
}

static void
date_time_services_time_manager_class_init (DateTimeServicesTimeManagerClass * klass,
                                            gpointer klass_data)
{
	date_time_services_time_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DateTimeServicesTimeManager_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_date_time_services_time_manager_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_date_time_services_time_manager_set_property;
	G_OBJECT_CLASS (klass)->constructor = date_time_services_time_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = date_time_services_time_manager_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY, date_time_services_time_manager_properties[DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY] = g_param_spec_boolean ("clock-show-seconds", "clock-show-seconds", "clock-show-seconds", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY, date_time_services_time_manager_properties[DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY] = g_param_spec_boolean ("is-12h", "is-12h", "is-12h", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	date_time_services_time_manager_signals[DATE_TIME_SERVICES_TIME_MANAGER_MINUTE_CHANGED_SIGNAL] = g_signal_new ("minute-changed", DATE_TIME_SERVICES_TYPE_TIME_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
date_time_services_time_manager_instance_init (DateTimeServicesTimeManager * self,
                                               gpointer klass)
{
	self->priv = date_time_services_time_manager_get_instance_private (self);
	self->priv->current_time = NULL;
	self->priv->timeout_id = (guint) 0;
	self->priv->manager = NULL;
}

static void
date_time_services_time_manager_finalize (GObject * obj)
{
	DateTimeServicesTimeManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATE_TIME_SERVICES_TYPE_TIME_MANAGER, DateTimeServicesTimeManager);
	_g_date_time_unref0 (self->priv->current_time);
	_g_object_unref0 (self->priv->manager);
	G_OBJECT_CLASS (date_time_services_time_manager_parent_class)->finalize (obj);
}

static GType
date_time_services_time_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DateTimeServicesTimeManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) date_time_services_time_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DateTimeServicesTimeManager), 0, (GInstanceInitFunc) date_time_services_time_manager_instance_init, NULL };
	GType date_time_services_time_manager_type_id;
	date_time_services_time_manager_type_id = g_type_register_static (gtk_calendar_get_type (), "DateTimeServicesTimeManager", &g_define_type_info, 0);
	DateTimeServicesTimeManager_private_offset = g_type_add_instance_private (date_time_services_time_manager_type_id, sizeof (DateTimeServicesTimeManagerPrivate));
	return date_time_services_time_manager_type_id;
}

GType
date_time_services_time_manager_get_type (void)
{
	static volatile gsize date_time_services_time_manager_type_id__once = 0;
	if (g_once_init_enter (&date_time_services_time_manager_type_id__once)) {
		GType date_time_services_time_manager_type_id;
		date_time_services_time_manager_type_id = date_time_services_time_manager_get_type_once ();
		g_once_init_leave (&date_time_services_time_manager_type_id__once, date_time_services_time_manager_type_id);
	}
	return date_time_services_time_manager_type_id__once;
}

static void
_vala_date_time_services_time_manager_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	DateTimeServicesTimeManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DATE_TIME_SERVICES_TYPE_TIME_MANAGER, DateTimeServicesTimeManager);
	switch (property_id) {
		case DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY:
		g_value_set_boolean (value, date_time_services_time_manager_get_clock_show_seconds (self));
		break;
		case DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY:
		g_value_set_boolean (value, date_time_services_time_manager_get_is_12h (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_date_time_services_time_manager_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	DateTimeServicesTimeManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DATE_TIME_SERVICES_TYPE_TIME_MANAGER, DateTimeServicesTimeManager);
	switch (property_id) {
		case DATE_TIME_SERVICES_TIME_MANAGER_CLOCK_SHOW_SECONDS_PROPERTY:
		date_time_services_time_manager_set_clock_show_seconds (self, g_value_get_boolean (value));
		break;
		case DATE_TIME_SERVICES_TIME_MANAGER_IS_12H_PROPERTY:
		date_time_services_time_manager_set_is_12h (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

