/* dbus-gnome-session.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from dbus-gnome-session.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.
 */
/* http://live.gnome.org/Vala/DBusServerSample#Using_GDBus */

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <stdio.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#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;
typedef struct _LxsessionGnomeSessionServerPrivate LxsessionGnomeSessionServerPrivate;
enum  {
	LXSESSION_GNOME_SESSION_SERVER_0_PROPERTY,
	LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY,
	LXSESSION_GNOME_SESSION_SERVER_NUM_PROPERTIES
};
static GParamSpec* lxsession_gnome_session_server_properties[LXSESSION_GNOME_SESSION_SERVER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _lxsession_gnome_session_server_RegisterClientData lxsession_gnome_session_server_RegisterClientData;
typedef struct _lxsession_gnome_session_server_UnregisterClientData lxsession_gnome_session_server_UnregisterClientData;

#define LXSESSION_TYPE_CONTROL_OBJECT (lxsession_control_object_get_type ())
#define LXSESSION_CONTROL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_CONTROL_OBJECT, LxsessionControlObject))
#define LXSESSION_CONTROL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_CONTROL_OBJECT, LxsessionControlObjectClass))
#define LXSESSION_IS_CONTROL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_CONTROL_OBJECT))
#define LXSESSION_IS_CONTROL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_CONTROL_OBJECT))
#define LXSESSION_CONTROL_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_CONTROL_OBJECT, LxsessionControlObjectClass))

typedef struct _LxsessionControlObject LxsessionControlObject;
typedef struct _LxsessionControlObjectClass LxsessionControlObjectClass;
typedef struct _lxsession_gnome_session_server_InhibitData lxsession_gnome_session_server_InhibitData;
typedef struct _lxsession_gnome_session_server_UninhibitData lxsession_gnome_session_server_UninhibitData;

#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 _lxsession_gnome_session_server_CanShutdownData lxsession_gnome_session_server_CanShutdownData;
enum  {
	LXSESSION_GNOME_SESSION_SERVER_CLIENT_ADDED_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_CLIENT_REMOVED_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_INHIBITOR_ADDED_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_INHIBITOR_REMOVED_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_SESSION_RUNNING_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_SESSION_OVER_SIGNAL,
	LXSESSION_GNOME_SESSION_SERVER_NUM_SIGNALS
};
static guint lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_NUM_SIGNALS] = {0};
typedef struct _lxsession_gnome_session_server_RegisterClientReadyData lxsession_gnome_session_server_RegisterClientReadyData;
typedef struct _lxsession_gnome_session_server_UnregisterClientReadyData lxsession_gnome_session_server_UnregisterClientReadyData;
typedef struct _lxsession_gnome_session_server_InhibitReadyData lxsession_gnome_session_server_InhibitReadyData;
typedef struct _lxsession_gnome_session_server_UninhibitReadyData lxsession_gnome_session_server_UninhibitReadyData;
typedef struct _lxsession_gnome_session_server_CanShutdownReadyData lxsession_gnome_session_server_CanShutdownReadyData;

struct _LxsessionGnomeSessionServer {
	GObject parent_instance;
	LxsessionGnomeSessionServerPrivate * priv;
};

struct _LxsessionGnomeSessionServerClass {
	GObjectClass parent_class;
};

struct _LxsessionGnomeSessionServerPrivate {
	gchar* not_implemented;
	gint _something;
};

struct _lxsession_gnome_session_server_RegisterClientData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LxsessionGnomeSessionServer* self;
	gchar* app_id;
	gchar* client_startup_id;
	const gchar* _tmp0_;
};

struct _lxsession_gnome_session_server_UnregisterClientData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LxsessionGnomeSessionServer* self;
	const gchar* _tmp0_;
};

struct _lxsession_gnome_session_server_InhibitData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LxsessionGnomeSessionServer* self;
	gchar* app_id;
	guint toplevel_xid;
	gchar* reason;
	guint flags;
	guint inhibit_cookie;
	LxsessionControlObject* control;
	LxsessionControlObject* _tmp0_;
	LxsessionControlObject* _tmp1_;
	guint cookie;
};

struct _lxsession_gnome_session_server_UninhibitData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LxsessionGnomeSessionServer* self;
	guint inhibit_cookie;
	LxsessionControlObject* control;
	LxsessionControlObject* _tmp0_;
};

struct _lxsession_gnome_session_server_CanShutdownData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	LxsessionGnomeSessionServer* self;
	gboolean is_available;
	LxsessionSessionObject* session;
	LxsessionSessionObject* _tmp0_;
};

struct _lxsession_gnome_session_server_RegisterClientReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* app_id;
	gchar* client_startup_id;
};

struct _lxsession_gnome_session_server_UnregisterClientReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _lxsession_gnome_session_server_InhibitReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* app_id;
	guint toplevel_xid;
	gchar* reason;
	guint flags;
};

struct _lxsession_gnome_session_server_UninhibitReadyData {
	GDBusMethodInvocation* _invocation_;
	guint inhibit_cookie;
};

struct _lxsession_gnome_session_server_CanShutdownReadyData {
	GDBusMethodInvocation* _invocation_;
};

static gint LxsessionGnomeSessionServer_private_offset;
static gpointer lxsession_gnome_session_server_parent_class = NULL;

VALA_EXTERN GType lxsession_gnome_session_server_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionGnomeSessionServer, g_object_unref)
VALA_EXTERN guint lxsession_gnome_session_server_register_object (void* object,
                                                      GDBusConnection* connection,
                                                      const gchar* path,
                                                      GError** error);
VALA_EXTERN void lxsession_gnome_session_server_Setenv (LxsessionGnomeSessionServer* self,
                                            const gchar* value);
VALA_EXTERN void lxsession_gnome_session_server_InitializationError (LxsessionGnomeSessionServer* self,
                                                         const gchar* mess,
                                                         gboolean fatal);
static void lxsession_gnome_session_server_RegisterClient_data_free (gpointer _data);
VALA_EXTERN void lxsession_gnome_session_server_RegisterClient (LxsessionGnomeSessionServer* self,
                                                    const gchar* app_id,
                                                    const gchar* client_startup_id,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_RegisterClient_finish (LxsessionGnomeSessionServer* self,
                                                           GAsyncResult* _res_);
static gboolean lxsession_gnome_session_server_RegisterClient_co (lxsession_gnome_session_server_RegisterClientData* _data_);
static void lxsession_gnome_session_server_UnregisterClient_data_free (gpointer _data);
VALA_EXTERN void lxsession_gnome_session_server_UnregisterClient (LxsessionGnomeSessionServer* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_UnregisterClient_finish (LxsessionGnomeSessionServer* self,
                                                             GAsyncResult* _res_);
static gboolean lxsession_gnome_session_server_UnregisterClient_co (lxsession_gnome_session_server_UnregisterClientData* _data_);
static void lxsession_gnome_session_server_Inhibit_data_free (gpointer _data);
VALA_EXTERN void lxsession_gnome_session_server_Inhibit (LxsessionGnomeSessionServer* self,
                                             const gchar* app_id,
                                             guint toplevel_xid,
                                             const gchar* reason,
                                             guint flags,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_Inhibit_finish (LxsessionGnomeSessionServer* self,
                                                    GAsyncResult* _res_,
                                                    guint* inhibit_cookie);
static gboolean lxsession_gnome_session_server_Inhibit_co (lxsession_gnome_session_server_InhibitData* _data_);
VALA_EXTERN GType lxsession_control_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionControlObject, g_object_unref)
VALA_EXTERN LxsessionControlObject* lxsession_control_object_new (void);
VALA_EXTERN LxsessionControlObject* lxsession_control_object_construct (GType object_type);
VALA_EXTERN void lxsession_control_object_set_status_busy (LxsessionControlObject* self,
                                               guint toplevel_xid);
static void lxsession_gnome_session_server_Uninhibit_data_free (gpointer _data);
VALA_EXTERN void lxsession_gnome_session_server_Uninhibit (LxsessionGnomeSessionServer* self,
                                               guint inhibit_cookie,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_Uninhibit_finish (LxsessionGnomeSessionServer* self,
                                                      GAsyncResult* _res_);
static gboolean lxsession_gnome_session_server_Uninhibit_co (lxsession_gnome_session_server_UninhibitData* _data_);
VALA_EXTERN void lxsession_control_object_exit_status_busy (LxsessionControlObject* self);
VALA_EXTERN void lxsession_gnome_session_server_Shutdown (LxsessionGnomeSessionServer* self);
VALA_EXTERN GType lxsession_session_object_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LxsessionSessionObject, g_object_unref)
VALA_EXTERN LxsessionSessionObject* lxsession_session_object_new (void);
VALA_EXTERN LxsessionSessionObject* lxsession_session_object_construct (GType object_type);
VALA_EXTERN void lxsession_session_object_lxsession_shutdown (LxsessionSessionObject* self);
static void lxsession_gnome_session_server_CanShutdown_data_free (gpointer _data);
VALA_EXTERN void lxsession_gnome_session_server_CanShutdown (LxsessionGnomeSessionServer* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_CanShutdown_finish (LxsessionGnomeSessionServer* self,
                                                        GAsyncResult* _res_,
                                                        gboolean* is_available);
static gboolean lxsession_gnome_session_server_CanShutdown_co (lxsession_gnome_session_server_CanShutdownData* _data_);
VALA_EXTERN void lxsession_session_object_lxsession_can_shutdown (LxsessionSessionObject* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean lxsession_session_object_lxsession_can_shutdown_finish (LxsessionSessionObject* self,
                                                                 GAsyncResult* _res_);
static void lxsession_gnome_session_server_CanShutdown_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
VALA_EXTERN void lxsession_gnome_session_server_Logout (LxsessionGnomeSessionServer* self,
                                            guint mode);
VALA_EXTERN void lxsession_gnome_session_server_IsSessionRunning (LxsessionGnomeSessionServer* self,
                                                      gboolean* running);
VALA_EXTERN LxsessionGnomeSessionServer* lxsession_gnome_session_server_new (void);
VALA_EXTERN LxsessionGnomeSessionServer* lxsession_gnome_session_server_construct (GType object_type);
VALA_EXTERN gint lxsession_gnome_session_server_get_something (LxsessionGnomeSessionServer* self);
VALA_EXTERN void lxsession_gnome_session_server_set_something (LxsessionGnomeSessionServer* self,
                                                   gint value);
static void lxsession_gnome_session_server_finalize (GObject * obj);
static GType lxsession_gnome_session_server_get_type_once (void);
static void _vala_lxsession_gnome_session_server_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_lxsession_gnome_session_server_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
static void _dbus_lxsession_gnome_session_server_Setenv (LxsessionGnomeSessionServer* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_InitializationError (LxsessionGnomeSessionServer* self,
                                                               GVariant* _parameters_,
                                                               GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_RegisterClient (LxsessionGnomeSessionServer* self,
                                                          GVariant* _parameters_,
                                                          GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_RegisterClient_ready (GObject * source_object,
                                                                GAsyncResult * _res_,
                                                                gpointer _user_data_);
static void _dbus_lxsession_gnome_session_server_UnregisterClient (LxsessionGnomeSessionServer* self,
                                                            GVariant* _parameters_,
                                                            GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_UnregisterClient_ready (GObject * source_object,
                                                                  GAsyncResult * _res_,
                                                                  gpointer _user_data_);
static void _dbus_lxsession_gnome_session_server_Inhibit (LxsessionGnomeSessionServer* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_Inhibit_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_);
static void _dbus_lxsession_gnome_session_server_Uninhibit (LxsessionGnomeSessionServer* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_Uninhibit_ready (GObject * source_object,
                                                           GAsyncResult * _res_,
                                                           gpointer _user_data_);
static void _dbus_lxsession_gnome_session_server_Shutdown (LxsessionGnomeSessionServer* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_CanShutdown (LxsessionGnomeSessionServer* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_CanShutdown_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_);
static void _dbus_lxsession_gnome_session_server_Logout (LxsessionGnomeSessionServer* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation);
static void _dbus_lxsession_gnome_session_server_IsSessionRunning (LxsessionGnomeSessionServer* self,
                                                            GVariant* _parameters_,
                                                            GDBusMethodInvocation* invocation);
static void lxsession_gnome_session_server_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_gnome_session_server_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_lxsession_gnome_session_server_get_something (LxsessionGnomeSessionServer* self);
static gboolean lxsession_gnome_session_server_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_lxsession_gnome_session_server_set_something (LxsessionGnomeSessionServer* self,
                                                         GVariant* _value);
static void _dbus_lxsession_gnome_session_server_client_added (GObject* _sender,
                                                        gchar** path,
                                                        gpointer* _data);
static void _dbus_lxsession_gnome_session_server_client_removed (GObject* _sender,
                                                          gchar** path,
                                                          gpointer* _data);
static void _dbus_lxsession_gnome_session_server_inhibitor_added (GObject* _sender,
                                                           gchar** path,
                                                           gpointer* _data);
static void _dbus_lxsession_gnome_session_server_inhibitor_removed (GObject* _sender,
                                                             gchar** path,
                                                             gpointer* _data);
static void _dbus_lxsession_gnome_session_server_session_running (GObject* _sender,
                                                           gpointer* _data);
static void _dbus_lxsession_gnome_session_server_session_over (GObject* _sender,
                                                        gpointer* _data);
static void _lxsession_gnome_session_server_unregister_object (gpointer user_data);

static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Setenv_value = {-1, "value", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Setenv_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_Setenv_value, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Setenv_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_Setenv = {-1, "Setenv", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Setenv_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Setenv_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_InitializationError_mess = {-1, "mess", "s", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_InitializationError_fatal = {-1, "fatal", "b", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_InitializationError_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_InitializationError_mess, &_lxsession_gnome_session_server_dbus_arg_info_InitializationError_fatal, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_InitializationError_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_InitializationError = {-1, "InitializationError", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_InitializationError_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_InitializationError_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_RegisterClient_app_id = {-1, "app_id", "s", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_RegisterClient_client_startup_id = {-1, "client_startup_id", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_RegisterClient_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_RegisterClient_app_id, &_lxsession_gnome_session_server_dbus_arg_info_RegisterClient_client_startup_id, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_RegisterClient_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_RegisterClient = {-1, "RegisterClient", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_RegisterClient_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_RegisterClient_out), NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_UnregisterClient_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_UnregisterClient_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_UnregisterClient = {-1, "UnregisterClient", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_UnregisterClient_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_UnregisterClient_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Inhibit_app_id = {-1, "app_id", "s", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Inhibit_toplevel_xid = {-1, "toplevel_xid", "u", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Inhibit_reason = {-1, "reason", "s", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Inhibit_flags = {-1, "flags", "u", NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Inhibit_inhibit_cookie = {-1, "inhibit_cookie", "u", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Inhibit_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_Inhibit_app_id, &_lxsession_gnome_session_server_dbus_arg_info_Inhibit_toplevel_xid, &_lxsession_gnome_session_server_dbus_arg_info_Inhibit_reason, &_lxsession_gnome_session_server_dbus_arg_info_Inhibit_flags, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Inhibit_out[] = {&_lxsession_gnome_session_server_dbus_arg_info_Inhibit_inhibit_cookie, NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_Inhibit = {-1, "Inhibit", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Inhibit_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Inhibit_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Uninhibit_inhibit_cookie = {-1, "inhibit_cookie", "u", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Uninhibit_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_Uninhibit_inhibit_cookie, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Uninhibit_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_Uninhibit = {-1, "Uninhibit", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Uninhibit_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Uninhibit_out), NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Shutdown_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Shutdown_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_Shutdown = {-1, "Shutdown", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Shutdown_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Shutdown_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_CanShutdown_is_available = {-1, "is_available", "b", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_CanShutdown_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_CanShutdown_out[] = {&_lxsession_gnome_session_server_dbus_arg_info_CanShutdown_is_available, NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_CanShutdown = {-1, "CanShutdown", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_CanShutdown_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_CanShutdown_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_Logout_mode = {-1, "mode", "u", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Logout_in[] = {&_lxsession_gnome_session_server_dbus_arg_info_Logout_mode, NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_Logout_out[] = {NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_Logout = {-1, "Logout", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Logout_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_Logout_out), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_running = {-1, "running", "b", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_in[] = {NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_out[] = {&_lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_running, NULL};
static const GDBusMethodInfo _lxsession_gnome_session_server_dbus_method_info_IsSessionRunning = {-1, "IsSessionRunning", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_in), (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_IsSessionRunning_out), NULL};
static const GDBusMethodInfo * const _lxsession_gnome_session_server_dbus_method_info[] = {&_lxsession_gnome_session_server_dbus_method_info_Setenv, &_lxsession_gnome_session_server_dbus_method_info_InitializationError, &_lxsession_gnome_session_server_dbus_method_info_RegisterClient, &_lxsession_gnome_session_server_dbus_method_info_UnregisterClient, &_lxsession_gnome_session_server_dbus_method_info_Inhibit, &_lxsession_gnome_session_server_dbus_method_info_Uninhibit, &_lxsession_gnome_session_server_dbus_method_info_Shutdown, &_lxsession_gnome_session_server_dbus_method_info_CanShutdown, &_lxsession_gnome_session_server_dbus_method_info_Logout, &_lxsession_gnome_session_server_dbus_method_info_IsSessionRunning, NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_client_added_path = {-1, "path", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_client_added[] = {&_lxsession_gnome_session_server_dbus_arg_info_client_added_path, NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_client_added = {-1, "ClientAdded", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_client_added), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_client_removed_path = {-1, "path", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_client_removed[] = {&_lxsession_gnome_session_server_dbus_arg_info_client_removed_path, NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_client_removed = {-1, "ClientRemoved", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_client_removed), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_inhibitor_added_path = {-1, "path", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_inhibitor_added[] = {&_lxsession_gnome_session_server_dbus_arg_info_inhibitor_added_path, NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_inhibitor_added = {-1, "InhibitorAdded", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_inhibitor_added), NULL};
static const GDBusArgInfo _lxsession_gnome_session_server_dbus_arg_info_inhibitor_removed_path = {-1, "path", "s", NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_inhibitor_removed[] = {&_lxsession_gnome_session_server_dbus_arg_info_inhibitor_removed_path, NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_inhibitor_removed = {-1, "InhibitorRemoved", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_inhibitor_removed), NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_session_running[] = {NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_session_running = {-1, "SessionRunning", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_session_running), NULL};
static const GDBusArgInfo * const _lxsession_gnome_session_server_dbus_arg_info_session_over[] = {NULL};
static const GDBusSignalInfo _lxsession_gnome_session_server_dbus_signal_info_session_over = {-1, "SessionOver", (GDBusArgInfo **) (&_lxsession_gnome_session_server_dbus_arg_info_session_over), NULL};
static const GDBusSignalInfo * const _lxsession_gnome_session_server_dbus_signal_info[] = {&_lxsession_gnome_session_server_dbus_signal_info_client_added, &_lxsession_gnome_session_server_dbus_signal_info_client_removed, &_lxsession_gnome_session_server_dbus_signal_info_inhibitor_added, &_lxsession_gnome_session_server_dbus_signal_info_inhibitor_removed, &_lxsession_gnome_session_server_dbus_signal_info_session_running, &_lxsession_gnome_session_server_dbus_signal_info_session_over, NULL};
static const GDBusPropertyInfo _lxsession_gnome_session_server_dbus_property_info_something = {-1, "Something", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo * const _lxsession_gnome_session_server_dbus_property_info[] = {&_lxsession_gnome_session_server_dbus_property_info_something, NULL};
static const GDBusInterfaceInfo _lxsession_gnome_session_server_dbus_interface_info = {-1, "org.gnome.SessionManager", (GDBusMethodInfo **) (&_lxsession_gnome_session_server_dbus_method_info), (GDBusSignalInfo **) (&_lxsession_gnome_session_server_dbus_signal_info), (GDBusPropertyInfo **) (&_lxsession_gnome_session_server_dbus_property_info), NULL};
static const GDBusInterfaceVTable _lxsession_gnome_session_server_dbus_interface_vtable = {lxsession_gnome_session_server_dbus_interface_method_call, lxsession_gnome_session_server_dbus_interface_get_property, lxsession_gnome_session_server_dbus_interface_set_property};

static inline gpointer
lxsession_gnome_session_server_get_instance_private (LxsessionGnomeSessionServer* self)
{
	return G_STRUCT_MEMBER_P (self, LxsessionGnomeSessionServer_private_offset);
}

void
lxsession_gnome_session_server_Setenv (LxsessionGnomeSessionServer* self,
                                       const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->not_implemented;
	g_message ("dbus-gnome-session.vala:51: %s", _tmp0_);
}

void
lxsession_gnome_session_server_InitializationError (LxsessionGnomeSessionServer* self,
                                                    const gchar* mess,
                                                    gboolean fatal)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (mess != NULL);
	_tmp0_ = self->priv->not_implemented;
	g_message ("dbus-gnome-session.vala:62: %s", _tmp0_);
}

static void
lxsession_gnome_session_server_RegisterClient_data_free (gpointer _data)
{
	lxsession_gnome_session_server_RegisterClientData* _data_;
	_data_ = _data;
	_g_free0 (_data_->app_id);
	_g_free0 (_data_->client_startup_id);
	_g_object_unref0 (_data_->self);
	g_slice_free (lxsession_gnome_session_server_RegisterClientData, _data_);
}

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

void
lxsession_gnome_session_server_RegisterClient (LxsessionGnomeSessionServer* self,
                                               const gchar* app_id,
                                               const gchar* client_startup_id,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	lxsession_gnome_session_server_RegisterClientData* _data_;
	LxsessionGnomeSessionServer* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (app_id != NULL);
	g_return_if_fail (client_startup_id != NULL);
	_data_ = g_slice_new0 (lxsession_gnome_session_server_RegisterClientData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, lxsession_gnome_session_server_RegisterClient_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (app_id);
	_g_free0 (_data_->app_id);
	_data_->app_id = _tmp1_;
	_tmp2_ = g_strdup (client_startup_id);
	_g_free0 (_data_->client_startup_id);
	_data_->client_startup_id = _tmp2_;
	lxsession_gnome_session_server_RegisterClient_co (_data_);
}

void
lxsession_gnome_session_server_RegisterClient_finish (LxsessionGnomeSessionServer* self,
                                                      GAsyncResult* _res_)
{
	lxsession_gnome_session_server_RegisterClientData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
lxsession_gnome_session_server_RegisterClient_co (lxsession_gnome_session_server_RegisterClientData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->not_implemented;
	g_message ("dbus-gnome-session.vala:76: %s", _data_->_tmp0_);
	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
lxsession_gnome_session_server_UnregisterClient_data_free (gpointer _data)
{
	lxsession_gnome_session_server_UnregisterClientData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (lxsession_gnome_session_server_UnregisterClientData, _data_);
}

void
lxsession_gnome_session_server_UnregisterClient (LxsessionGnomeSessionServer* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	lxsession_gnome_session_server_UnregisterClientData* _data_;
	LxsessionGnomeSessionServer* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (lxsession_gnome_session_server_UnregisterClientData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, lxsession_gnome_session_server_UnregisterClient_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	lxsession_gnome_session_server_UnregisterClient_co (_data_);
}

void
lxsession_gnome_session_server_UnregisterClient_finish (LxsessionGnomeSessionServer* self,
                                                        GAsyncResult* _res_)
{
	lxsession_gnome_session_server_UnregisterClientData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
lxsession_gnome_session_server_UnregisterClient_co (lxsession_gnome_session_server_UnregisterClientData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->not_implemented;
	g_message ("dbus-gnome-session.vala:86: %s", _data_->_tmp0_);
	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
lxsession_gnome_session_server_Inhibit_data_free (gpointer _data)
{
	lxsession_gnome_session_server_InhibitData* _data_;
	_data_ = _data;
	_g_free0 (_data_->app_id);
	_g_free0 (_data_->reason);
	_g_object_unref0 (_data_->self);
	g_slice_free (lxsession_gnome_session_server_InhibitData, _data_);
}

void
lxsession_gnome_session_server_Inhibit (LxsessionGnomeSessionServer* self,
                                        const gchar* app_id,
                                        guint toplevel_xid,
                                        const gchar* reason,
                                        guint flags,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	lxsession_gnome_session_server_InhibitData* _data_;
	LxsessionGnomeSessionServer* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (app_id != NULL);
	g_return_if_fail (reason != NULL);
	_data_ = g_slice_new0 (lxsession_gnome_session_server_InhibitData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, lxsession_gnome_session_server_Inhibit_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (app_id);
	_g_free0 (_data_->app_id);
	_data_->app_id = _tmp1_;
	_data_->toplevel_xid = toplevel_xid;
	_tmp2_ = g_strdup (reason);
	_g_free0 (_data_->reason);
	_data_->reason = _tmp2_;
	_data_->flags = flags;
	lxsession_gnome_session_server_Inhibit_co (_data_);
}

void
lxsession_gnome_session_server_Inhibit_finish (LxsessionGnomeSessionServer* self,
                                               GAsyncResult* _res_,
                                               guint* inhibit_cookie)
{
	lxsession_gnome_session_server_InhibitData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (inhibit_cookie) {
		*inhibit_cookie = _data_->inhibit_cookie;
	}
}

static gboolean
lxsession_gnome_session_server_Inhibit_co (lxsession_gnome_session_server_InhibitData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_message ("dbus-gnome-session.vala:111: Call Inhibit function");
	_data_->inhibit_cookie = (guint) 0;
	if (_data_->flags == ((guint) 8)) {
		_data_->_tmp0_ = lxsession_control_object_new ();
		_data_->control = _data_->_tmp0_;
		_data_->_tmp1_ = _data_->control;
		lxsession_control_object_set_status_busy (_data_->_tmp1_, _data_->toplevel_xid);
		_data_->cookie = (guint) g_random_int ();
		_data_->inhibit_cookie = _data_->cookie;
		_g_object_unref0 (_data_->control);
	}
	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
lxsession_gnome_session_server_Uninhibit_data_free (gpointer _data)
{
	lxsession_gnome_session_server_UninhibitData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (lxsession_gnome_session_server_UninhibitData, _data_);
}

void
lxsession_gnome_session_server_Uninhibit (LxsessionGnomeSessionServer* self,
                                          guint inhibit_cookie,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	lxsession_gnome_session_server_UninhibitData* _data_;
	LxsessionGnomeSessionServer* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (lxsession_gnome_session_server_UninhibitData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, lxsession_gnome_session_server_Uninhibit_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->inhibit_cookie = inhibit_cookie;
	lxsession_gnome_session_server_Uninhibit_co (_data_);
}

void
lxsession_gnome_session_server_Uninhibit_finish (LxsessionGnomeSessionServer* self,
                                                 GAsyncResult* _res_)
{
	lxsession_gnome_session_server_UninhibitData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
lxsession_gnome_session_server_Uninhibit_co (lxsession_gnome_session_server_UninhibitData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = lxsession_control_object_new ();
	_data_->control = _data_->_tmp0_;
	lxsession_control_object_exit_status_busy (_data_->control);
	_g_object_unref0 (_data_->control);
	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;
}

void
lxsession_gnome_session_server_Shutdown (LxsessionGnomeSessionServer* self)
{
	LxsessionSessionObject* session = NULL;
	LxsessionSessionObject* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = lxsession_session_object_new ();
	session = _tmp0_;
	lxsession_session_object_lxsession_shutdown (session);
	_g_object_unref0 (session);
}

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

void
lxsession_gnome_session_server_CanShutdown (LxsessionGnomeSessionServer* self,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	lxsession_gnome_session_server_CanShutdownData* _data_;
	LxsessionGnomeSessionServer* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (lxsession_gnome_session_server_CanShutdownData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, lxsession_gnome_session_server_CanShutdown_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	lxsession_gnome_session_server_CanShutdown_co (_data_);
}

void
lxsession_gnome_session_server_CanShutdown_finish (LxsessionGnomeSessionServer* self,
                                                   GAsyncResult* _res_,
                                                   gboolean* is_available)
{
	lxsession_gnome_session_server_CanShutdownData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (is_available) {
		*is_available = _data_->is_available;
	}
}

static void
lxsession_gnome_session_server_CanShutdown_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	lxsession_gnome_session_server_CanShutdownData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	lxsession_gnome_session_server_CanShutdown_co (_data_);
}

static gboolean
lxsession_gnome_session_server_CanShutdown_co (lxsession_gnome_session_server_CanShutdownData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = lxsession_session_object_new ();
	_data_->session = _data_->_tmp0_;
	_data_->_state_ = 1;
	lxsession_session_object_lxsession_can_shutdown (_data_->session, lxsession_gnome_session_server_CanShutdown_ready, _data_);
	return FALSE;
	_state_1:
	_data_->is_available = lxsession_session_object_lxsession_can_shutdown_finish (_data_->session, _data_->_res_);
	_g_object_unref0 (_data_->session);
	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;
}

void
lxsession_gnome_session_server_Logout (LxsessionGnomeSessionServer* self,
                                       guint mode)
{
	FILE* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = stdout;
	_tmp1_ = self->priv->not_implemented;
	fprintf (_tmp0_, "%s", _tmp1_);
}

void
lxsession_gnome_session_server_IsSessionRunning (LxsessionGnomeSessionServer* self,
                                                 gboolean* running)
{
	gboolean _vala_running = FALSE;
	g_return_if_fail (self != NULL);
	_vala_running = FALSE;
	if (running) {
		*running = _vala_running;
	}
}

LxsessionGnomeSessionServer*
lxsession_gnome_session_server_construct (GType object_type)
{
	LxsessionGnomeSessionServer * self = NULL;
	self = (LxsessionGnomeSessionServer*) g_object_new (object_type, NULL);
	return self;
}

LxsessionGnomeSessionServer*
lxsession_gnome_session_server_new (void)
{
	return lxsession_gnome_session_server_construct (LXSESSION_TYPE_GNOME_SESSION_SERVER);
}

gint
lxsession_gnome_session_server_get_something (LxsessionGnomeSessionServer* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_something;
	return result;
}

void
lxsession_gnome_session_server_set_something (LxsessionGnomeSessionServer* self,
                                              gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = lxsession_gnome_session_server_get_something (self);
	if (old_value != value) {
		self->priv->_something = value;
		g_object_notify_by_pspec ((GObject *) self, lxsession_gnome_session_server_properties[LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY]);
	}
}

static void
lxsession_gnome_session_server_class_init (LxsessionGnomeSessionServerClass * klass,
                                           gpointer klass_data)
{
	lxsession_gnome_session_server_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LxsessionGnomeSessionServer_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_lxsession_gnome_session_server_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_lxsession_gnome_session_server_set_property;
	G_OBJECT_CLASS (klass)->finalize = lxsession_gnome_session_server_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY, lxsession_gnome_session_server_properties[LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY] = g_param_spec_int ("something", "something", "something", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_CLIENT_ADDED_SIGNAL] = g_signal_new ("client-added", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_CLIENT_REMOVED_SIGNAL] = g_signal_new ("client-removed", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_INHIBITOR_ADDED_SIGNAL] = g_signal_new ("inhibitor-added", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_INHIBITOR_REMOVED_SIGNAL] = g_signal_new ("inhibitor-removed", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_SESSION_RUNNING_SIGNAL] = g_signal_new ("session-running", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	lxsession_gnome_session_server_signals[LXSESSION_GNOME_SESSION_SERVER_SESSION_OVER_SIGNAL] = g_signal_new ("session-over", LXSESSION_TYPE_GNOME_SESSION_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
lxsession_gnome_session_server_instance_init (LxsessionGnomeSessionServer * self,
                                              gpointer klass)
{
	gchar* _tmp0_;
	self->priv = lxsession_gnome_session_server_get_instance_private (self);
	_tmp0_ = g_strdup ("Error, lxsession doesn't implement this API");
	self->priv->not_implemented = _tmp0_;
}

static void
lxsession_gnome_session_server_finalize (GObject * obj)
{
	LxsessionGnomeSessionServer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServer);
	_g_free0 (self->priv->not_implemented);
	G_OBJECT_CLASS (lxsession_gnome_session_server_parent_class)->finalize (obj);
}

static GType
lxsession_gnome_session_server_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LxsessionGnomeSessionServerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_gnome_session_server_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionGnomeSessionServer), 0, (GInstanceInitFunc) lxsession_gnome_session_server_instance_init, NULL };
	GType lxsession_gnome_session_server_type_id;
	lxsession_gnome_session_server_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionGnomeSessionServer", &g_define_type_info, 0);
	g_type_set_qdata (lxsession_gnome_session_server_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) lxsession_gnome_session_server_register_object);
	LxsessionGnomeSessionServer_private_offset = g_type_add_instance_private (lxsession_gnome_session_server_type_id, sizeof (LxsessionGnomeSessionServerPrivate));
	return lxsession_gnome_session_server_type_id;
}

GType
lxsession_gnome_session_server_get_type (void)
{
	static volatile gsize lxsession_gnome_session_server_type_id__once = 0;
	if (g_once_init_enter (&lxsession_gnome_session_server_type_id__once)) {
		GType lxsession_gnome_session_server_type_id;
		lxsession_gnome_session_server_type_id = lxsession_gnome_session_server_get_type_once ();
		g_once_init_leave (&lxsession_gnome_session_server_type_id__once, lxsession_gnome_session_server_type_id);
	}
	return lxsession_gnome_session_server_type_id__once;
}

static void
_vala_lxsession_gnome_session_server_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	LxsessionGnomeSessionServer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServer);
	switch (property_id) {
		case LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY:
		g_value_set_int (value, lxsession_gnome_session_server_get_something (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_lxsession_gnome_session_server_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	LxsessionGnomeSessionServer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_GNOME_SESSION_SERVER, LxsessionGnomeSessionServer);
	switch (property_id) {
		case LXSESSION_GNOME_SESSION_SERVER_SOMETHING_PROPERTY:
		lxsession_gnome_session_server_set_something (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_dbus_lxsession_gnome_session_server_Setenv (LxsessionGnomeSessionServer* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* value = NULL;
	GVariant* _tmp6_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	value = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	lxsession_gnome_session_server_Setenv (self, value);
	_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);
	_g_free0 (value);
}

static void
_dbus_lxsession_gnome_session_server_InitializationError (LxsessionGnomeSessionServer* self,
                                                          GVariant* _parameters_,
                                                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* mess = NULL;
	GVariant* _tmp7_;
	gboolean fatal = FALSE;
	GVariant* _tmp8_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	mess = g_variant_dup_string (_tmp7_, NULL);
	g_variant_unref (_tmp7_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	fatal = g_variant_get_boolean (_tmp8_);
	g_variant_unref (_tmp8_);
	lxsession_gnome_session_server_InitializationError (self, mess, fatal);
	_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);
	_g_free0 (mess);
}

static void
_dbus_lxsession_gnome_session_server_RegisterClient (LxsessionGnomeSessionServer* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	lxsession_gnome_session_server_RegisterClientReadyData* _ready_data;
	GVariant* _tmp9_;
	GVariant* _tmp10_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (lxsession_gnome_session_server_RegisterClientReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_id = g_variant_dup_string (_tmp9_, NULL);
	g_variant_unref (_tmp9_);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->client_startup_id = g_variant_dup_string (_tmp10_, NULL);
	g_variant_unref (_tmp10_);
	lxsession_gnome_session_server_RegisterClient (self, _ready_data->app_id, _ready_data->client_startup_id, (GAsyncReadyCallback) _dbus_lxsession_gnome_session_server_RegisterClient_ready, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_RegisterClient_ready (GObject * source_object,
                                                           GAsyncResult * _res_,
                                                           gpointer _user_data_)
{
	lxsession_gnome_session_server_RegisterClientReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	lxsession_gnome_session_server_RegisterClient_finish ((LxsessionGnomeSessionServer*) source_object, _res_);
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->app_id);
	_g_free0 (_ready_data->client_startup_id);
	g_slice_free (lxsession_gnome_session_server_RegisterClientReadyData, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_UnregisterClient (LxsessionGnomeSessionServer* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	lxsession_gnome_session_server_UnregisterClientReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (lxsession_gnome_session_server_UnregisterClientReadyData);
	_ready_data->_invocation_ = invocation;
	lxsession_gnome_session_server_UnregisterClient (self, (GAsyncReadyCallback) _dbus_lxsession_gnome_session_server_UnregisterClient_ready, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_UnregisterClient_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_)
{
	lxsession_gnome_session_server_UnregisterClientReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	lxsession_gnome_session_server_UnregisterClient_finish ((LxsessionGnomeSessionServer*) source_object, _res_);
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	g_slice_free (lxsession_gnome_session_server_UnregisterClientReadyData, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Inhibit (LxsessionGnomeSessionServer* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	lxsession_gnome_session_server_InhibitReadyData* _ready_data;
	GVariant* _tmp11_;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	GVariant* _tmp14_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (lxsession_gnome_session_server_InhibitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->app_id = g_variant_dup_string (_tmp11_, NULL);
	g_variant_unref (_tmp11_);
	_tmp12_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->toplevel_xid = g_variant_get_uint32 (_tmp12_);
	g_variant_unref (_tmp12_);
	_tmp13_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->reason = g_variant_dup_string (_tmp13_, NULL);
	g_variant_unref (_tmp13_);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->flags = g_variant_get_uint32 (_tmp14_);
	g_variant_unref (_tmp14_);
	lxsession_gnome_session_server_Inhibit (self, _ready_data->app_id, _ready_data->toplevel_xid, _ready_data->reason, _ready_data->flags, (GAsyncReadyCallback) _dbus_lxsession_gnome_session_server_Inhibit_ready, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Inhibit_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_)
{
	lxsession_gnome_session_server_InhibitReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint inhibit_cookie = 0U;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	lxsession_gnome_session_server_Inhibit_finish ((LxsessionGnomeSessionServer*) source_object, _res_, &inhibit_cookie);
	_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_uint32 (inhibit_cookie));
	_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 (_ready_data->app_id);
	_g_free0 (_ready_data->reason);
	g_slice_free (lxsession_gnome_session_server_InhibitReadyData, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Uninhibit (LxsessionGnomeSessionServer* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	lxsession_gnome_session_server_UninhibitReadyData* _ready_data;
	GVariant* _tmp15_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (lxsession_gnome_session_server_UninhibitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->inhibit_cookie = g_variant_get_uint32 (_tmp15_);
	g_variant_unref (_tmp15_);
	lxsession_gnome_session_server_Uninhibit (self, _ready_data->inhibit_cookie, (GAsyncReadyCallback) _dbus_lxsession_gnome_session_server_Uninhibit_ready, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Uninhibit_ready (GObject * source_object,
                                                      GAsyncResult * _res_,
                                                      gpointer _user_data_)
{
	lxsession_gnome_session_server_UninhibitReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	lxsession_gnome_session_server_Uninhibit_finish ((LxsessionGnomeSessionServer*) source_object, _res_);
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	g_slice_free (lxsession_gnome_session_server_UninhibitReadyData, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Shutdown (LxsessionGnomeSessionServer* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_gnome_session_server_Shutdown (self);
	_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_gnome_session_server_CanShutdown (LxsessionGnomeSessionServer* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	lxsession_gnome_session_server_CanShutdownReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (lxsession_gnome_session_server_CanShutdownReadyData);
	_ready_data->_invocation_ = invocation;
	lxsession_gnome_session_server_CanShutdown (self, (GAsyncReadyCallback) _dbus_lxsession_gnome_session_server_CanShutdown_ready, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_CanShutdown_ready (GObject * source_object,
                                                        GAsyncResult * _res_,
                                                        gpointer _user_data_)
{
	lxsession_gnome_session_server_CanShutdownReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean is_available = FALSE;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	lxsession_gnome_session_server_CanShutdown_finish ((LxsessionGnomeSessionServer*) source_object, _res_, &is_available);
	_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 (is_available));
	_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_slice_free (lxsession_gnome_session_server_CanShutdownReadyData, _ready_data);
}

static void
_dbus_lxsession_gnome_session_server_Logout (LxsessionGnomeSessionServer* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint mode = 0U;
	GVariant* _tmp16_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	mode = g_variant_get_uint32 (_tmp16_);
	g_variant_unref (_tmp16_);
	lxsession_gnome_session_server_Logout (self, mode);
	_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_gnome_session_server_IsSessionRunning (LxsessionGnomeSessionServer* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean running = FALSE;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	lxsession_gnome_session_server_IsSessionRunning (self, &running);
	_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 (running));
	_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_gnome_session_server_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, "Setenv") == 0) {
		_dbus_lxsession_gnome_session_server_Setenv (object, parameters, invocation);
	} else if (strcmp (method_name, "InitializationError") == 0) {
		_dbus_lxsession_gnome_session_server_InitializationError (object, parameters, invocation);
	} else if (strcmp (method_name, "RegisterClient") == 0) {
		_dbus_lxsession_gnome_session_server_RegisterClient (object, parameters, invocation);
	} else if (strcmp (method_name, "UnregisterClient") == 0) {
		_dbus_lxsession_gnome_session_server_UnregisterClient (object, parameters, invocation);
	} else if (strcmp (method_name, "Inhibit") == 0) {
		_dbus_lxsession_gnome_session_server_Inhibit (object, parameters, invocation);
	} else if (strcmp (method_name, "Uninhibit") == 0) {
		_dbus_lxsession_gnome_session_server_Uninhibit (object, parameters, invocation);
	} else if (strcmp (method_name, "Shutdown") == 0) {
		_dbus_lxsession_gnome_session_server_Shutdown (object, parameters, invocation);
	} else if (strcmp (method_name, "CanShutdown") == 0) {
		_dbus_lxsession_gnome_session_server_CanShutdown (object, parameters, invocation);
	} else if (strcmp (method_name, "Logout") == 0) {
		_dbus_lxsession_gnome_session_server_Logout (object, parameters, invocation);
	} else if (strcmp (method_name, "IsSessionRunning") == 0) {
		_dbus_lxsession_gnome_session_server_IsSessionRunning (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_lxsession_gnome_session_server_get_something (LxsessionGnomeSessionServer* self)
{
	gint result;
	GVariant* _reply;
	result = lxsession_gnome_session_server_get_something (self);
	_reply = g_variant_new_int32 (result);
	return _reply;
}

static GVariant*
lxsession_gnome_session_server_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, "Something") == 0) {
		return _dbus_lxsession_gnome_session_server_get_something (object);
	}
	return NULL;
}

static void
_dbus_lxsession_gnome_session_server_set_something (LxsessionGnomeSessionServer* self,
                                                    GVariant* _value)
{
	gint value = 0;
	value = g_variant_get_int32 (_value);
	lxsession_gnome_session_server_set_something (self, value);
}

static gboolean
lxsession_gnome_session_server_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, "Something") == 0) {
		_dbus_lxsession_gnome_session_server_set_something (object, value);
		return TRUE;
	}
	return FALSE;
}

static void
_dbus_lxsession_gnome_session_server_client_added (GObject* _sender,
                                                   gchar** path,
                                                   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_string (path));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "ClientAdded", _arguments, NULL);
}

static void
_dbus_lxsession_gnome_session_server_client_removed (GObject* _sender,
                                                     gchar** path,
                                                     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_string (path));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "ClientRemoved", _arguments, NULL);
}

static void
_dbus_lxsession_gnome_session_server_inhibitor_added (GObject* _sender,
                                                      gchar** path,
                                                      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_string (path));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "InhibitorAdded", _arguments, NULL);
}

static void
_dbus_lxsession_gnome_session_server_inhibitor_removed (GObject* _sender,
                                                        gchar** path,
                                                        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_string (path));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "InhibitorRemoved", _arguments, NULL);
}

static void
_dbus_lxsession_gnome_session_server_session_running (GObject* _sender,
                                                      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);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "SessionRunning", _arguments, NULL);
}

static void
_dbus_lxsession_gnome_session_server_session_over (GObject* _sender,
                                                   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);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager", "SessionOver", _arguments, NULL);
}

guint
lxsession_gnome_session_server_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_gnome_session_server_dbus_interface_info), &_lxsession_gnome_session_server_dbus_interface_vtable, data, _lxsession_gnome_session_server_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "client-added", (GCallback) _dbus_lxsession_gnome_session_server_client_added, data);
	g_signal_connect (object, "client-removed", (GCallback) _dbus_lxsession_gnome_session_server_client_removed, data);
	g_signal_connect (object, "inhibitor-added", (GCallback) _dbus_lxsession_gnome_session_server_inhibitor_added, data);
	g_signal_connect (object, "inhibitor-removed", (GCallback) _dbus_lxsession_gnome_session_server_inhibitor_removed, data);
	g_signal_connect (object, "session-running", (GCallback) _dbus_lxsession_gnome_session_server_session_running, data);
	g_signal_connect (object, "session-over", (GCallback) _dbus_lxsession_gnome_session_server_session_over, data);
	return result;
}

static void
_lxsession_gnome_session_server_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_client_added, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_client_removed, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_inhibitor_added, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_inhibitor_removed, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_session_running, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_lxsession_gnome_session_server_session_over, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

