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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.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_PANTHEON_TYPE_ACCOUNTS_SERVICE (date_time_pantheon_accounts_service_get_type ())
#define DATE_TIME_PANTHEON_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATE_TIME_PANTHEON_TYPE_ACCOUNTS_SERVICE, DateTimePantheonAccountsService))
#define DATE_TIME_PANTHEON_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATE_TIME_PANTHEON_TYPE_ACCOUNTS_SERVICE))
#define DATE_TIME_PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATE_TIME_PANTHEON_TYPE_ACCOUNTS_SERVICE, DateTimePantheonAccountsServiceIface))

typedef struct _DateTimePantheonAccountsService DateTimePantheonAccountsService;
typedef struct _DateTimePantheonAccountsServiceIface DateTimePantheonAccountsServiceIface;

#define DATE_TIME_PANTHEON_TYPE_ACCOUNTS_SERVICE_PROXY (date_time_pantheon_accounts_service_proxy_get_type ())
typedef GDBusProxy DateTimePantheonAccountsServiceProxy;
typedef GDBusProxyClass DateTimePantheonAccountsServiceProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define DATE_TIME_FDO_TYPE_ACCOUNTS (date_time_fdo_accounts_get_type ())
#define DATE_TIME_FDO_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATE_TIME_FDO_TYPE_ACCOUNTS, DateTimeFDOAccounts))
#define DATE_TIME_FDO_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATE_TIME_FDO_TYPE_ACCOUNTS))
#define DATE_TIME_FDO_ACCOUNTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATE_TIME_FDO_TYPE_ACCOUNTS, DateTimeFDOAccountsIface))

typedef struct _DateTimeFDOAccounts DateTimeFDOAccounts;
typedef struct _DateTimeFDOAccountsIface DateTimeFDOAccountsIface;

#define DATE_TIME_FDO_TYPE_ACCOUNTS_PROXY (date_time_fdo_accounts_proxy_get_type ())
typedef GDBusProxy DateTimeFDOAccountsProxy;
typedef GDBusProxyClass DateTimeFDOAccountsProxyClass;

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

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

VALA_EXTERN GType date_time_pantheon_accounts_service_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType date_time_pantheon_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint date_time_pantheon_accounts_service_register_object (void* object,
                                                           GDBusConnection* connection,
                                                           const gchar* path,
                                                           GError** error);
VALA_EXTERN gchar* date_time_pantheon_accounts_service_get_time_format (DateTimePantheonAccountsService* self);
VALA_EXTERN void date_time_pantheon_accounts_service_set_time_format (DateTimePantheonAccountsService* self,
                                                          const gchar* value);
static GType date_time_pantheon_accounts_service_get_type_once (void);
static void date_time_pantheon_accounts_service_proxy_g_signal (GDBusProxy* proxy,
                                                         const gchar* sender_name,
                                                         const gchar* signal_name,
                                                         GVariant* parameters);
static gchar* date_time_pantheon_accounts_service_dbus_proxy_get_time_format (DateTimePantheonAccountsService* self);
static void date_time_pantheon_accounts_service_dbus_proxy_set_time_format (DateTimePantheonAccountsService* self,
                                                                     const gchar* value);
static void date_time_pantheon_accounts_service_proxy_date_time_pantheon_accounts_service_interface_init (DateTimePantheonAccountsServiceIface* iface);
static void date_time_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* date_time_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_date_time_pantheon_accounts_service_get_time_format (DateTimePantheonAccountsService* self);
static gboolean date_time_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_date_time_pantheon_accounts_service_set_time_format (DateTimePantheonAccountsService* self,
                                                                GVariant* _value);
static void _date_time_pantheon_accounts_service_unregister_object (gpointer user_data);
VALA_EXTERN GType date_time_fdo_accounts_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint date_time_fdo_accounts_register_object (void* object,
                                              GDBusConnection* connection,
                                              const gchar* path,
                                              GError** error);
VALA_EXTERN GType date_time_fdo_accounts_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* date_time_fdo_accounts_find_user_by_name (DateTimeFDOAccounts* self,
                                                 const gchar* username,
                                                 GError** error);
static GType date_time_fdo_accounts_get_type_once (void);
static void date_time_fdo_accounts_proxy_g_signal (GDBusProxy* proxy,
                                            const gchar* sender_name,
                                            const gchar* signal_name,
                                            GVariant* parameters);
static gchar* date_time_fdo_accounts_proxy_find_user_by_name (DateTimeFDOAccounts* self,
                                                       const gchar* username,
                                                       GError** error);
static void date_time_fdo_accounts_proxy_date_time_fdo_accounts_interface_init (DateTimeFDOAccountsIface* iface);
static void _dbus_date_time_fdo_accounts_find_user_by_name (DateTimeFDOAccounts* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void date_time_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* date_time_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 date_time_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 _date_time_fdo_accounts_unregister_object (gpointer user_data);

static const GDBusMethodInfo * const _date_time_pantheon_accounts_service_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _date_time_pantheon_accounts_service_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _date_time_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 _date_time_pantheon_accounts_service_dbus_property_info[] = {&_date_time_pantheon_accounts_service_dbus_property_info_time_format, NULL};
static const GDBusInterfaceInfo _date_time_pantheon_accounts_service_dbus_interface_info = {-1, "io.elementary.pantheon.AccountsService", (GDBusMethodInfo **) (&_date_time_pantheon_accounts_service_dbus_method_info), (GDBusSignalInfo **) (&_date_time_pantheon_accounts_service_dbus_signal_info), (GDBusPropertyInfo **) (&_date_time_pantheon_accounts_service_dbus_property_info), NULL};
static const GDBusInterfaceVTable _date_time_pantheon_accounts_service_dbus_interface_vtable = {date_time_pantheon_accounts_service_dbus_interface_method_call, date_time_pantheon_accounts_service_dbus_interface_get_property, date_time_pantheon_accounts_service_dbus_interface_set_property};
static const GDBusArgInfo _date_time_fdo_accounts_dbus_arg_info_find_user_by_name_username = {-1, "username", "s", NULL};
static const GDBusArgInfo _date_time_fdo_accounts_dbus_arg_info_find_user_by_name_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _date_time_fdo_accounts_dbus_arg_info_find_user_by_name_in[] = {&_date_time_fdo_accounts_dbus_arg_info_find_user_by_name_username, NULL};
static const GDBusArgInfo * const _date_time_fdo_accounts_dbus_arg_info_find_user_by_name_out[] = {&_date_time_fdo_accounts_dbus_arg_info_find_user_by_name_result, NULL};
static const GDBusMethodInfo _date_time_fdo_accounts_dbus_method_info_find_user_by_name = {-1, "FindUserByName", (GDBusArgInfo **) (&_date_time_fdo_accounts_dbus_arg_info_find_user_by_name_in), (GDBusArgInfo **) (&_date_time_fdo_accounts_dbus_arg_info_find_user_by_name_out), NULL};
static const GDBusMethodInfo * const _date_time_fdo_accounts_dbus_method_info[] = {&_date_time_fdo_accounts_dbus_method_info_find_user_by_name, NULL};
static const GDBusSignalInfo * const _date_time_fdo_accounts_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _date_time_fdo_accounts_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _date_time_fdo_accounts_dbus_interface_info = {-1, "org.freedesktop.Accounts", (GDBusMethodInfo **) (&_date_time_fdo_accounts_dbus_method_info), (GDBusSignalInfo **) (&_date_time_fdo_accounts_dbus_signal_info), (GDBusPropertyInfo **) (&_date_time_fdo_accounts_dbus_property_info), NULL};
static const GDBusInterfaceVTable _date_time_fdo_accounts_dbus_interface_vtable = {date_time_fdo_accounts_dbus_interface_method_call, date_time_fdo_accounts_dbus_interface_get_property, date_time_fdo_accounts_dbus_interface_set_property};

gchar*
date_time_pantheon_accounts_service_get_time_format (DateTimePantheonAccountsService* self)
{
	DateTimePantheonAccountsServiceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DATE_TIME_PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE (self);
	if (_iface_->get_time_format) {
		return _iface_->get_time_format (self);
	}
	return NULL;
}

void
date_time_pantheon_accounts_service_set_time_format (DateTimePantheonAccountsService* self,
                                                     const gchar* value)
{
	DateTimePantheonAccountsServiceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DATE_TIME_PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE (self);
	if (_iface_->set_time_format) {
		_iface_->set_time_format (self, value);
	}
}

static void
date_time_pantheon_accounts_service_default_init (DateTimePantheonAccountsServiceIface * iface,
                                                  gpointer iface_data)
{
}

static GType
date_time_pantheon_accounts_service_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DateTimePantheonAccountsServiceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) date_time_pantheon_accounts_service_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType date_time_pantheon_accounts_service_type_id;
	date_time_pantheon_accounts_service_type_id = g_type_register_static (G_TYPE_INTERFACE, "DateTimePantheonAccountsService", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (date_time_pantheon_accounts_service_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (date_time_pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) date_time_pantheon_accounts_service_proxy_get_type);
	g_type_set_qdata (date_time_pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "io.elementary.pantheon.AccountsService");
	g_type_set_qdata (date_time_pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_date_time_pantheon_accounts_service_dbus_interface_info));
	g_type_set_qdata (date_time_pantheon_accounts_service_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) date_time_pantheon_accounts_service_register_object);
	return date_time_pantheon_accounts_service_type_id;
}

GType
date_time_pantheon_accounts_service_get_type (void)
{
	static volatile gsize date_time_pantheon_accounts_service_type_id__once = 0;
	if (g_once_init_enter (&date_time_pantheon_accounts_service_type_id__once)) {
		GType date_time_pantheon_accounts_service_type_id;
		date_time_pantheon_accounts_service_type_id = date_time_pantheon_accounts_service_get_type_once ();
		g_once_init_leave (&date_time_pantheon_accounts_service_type_id__once, date_time_pantheon_accounts_service_type_id);
	}
	return date_time_pantheon_accounts_service_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (DateTimePantheonAccountsServiceProxy, date_time_pantheon_accounts_service_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DATE_TIME_PANTHEON_TYPE_ACCOUNTS_SERVICE, date_time_pantheon_accounts_service_proxy_date_time_pantheon_accounts_service_interface_init) )
static void
date_time_pantheon_accounts_service_proxy_class_init (DateTimePantheonAccountsServiceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = date_time_pantheon_accounts_service_proxy_g_signal;
}

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

static void
date_time_pantheon_accounts_service_proxy_init (DateTimePantheonAccountsServiceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_date_time_pantheon_accounts_service_dbus_interface_info));
}

static gchar*
date_time_pantheon_accounts_service_dbus_proxy_get_time_format (DateTimePantheonAccountsService* 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
date_time_pantheon_accounts_service_dbus_proxy_set_time_format (DateTimePantheonAccountsService* 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
date_time_pantheon_accounts_service_proxy_date_time_pantheon_accounts_service_interface_init (DateTimePantheonAccountsServiceIface* iface)
{
	iface->get_time_format = date_time_pantheon_accounts_service_dbus_proxy_get_time_format;
	iface->set_time_format = date_time_pantheon_accounts_service_dbus_proxy_set_time_format;
}

static void
date_time_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_date_time_pantheon_accounts_service_get_time_format (DateTimePantheonAccountsService* self)
{
	gchar* result;
	GVariant* _reply;
	result = date_time_pantheon_accounts_service_get_time_format (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
date_time_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_date_time_pantheon_accounts_service_get_time_format (object);
	}
	return NULL;
}

static void
_dbus_date_time_pantheon_accounts_service_set_time_format (DateTimePantheonAccountsService* self,
                                                           GVariant* _value)
{
	gchar* value = NULL;
	value = g_variant_dup_string (_value, NULL);
	date_time_pantheon_accounts_service_set_time_format (self, value);
	_g_free0 (value);
}

static gboolean
date_time_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_date_time_pantheon_accounts_service_set_time_format (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
date_time_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 *) (&_date_time_pantheon_accounts_service_dbus_interface_info), &_date_time_pantheon_accounts_service_dbus_interface_vtable, data, _date_time_pantheon_accounts_service_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_date_time_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*
date_time_fdo_accounts_find_user_by_name (DateTimeFDOAccounts* self,
                                          const gchar* username,
                                          GError** error)
{
	DateTimeFDOAccountsIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = DATE_TIME_FDO_ACCOUNTS_GET_INTERFACE (self);
	if (_iface_->find_user_by_name) {
		return _iface_->find_user_by_name (self, username, error);
	}
	return NULL;
}

static void
date_time_fdo_accounts_default_init (DateTimeFDOAccountsIface * iface,
                                     gpointer iface_data)
{
}

static GType
date_time_fdo_accounts_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DateTimeFDOAccountsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) date_time_fdo_accounts_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType date_time_fdo_accounts_type_id;
	date_time_fdo_accounts_type_id = g_type_register_static (G_TYPE_INTERFACE, "DateTimeFDOAccounts", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (date_time_fdo_accounts_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (date_time_fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) date_time_fdo_accounts_proxy_get_type);
	g_type_set_qdata (date_time_fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.Accounts");
	g_type_set_qdata (date_time_fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_date_time_fdo_accounts_dbus_interface_info));
	g_type_set_qdata (date_time_fdo_accounts_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) date_time_fdo_accounts_register_object);
	return date_time_fdo_accounts_type_id;
}

GType
date_time_fdo_accounts_get_type (void)
{
	static volatile gsize date_time_fdo_accounts_type_id__once = 0;
	if (g_once_init_enter (&date_time_fdo_accounts_type_id__once)) {
		GType date_time_fdo_accounts_type_id;
		date_time_fdo_accounts_type_id = date_time_fdo_accounts_get_type_once ();
		g_once_init_leave (&date_time_fdo_accounts_type_id__once, date_time_fdo_accounts_type_id);
	}
	return date_time_fdo_accounts_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (DateTimeFDOAccountsProxy, date_time_fdo_accounts_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DATE_TIME_FDO_TYPE_ACCOUNTS, date_time_fdo_accounts_proxy_date_time_fdo_accounts_interface_init) )
static void
date_time_fdo_accounts_proxy_class_init (DateTimeFDOAccountsProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = date_time_fdo_accounts_proxy_g_signal;
}

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

static void
date_time_fdo_accounts_proxy_init (DateTimeFDOAccountsProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_date_time_fdo_accounts_dbus_interface_info));
}

static gchar*
date_time_fdo_accounts_proxy_find_user_by_name (DateTimeFDOAccounts* 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* _tmp13_;
	_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);
	_tmp13_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp13_, NULL);
	g_variant_unref (_tmp13_);
	g_object_unref (_reply_message);
	return _result;
}

static void
date_time_fdo_accounts_proxy_date_time_fdo_accounts_interface_init (DateTimeFDOAccountsIface* iface)
{
	iface->find_user_by_name = date_time_fdo_accounts_proxy_find_user_by_name;
}

static void
_dbus_date_time_fdo_accounts_find_user_by_name (DateTimeFDOAccounts* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* username = NULL;
	GVariant* _tmp14_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	username = g_variant_dup_string (_tmp14_, NULL);
	g_variant_unref (_tmp14_);
	result = date_time_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
date_time_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_date_time_fdo_accounts_find_user_by_name (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
date_time_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
date_time_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
date_time_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 *) (&_date_time_fdo_accounts_dbus_interface_info), &_date_time_fdo_accounts_dbus_interface_vtable, data, _date_time_fdo_accounts_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

