/* dbus-common.c generated by valac 0.26.0, the Vala compiler
 * generated from dbus-common.vala, do not modify */

/* 
 *      Copyright 2011 Julien Lavergne <gilir@ubuntu.com>
 *
 *      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.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>


#define LXSESSION_TYPE_SESSION_OBJECT (lxsession_session_object_get_type ())
#define LXSESSION_SESSION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_SESSION_OBJECT, LxsessionSessionObject))
#define LXSESSION_SESSION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_SESSION_OBJECT, LxsessionSessionObjectClass))
#define LXSESSION_IS_SESSION_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_SESSION_OBJECT))
#define LXSESSION_IS_SESSION_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_SESSION_OBJECT))
#define LXSESSION_SESSION_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_SESSION_OBJECT, LxsessionSessionObjectClass))

typedef struct _LxsessionSessionObject LxsessionSessionObject;
typedef struct _LxsessionSessionObjectClass LxsessionSessionObjectClass;
typedef struct _LxsessionSessionObjectPrivate LxsessionSessionObjectPrivate;

#define LXSESSION_TYPE_CONSOLE_KIT_OBJECT (lxsession_console_kit_object_get_type ())
#define LXSESSION_CONSOLE_KIT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_CONSOLE_KIT_OBJECT, LxsessionConsoleKitObject))
#define LXSESSION_IS_CONSOLE_KIT_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_CONSOLE_KIT_OBJECT))
#define LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LXSESSION_TYPE_CONSOLE_KIT_OBJECT, LxsessionConsoleKitObjectIface))

typedef struct _LxsessionConsoleKitObject LxsessionConsoleKitObject;
typedef struct _LxsessionConsoleKitObjectIface LxsessionConsoleKitObjectIface;

#define LXSESSION_TYPE_CONSOLE_KIT_OBJECT_PROXY (lxsession_console_kit_object_proxy_get_type ())
#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 _LxsessionSessionObjectLxsessionCanShutdownData LxsessionSessionObjectLxsessionCanShutdownData;
typedef GDBusProxy LxsessionConsoleKitObjectProxy;
typedef GDBusProxyClass LxsessionConsoleKitObjectProxyClass;

#define LXSESSION_TYPE_LXDE_SESSION_SERVER (lxsession_lxde_session_server_get_type ())
#define LXSESSION_LXDE_SESSION_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LXDE_SESSION_SERVER, LxsessionLxdeSessionServer))
#define LXSESSION_LXDE_SESSION_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LXDE_SESSION_SERVER, LxsessionLxdeSessionServerClass))
#define LXSESSION_IS_LXDE_SESSION_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LXDE_SESSION_SERVER))
#define LXSESSION_IS_LXDE_SESSION_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LXDE_SESSION_SERVER))
#define LXSESSION_LXDE_SESSION_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LXDE_SESSION_SERVER, LxsessionLxdeSessionServerClass))

typedef struct _LxsessionLxdeSessionServer LxsessionLxdeSessionServer;
typedef struct _LxsessionLxdeSessionServerClass LxsessionLxdeSessionServerClass;

#define LXSESSION_TYPE_GNOME_SESSION_SERVER (lxsession_gnome_session_server_get_type ())
#define LXSESSION_GNOME_SESSION_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServer))
#define LXSESSION_GNOME_SESSION_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServerClass))
#define LXSESSION_IS_GNOME_SESSION_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_GNOME_SESSION_SERVER))
#define LXSESSION_IS_GNOME_SESSION_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_GNOME_SESSION_SERVER))
#define LXSESSION_GNOME_SESSION_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServerClass))

typedef struct _LxsessionGnomeSessionServer LxsessionGnomeSessionServer;
typedef struct _LxsessionGnomeSessionServerClass LxsessionGnomeSessionServerClass;

struct _LxsessionConsoleKitObjectIface {
	GTypeInterface parent_iface;
	void (*restart) (LxsessionConsoleKitObject* self, GError** error);
	void (*stop) (LxsessionConsoleKitObject* self, GError** error);
	void (*can_restart) (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*can_restart_finish) (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
	void (*can_stop) (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*can_stop_finish) (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
};

struct _LxsessionSessionObject {
	GObject parent_instance;
	LxsessionSessionObjectPrivate * priv;
	LxsessionConsoleKitObject* dbus_interface;
};

struct _LxsessionSessionObjectClass {
	GObjectClass parent_class;
};

struct _LxsessionSessionObjectLxsessionCanShutdownData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LxsessionSessionObject* self;
	gboolean result;
	gboolean can_shutdown_available;
	gboolean _tmp0_;
	LxsessionConsoleKitObject* _tmp1_;
	gboolean _tmp2_;
	GError* err;
	GError* _tmp3_;
	const gchar* _tmp4_;
	GError * _inner_error_;
};


static gpointer lxsession_session_object_parent_class = NULL;

GType lxsession_session_object_get_type (void) G_GNUC_CONST;
GType lxsession_console_kit_object_proxy_get_type (void) G_GNUC_CONST;
guint lxsession_console_kit_object_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType lxsession_console_kit_object_get_type (void) G_GNUC_CONST;
enum  {
	LXSESSION_SESSION_OBJECT_DUMMY_PROPERTY
};
LxsessionSessionObject* lxsession_session_object_new (void);
LxsessionSessionObject* lxsession_session_object_construct (GType object_type);
static void lxsession_session_object_lxsession_can_shutdown_data_free (gpointer _data);
void lxsession_session_object_lxsession_can_shutdown (LxsessionSessionObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean lxsession_session_object_lxsession_can_shutdown_finish (LxsessionSessionObject* self, GAsyncResult* _res_);
static gboolean lxsession_session_object_lxsession_can_shutdown_co (LxsessionSessionObjectLxsessionCanShutdownData* _data_);
void lxsession_console_kit_object_can_stop (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean lxsession_console_kit_object_can_stop_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
static void lxsession_session_object_lxsession_can_shutdown_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void lxsession_session_object_lxsession_shutdown (LxsessionSessionObject* self);
void lxsession_console_kit_object_stop (LxsessionConsoleKitObject* self, GError** error);
void lxsession_session_object_lxsession_restart (LxsessionSessionObject* self);
void lxsession_console_kit_object_restart (LxsessionConsoleKitObject* self, GError** error);
static void lxsession_session_object_finalize (GObject* obj);
void lxsession_console_kit_object_can_restart (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean lxsession_console_kit_object_can_restart_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
#define LXSESSION_CONSOLE_KIT_OBJECT_UNIQUE_NAME "org.freedesktop.ConsoleKit"
#define LXSESSION_CONSOLE_KIT_OBJECT_OBJECT_PATH "/org/freedesktop/ConsoleKit/Manager"
#define LXSESSION_CONSOLE_KIT_OBJECT_INTERFACE_NAME "org.freedesktop.ConsoleKit.Manager"
static void lxsession_console_kit_object_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
static void lxsession_console_kit_object_proxy_restart (LxsessionConsoleKitObject* self, GError** error);
static void lxsession_console_kit_object_proxy_stop (LxsessionConsoleKitObject* self, GError** error);
static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data);
static void lxsession_console_kit_object_proxy_can_restart_async (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean lxsession_console_kit_object_proxy_can_restart_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
static void lxsession_console_kit_object_proxy_can_stop_async (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean lxsession_console_kit_object_proxy_can_stop_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error);
static void lxsession_console_kit_object_proxy_lxsession_console_kit_object_interface_init (LxsessionConsoleKitObjectIface* iface);
static void _dbus_lxsession_console_kit_object_restart (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_lxsession_console_kit_object_stop (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_lxsession_console_kit_object_can_restart (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_lxsession_console_kit_object_can_restart_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
static void _dbus_lxsession_console_kit_object_can_stop (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_lxsession_console_kit_object_can_stop_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
static void lxsession_console_kit_object_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* lxsession_console_kit_object_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 lxsession_console_kit_object_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 _lxsession_console_kit_object_unregister_object (gpointer user_data);
void lxsession_on_bus_aquired (GDBusConnection* conn);
LxsessionLxdeSessionServer* lxsession_lxde_session_server_new (void);
LxsessionLxdeSessionServer* lxsession_lxde_session_server_construct (GType object_type);
GType lxsession_lxde_session_server_get_type (void) G_GNUC_CONST;
guint lxsession_lxde_session_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
void lxsession_on_gnome_bus_aquired (GDBusConnection* conn);
LxsessionGnomeSessionServer* lxsession_gnome_session_server_new (void);
LxsessionGnomeSessionServer* lxsession_gnome_session_server_construct (GType object_type);
GType lxsession_gnome_session_server_get_type (void) G_GNUC_CONST;
guint lxsession_gnome_session_server_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);

static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_restart_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_restart_out[] = {NULL};
static const GDBusMethodInfo _lxsession_console_kit_object_dbus_method_info_restart = {-1, "Restart", (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_restart_in), (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_restart_out)};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_stop_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_stop_out[] = {NULL};
static const GDBusMethodInfo _lxsession_console_kit_object_dbus_method_info_stop = {-1, "Stop", (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_stop_in), (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_stop_out)};
static const GDBusArgInfo _lxsession_console_kit_object_dbus_arg_info_can_restart_result = {-1, "result", "b"};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_can_restart_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_can_restart_out[] = {&_lxsession_console_kit_object_dbus_arg_info_can_restart_result, NULL};
static const GDBusMethodInfo _lxsession_console_kit_object_dbus_method_info_can_restart = {-1, "CanRestart", (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_can_restart_in), (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_can_restart_out)};
static const GDBusArgInfo _lxsession_console_kit_object_dbus_arg_info_can_stop_result = {-1, "result", "b"};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_can_stop_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_console_kit_object_dbus_arg_info_can_stop_out[] = {&_lxsession_console_kit_object_dbus_arg_info_can_stop_result, NULL};
static const GDBusMethodInfo _lxsession_console_kit_object_dbus_method_info_can_stop = {-1, "CanStop", (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_can_stop_in), (GDBusArgInfo **) (&_lxsession_console_kit_object_dbus_arg_info_can_stop_out)};
static const GDBusMethodInfo * const _lxsession_console_kit_object_dbus_method_info[] = {&_lxsession_console_kit_object_dbus_method_info_restart, &_lxsession_console_kit_object_dbus_method_info_stop, &_lxsession_console_kit_object_dbus_method_info_can_restart, &_lxsession_console_kit_object_dbus_method_info_can_stop, NULL};
static const GDBusSignalInfo * const _lxsession_console_kit_object_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _lxsession_console_kit_object_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _lxsession_console_kit_object_dbus_interface_info = {-1, "org.freedesktop.ConsoleKit.Manager", (GDBusMethodInfo **) (&_lxsession_console_kit_object_dbus_method_info), (GDBusSignalInfo **) (&_lxsession_console_kit_object_dbus_signal_info), (GDBusPropertyInfo **) (&_lxsession_console_kit_object_dbus_property_info)};
static const GDBusInterfaceVTable _lxsession_console_kit_object_dbus_interface_vtable = {lxsession_console_kit_object_dbus_interface_method_call, lxsession_console_kit_object_dbus_interface_get_property, lxsession_console_kit_object_dbus_interface_set_property};

LxsessionSessionObject* lxsession_session_object_construct (GType object_type) {
	LxsessionSessionObject * self = NULL;
	GError * _inner_error_ = NULL;
	self = (LxsessionSessionObject*) g_object_new (object_type, NULL);
	{
		LxsessionConsoleKitObject* _tmp0_ = NULL;
		LxsessionConsoleKitObject* _tmp1_ = NULL;
		LxsessionConsoleKitObject* _tmp2_ = NULL;
		_tmp1_ = g_initable_new (LXSESSION_TYPE_CONSOLE_KIT_OBJECT_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", "org.freedesktop.ConsoleKit", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/ConsoleKit/Manager", "g-interface-name", "org.freedesktop.ConsoleKit.Manager", "g-interface-info", g_type_get_qdata (LXSESSION_TYPE_CONSOLE_KIT_OBJECT, g_quark_from_static_string ("vala-dbus-interface-info")), NULL);
		_tmp0_ = (LxsessionConsoleKitObject*) _tmp1_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch10_g_io_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->dbus_interface);
		self->dbus_interface = _tmp2_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally10;
	__catch10_g_io_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_message ("dbus-common.vala:37: Could not register service\n");
		_g_error_free0 (e);
	}
	__finally10:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	return self;
}


LxsessionSessionObject* lxsession_session_object_new (void) {
	return lxsession_session_object_construct (LXSESSION_TYPE_SESSION_OBJECT);
}


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


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


void lxsession_session_object_lxsession_can_shutdown (LxsessionSessionObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LxsessionSessionObjectLxsessionCanShutdownData* _data_;
	LxsessionSessionObject* _tmp0_ = NULL;
	_data_ = g_slice_new0 (LxsessionSessionObjectLxsessionCanShutdownData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, lxsession_session_object_lxsession_can_shutdown);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, lxsession_session_object_lxsession_can_shutdown_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	lxsession_session_object_lxsession_can_shutdown_co (_data_);
}


gboolean lxsession_session_object_lxsession_can_shutdown_finish (LxsessionSessionObject* self, GAsyncResult* _res_) {
	gboolean result;
	LxsessionSessionObjectLxsessionCanShutdownData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void lxsession_session_object_lxsession_can_shutdown_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LxsessionSessionObjectLxsessionCanShutdownData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	lxsession_session_object_lxsession_can_shutdown_co (_data_);
}


static gboolean lxsession_session_object_lxsession_can_shutdown_co (LxsessionSessionObjectLxsessionCanShutdownData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->can_shutdown_available = FALSE;
	{
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = _data_->self->dbus_interface;
		_data_->_state_ = 1;
		lxsession_console_kit_object_can_stop (_data_->_tmp1_, lxsession_session_object_lxsession_can_shutdown_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp2_ = FALSE;
		_data_->_tmp2_ = lxsession_console_kit_object_can_stop_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp0_ = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			if (_data_->_inner_error_->domain == DBUS_GERROR) {
				goto __catch11_dbus_gerror;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
		_data_->can_shutdown_available = _data_->_tmp0_;
	}
	goto __finally11;
	__catch11_dbus_gerror:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->err;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->_tmp3_->message;
		g_warning ("dbus-common.vala:47: %s", _data_->_tmp4_);
		_data_->can_shutdown_available = FALSE;
		_g_error_free0 (_data_->err);
	}
	__finally11:
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->result = _data_->can_shutdown_available;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void lxsession_session_object_lxsession_shutdown (LxsessionSessionObject* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		LxsessionConsoleKitObject* _tmp0_ = NULL;
		_tmp0_ = self->dbus_interface;
		lxsession_console_kit_object_stop (_tmp0_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == DBUS_GERROR) {
				goto __catch12_dbus_gerror;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally12;
	__catch12_dbus_gerror:
	{
		GError* err = NULL;
		GError* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = err;
		_tmp2_ = _tmp1_->message;
		g_warning ("dbus-common.vala:59: %s", _tmp2_);
		_g_error_free0 (err);
	}
	__finally12:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void lxsession_session_object_lxsession_restart (LxsessionSessionObject* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		LxsessionConsoleKitObject* _tmp0_ = NULL;
		_tmp0_ = self->dbus_interface;
		lxsession_console_kit_object_restart (_tmp0_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == DBUS_GERROR) {
				goto __catch13_dbus_gerror;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally13;
	__catch13_dbus_gerror:
	{
		GError* err = NULL;
		GError* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = err;
		_tmp2_ = _tmp1_->message;
		g_warning ("dbus-common.vala:68: %s", _tmp2_);
		_g_error_free0 (err);
	}
	__finally13:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void lxsession_session_object_class_init (LxsessionSessionObjectClass * klass) {
	lxsession_session_object_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = lxsession_session_object_finalize;
}


static void lxsession_session_object_instance_init (LxsessionSessionObject * self) {
}


static void lxsession_session_object_finalize (GObject* obj) {
	LxsessionSessionObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_SESSION_OBJECT, LxsessionSessionObject);
	_g_object_unref0 (self->dbus_interface);
	G_OBJECT_CLASS (lxsession_session_object_parent_class)->finalize (obj);
}


GType lxsession_session_object_get_type (void) {
	static volatile gsize lxsession_session_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_session_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionSessionObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_session_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionSessionObject), 0, (GInstanceInitFunc) lxsession_session_object_instance_init, NULL };
		GType lxsession_session_object_type_id;
		lxsession_session_object_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionSessionObject", &g_define_type_info, 0);
		g_once_init_leave (&lxsession_session_object_type_id__volatile, lxsession_session_object_type_id);
	}
	return lxsession_session_object_type_id__volatile;
}


void lxsession_console_kit_object_restart (LxsessionConsoleKitObject* self, GError** error) {
	g_return_if_fail (self != NULL);
	LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->restart (self, error);
}


void lxsession_console_kit_object_stop (LxsessionConsoleKitObject* self, GError** error) {
	g_return_if_fail (self != NULL);
	LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->stop (self, error);
}


void lxsession_console_kit_object_can_restart (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->can_restart (self, _callback_, _user_data_);
}


gboolean lxsession_console_kit_object_can_restart_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error) {
	return LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->can_restart_finish (self, _res_, error);
}


void lxsession_console_kit_object_can_stop (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->can_stop (self, _callback_, _user_data_);
}


gboolean lxsession_console_kit_object_can_stop_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error) {
	return LXSESSION_CONSOLE_KIT_OBJECT_GET_INTERFACE (self)->can_stop_finish (self, _res_, error);
}


static void lxsession_console_kit_object_base_init (LxsessionConsoleKitObjectIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


GType lxsession_console_kit_object_get_type (void) {
	static volatile gsize lxsession_console_kit_object_type_id__volatile = 0;
	if (g_once_init_enter (&lxsession_console_kit_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LxsessionConsoleKitObjectIface), (GBaseInitFunc) lxsession_console_kit_object_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType lxsession_console_kit_object_type_id;
		lxsession_console_kit_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "LxsessionConsoleKitObject", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (lxsession_console_kit_object_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (lxsession_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) lxsession_console_kit_object_proxy_get_type);
		g_type_set_qdata (lxsession_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.ConsoleKit.Manager");
		g_type_set_qdata (lxsession_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_lxsession_console_kit_object_dbus_interface_info));
		g_type_set_qdata (lxsession_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) lxsession_console_kit_object_register_object);
		g_once_init_leave (&lxsession_console_kit_object_type_id__volatile, lxsession_console_kit_object_type_id);
	}
	return lxsession_console_kit_object_type_id__volatile;
}


G_DEFINE_TYPE_EXTENDED (LxsessionConsoleKitObjectProxy, lxsession_console_kit_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (LXSESSION_TYPE_CONSOLE_KIT_OBJECT, lxsession_console_kit_object_proxy_lxsession_console_kit_object_interface_init) )
static void lxsession_console_kit_object_proxy_class_init (LxsessionConsoleKitObjectProxyClass* klass) {
	G_DBUS_PROXY_CLASS (klass)->g_signal = lxsession_console_kit_object_proxy_g_signal;
}


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


static void lxsession_console_kit_object_proxy_init (LxsessionConsoleKitObjectProxy* self) {
}


static void lxsession_console_kit_object_proxy_restart (LxsessionConsoleKitObject* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	DBUS_GERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Restart");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void lxsession_console_kit_object_proxy_stop (LxsessionConsoleKitObject* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	DBUS_GERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Stop");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data) {
	g_simple_async_result_set_op_res_gpointer (user_data, g_object_ref (res), g_object_unref);
	g_simple_async_result_complete (user_data);
	g_object_unref (user_data);
}


static void lxsession_console_kit_object_proxy_can_restart_async (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	DBUS_GERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanRestart");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static gboolean lxsession_console_kit_object_proxy_can_restart_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result;
	GVariant* _tmp0_;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	if (!_reply_message) {
		return FALSE;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return FALSE;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp0_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp0_);
	g_variant_unref (_tmp0_);
	g_object_unref (_reply_message);
	return _result;
}


static void lxsession_console_kit_object_proxy_can_stop_async (LxsessionConsoleKitObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	DBUS_GERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanStop");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static gboolean lxsession_console_kit_object_proxy_can_stop_finish (LxsessionConsoleKitObject* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result;
	GVariant* _tmp1_;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	if (!_reply_message) {
		return FALSE;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return FALSE;
	}
	_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_get_boolean (_tmp1_);
	g_variant_unref (_tmp1_);
	g_object_unref (_reply_message);
	return _result;
}


static void lxsession_console_kit_object_proxy_lxsession_console_kit_object_interface_init (LxsessionConsoleKitObjectIface* iface) {
	iface->restart = lxsession_console_kit_object_proxy_restart;
	iface->stop = lxsession_console_kit_object_proxy_stop;
	iface->can_restart = lxsession_console_kit_object_proxy_can_restart_async;
	iface->can_restart_finish = lxsession_console_kit_object_proxy_can_restart_finish;
	iface->can_stop = lxsession_console_kit_object_proxy_can_stop_async;
	iface->can_stop_finish = lxsession_console_kit_object_proxy_can_stop_finish;
}


static void _dbus_lxsession_console_kit_object_restart (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_console_kit_object_restart (self, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void _dbus_lxsession_console_kit_object_stop (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_console_kit_object_stop (self, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void _dbus_lxsession_console_kit_object_can_restart (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_console_kit_object_can_restart (self, (GAsyncReadyCallback) _dbus_lxsession_console_kit_object_can_restart_ready, invocation);
}


static void _dbus_lxsession_console_kit_object_can_restart_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	invocation = _user_data_;
	result = lxsession_console_kit_object_can_restart_finish ((LxsessionConsoleKitObject*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (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);
}


static void _dbus_lxsession_console_kit_object_can_stop (LxsessionConsoleKitObject* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_console_kit_object_can_stop (self, (GAsyncReadyCallback) _dbus_lxsession_console_kit_object_can_stop_ready, invocation);
}


static void _dbus_lxsession_console_kit_object_can_stop_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	invocation = _user_data_;
	result = lxsession_console_kit_object_can_stop_finish ((LxsessionConsoleKitObject*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (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);
}


static void lxsession_console_kit_object_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, "Restart") == 0) {
		_dbus_lxsession_console_kit_object_restart (object, parameters, invocation);
	} else if (strcmp (method_name, "Stop") == 0) {
		_dbus_lxsession_console_kit_object_stop (object, parameters, invocation);
	} else if (strcmp (method_name, "CanRestart") == 0) {
		_dbus_lxsession_console_kit_object_can_restart (object, parameters, invocation);
	} else if (strcmp (method_name, "CanStop") == 0) {
		_dbus_lxsession_console_kit_object_can_stop (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}


static GVariant* lxsession_console_kit_object_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];
	return NULL;
}


static gboolean lxsession_console_kit_object_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];
	return FALSE;
}


guint lxsession_console_kit_object_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 *) (&_lxsession_console_kit_object_dbus_interface_info), &_lxsession_console_kit_object_dbus_interface_vtable, data, _lxsession_console_kit_object_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}


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


void lxsession_on_bus_aquired (GDBusConnection* conn) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (conn != NULL);
	{
		GDBusConnection* _tmp0_ = NULL;
		LxsessionLxdeSessionServer* _tmp1_ = NULL;
		LxsessionLxdeSessionServer* _tmp2_ = NULL;
		_tmp0_ = conn;
		_tmp1_ = lxsession_lxde_session_server_new ();
		_tmp2_ = _tmp1_;
		lxsession_lxde_session_server_register_object (_tmp2_, _tmp0_, "/org/lxde/SessionManager", &_inner_error_);
		_g_object_unref0 (_tmp2_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch14_g_io_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally14;
	__catch14_g_io_error:
	{
		GError* e = NULL;
		FILE* _tmp3_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = stderr;
		fprintf (_tmp3_, "Could not register service\n");
		_g_error_free0 (e);
	}
	__finally14:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void lxsession_on_gnome_bus_aquired (GDBusConnection* conn) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (conn != NULL);
	{
		GDBusConnection* _tmp0_ = NULL;
		LxsessionGnomeSessionServer* _tmp1_ = NULL;
		LxsessionGnomeSessionServer* _tmp2_ = NULL;
		_tmp0_ = conn;
		_tmp1_ = lxsession_gnome_session_server_new ();
		_tmp2_ = _tmp1_;
		lxsession_gnome_session_server_register_object (_tmp2_, _tmp0_, "/org/gnome/SessionManager", &_inner_error_);
		_g_object_unref0 (_tmp2_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch15_g_io_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally15;
	__catch15_g_io_error:
	{
		GError* e = NULL;
		FILE* _tmp3_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = stderr;
		fprintf (_tmp3_, "Could not register service\n");
		_g_error_free0 (e);
	}
	__finally15:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}



