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

/*
 * Copyright 2026 Ubuntu Budgie Developers
 *
 * 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.
 */

#include "slingshot.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <stdlib.h>
#include <glib-object.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

typedef GDBusProxy SlingshotBackendScreenlockProxy;
typedef GDBusProxyClass SlingshotBackendScreenlockProxyClass;
typedef struct _SlingshotBackendScreenlockLockReadyData SlingshotBackendScreenlockLockReadyData;
typedef GDBusProxy SlingshotBackendLogindInterfaceProxy;
typedef GDBusProxyClass SlingshotBackendLogindInterfaceProxyClass;
typedef GDBusProxy SlingshotBackendGnomeSessionManagerProxy;
typedef GDBusProxyClass SlingshotBackendGnomeSessionManagerProxyClass;
typedef struct _slingshot_backend_gnome_session_manager_LogoutReadyData slingshot_backend_gnome_session_manager_LogoutReadyData;
typedef struct _slingshot_backend_gnome_session_manager_RebootReadyData slingshot_backend_gnome_session_manager_RebootReadyData;
typedef struct _slingshot_backend_gnome_session_manager_ShutdownReadyData slingshot_backend_gnome_session_manager_ShutdownReadyData;
enum  {
	SLINGSHOT_BACKEND_SESSION_MANAGER_0_PROPERTY,
	SLINGSHOT_BACKEND_SESSION_MANAGER_NUM_PROPERTIES
};
static GParamSpec* slingshot_backend_session_manager_properties[SLINGSHOT_BACKEND_SESSION_MANAGER_NUM_PROPERTIES];
#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 _SlingshotBackendSessionManagerSetupDbusData SlingshotBackendSessionManagerSetupDbusData;

struct _SlingshotBackendScreenlockLockReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _slingshot_backend_gnome_session_manager_LogoutReadyData {
	GDBusMethodInvocation* _invocation_;
	guint mode;
};

struct _slingshot_backend_gnome_session_manager_RebootReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _slingshot_backend_gnome_session_manager_ShutdownReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SlingshotBackendSessionManagerPrivate {
	SlingshotBackendScreenlock* saver;
	SlingshotBackendGnomeSessionManager* session;
	SlingshotBackendLogindInterface* logind_interface;
};

struct _SlingshotBackendSessionManagerSetupDbusData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SlingshotBackendSessionManager* self;
	SlingshotBackendScreenlock* _tmp0_;
	SlingshotBackendScreenlock* _tmp1_;
	SlingshotBackendScreenlock* _tmp2_;
	GError* e;
	GError* _tmp3_;
	const gchar* _tmp4_;
	SlingshotBackendGnomeSessionManager* _tmp5_;
	SlingshotBackendGnomeSessionManager* _tmp6_;
	SlingshotBackendGnomeSessionManager* _tmp7_;
	GError* _vala1_e;
	GError* _tmp8_;
	const gchar* _tmp9_;
	SlingshotBackendLogindInterface* _tmp10_;
	SlingshotBackendLogindInterface* _tmp11_;
	SlingshotBackendLogindInterface* _tmp12_;
	GError* _vala2_e;
	GError* _tmp13_;
	const gchar* _tmp14_;
	GError* _inner_error0_;
};

static GType slingshot_backend_screenlock_type_id = 0;
static GType slingshot_backend_logind_interface_type_id = 0;
static GType slingshot_backend_gnome_session_manager_type_id = 0;
static gint SlingshotBackendSessionManager_private_offset;
static gpointer slingshot_backend_session_manager_parent_class = NULL;
static SlingshotBackendSessionManager* slingshot_backend_session_manager_instance;
static SlingshotBackendSessionManager* slingshot_backend_session_manager_instance = NULL;
static GType slingshot_backend_session_manager_type_id = 0;

static void slingshot_backend_screenlock_proxy_g_signal (GDBusProxy* proxy,
                                                  const gchar* sender_name,
                                                  const gchar* signal_name,
                                                  GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void slingshot_backend_screenlock_proxy_lock_async (SlingshotBackendScreenlock* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void slingshot_backend_screenlock_proxy_lock_finish (SlingshotBackendScreenlock* self,
                                                     GAsyncResult* _res_,
                                                     GError** error);
static void slingshot_backend_screenlock_proxy_slingshot_backend_screenlock_interface_init (SlingshotBackendScreenlockIface* iface);
static void _dbus_slingshot_backend_screenlock_lock (SlingshotBackendScreenlock* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_slingshot_backend_screenlock_lock_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_);
static void slingshot_backend_screenlock_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* slingshot_backend_screenlock_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 slingshot_backend_screenlock_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 _slingshot_backend_screenlock_unregister_object (gpointer user_data);
static void slingshot_backend_logind_interface_proxy_g_signal (GDBusProxy* proxy,
                                                        const gchar* sender_name,
                                                        const gchar* signal_name,
                                                        GVariant* parameters);
static void slingshot_backend_logind_interface_proxy_suspend (SlingshotBackendLogindInterface* self,
                                                       gboolean interactive,
                                                       GError** error);
static void slingshot_backend_logind_interface_proxy_hibernate (SlingshotBackendLogindInterface* self,
                                                         gboolean interactive,
                                                         GError** error);
static void slingshot_backend_logind_interface_proxy_slingshot_backend_logind_interface_interface_init (SlingshotBackendLogindInterfaceIface* iface);
static void _dbus_slingshot_backend_logind_interface_suspend (SlingshotBackendLogindInterface* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_slingshot_backend_logind_interface_hibernate (SlingshotBackendLogindInterface* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation);
static void slingshot_backend_logind_interface_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* slingshot_backend_logind_interface_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 slingshot_backend_logind_interface_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 _slingshot_backend_logind_interface_unregister_object (gpointer user_data);
static void slingshot_backend_gnome_session_manager_proxy_g_signal (GDBusProxy* proxy,
                                                             const gchar* sender_name,
                                                             const gchar* signal_name,
                                                             GVariant* parameters);
static void slingshot_backend_gnome_session_manager_proxy_Logout_async (SlingshotBackendGnomeSessionManager* self,
                                                                 guint mode,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static void slingshot_backend_gnome_session_manager_proxy_Logout_finish (SlingshotBackendGnomeSessionManager* self,
                                                                  GAsyncResult* _res_,
                                                                  GError** error);
static void slingshot_backend_gnome_session_manager_proxy_Reboot_async (SlingshotBackendGnomeSessionManager* self,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static void slingshot_backend_gnome_session_manager_proxy_Reboot_finish (SlingshotBackendGnomeSessionManager* self,
                                                                  GAsyncResult* _res_,
                                                                  GError** error);
static void slingshot_backend_gnome_session_manager_proxy_Shutdown_async (SlingshotBackendGnomeSessionManager* self,
                                                                   GAsyncReadyCallback _callback_,
                                                                   gpointer _user_data_);
static void slingshot_backend_gnome_session_manager_proxy_Shutdown_finish (SlingshotBackendGnomeSessionManager* self,
                                                                    GAsyncResult* _res_,
                                                                    GError** error);
static void slingshot_backend_gnome_session_manager_proxy_slingshot_backend_gnome_session_manager_interface_init (SlingshotBackendGnomeSessionManagerIface* iface);
static void _dbus_slingshot_backend_gnome_session_manager_Logout (SlingshotBackendGnomeSessionManager* self,
                                                           GVariant* _parameters_,
                                                           GDBusMethodInvocation* invocation);
static void _dbus_slingshot_backend_gnome_session_manager_Logout_ready (GObject * source_object,
                                                                 GAsyncResult * _res_,
                                                                 gpointer _user_data_);
static void _dbus_slingshot_backend_gnome_session_manager_Reboot (SlingshotBackendGnomeSessionManager* self,
                                                           GVariant* _parameters_,
                                                           GDBusMethodInvocation* invocation);
static void _dbus_slingshot_backend_gnome_session_manager_Reboot_ready (GObject * source_object,
                                                                 GAsyncResult * _res_,
                                                                 gpointer _user_data_);
static void _dbus_slingshot_backend_gnome_session_manager_Shutdown (SlingshotBackendGnomeSessionManager* self,
                                                             GVariant* _parameters_,
                                                             GDBusMethodInvocation* invocation);
static void _dbus_slingshot_backend_gnome_session_manager_Shutdown_ready (GObject * source_object,
                                                                   GAsyncResult * _res_,
                                                                   gpointer _user_data_);
static void slingshot_backend_gnome_session_manager_dbus_interface_method_call (GDBusConnection* connection,
                                                                         const gchar* sender,
                                                                         const gchar* object_path,
                                                                         const gchar* interface_name,
                                                                         const gchar* method_name,
                                                                         GVariant* parameters,
                                                                         GDBusMethodInvocation* invocation,
                                                                         gpointer user_data);
static GVariant* slingshot_backend_gnome_session_manager_dbus_interface_get_property (GDBusConnection* connection,
                                                                               const gchar* sender,
                                                                               const gchar* object_path,
                                                                               const gchar* interface_name,
                                                                               const gchar* property_name,
                                                                               GError** error,
                                                                               gpointer user_data);
static gboolean slingshot_backend_gnome_session_manager_dbus_interface_set_property (GDBusConnection* connection,
                                                                              const gchar* sender,
                                                                              const gchar* object_path,
                                                                              const gchar* interface_name,
                                                                              const gchar* property_name,
                                                                              GVariant* value,
                                                                              GError** error,
                                                                              gpointer user_data);
static void _slingshot_backend_gnome_session_manager_unregister_object (gpointer user_data);
static void slingshot_backend_session_manager_setup_dbus_data_free (gpointer _data);
static void slingshot_backend_session_manager_setup_dbus (SlingshotBackendSessionManager* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static void slingshot_backend_session_manager_setup_dbus_finish (SlingshotBackendSessionManager* self,
                                                          GAsyncResult* _res_);
static gboolean slingshot_backend_session_manager_setup_dbus_co (SlingshotBackendSessionManagerSetupDbusData* _data_);
static void slingshot_backend_session_manager_setup_dbus_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static gboolean __lambda23_ (SlingshotBackendSessionManager* self);
static gboolean ___lambda23__gsource_func (gpointer self);
static gboolean __lambda24_ (SlingshotBackendSessionManager* self);
static gboolean ___lambda24__gsource_func (gpointer self);
static gboolean __lambda25_ (SlingshotBackendSessionManager* self);
static gboolean __lambda26_ (SlingshotBackendSessionManager* self);
static gboolean ___lambda26__gsource_func (gpointer self);
static gboolean ___lambda25__gsource_func (gpointer self);
static gboolean __lambda27_ (SlingshotBackendSessionManager* self);
static gboolean ___lambda27__gsource_func (gpointer self);
static gboolean __lambda28_ (SlingshotBackendSessionManager* self);
static gboolean ___lambda28__gsource_func (gpointer self);
static GObject * slingshot_backend_session_manager_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void slingshot_backend_session_manager_finalize (GObject * obj);

static const GDBusArgInfo * const _slingshot_backend_screenlock_dbus_arg_info_lock_in[] = {NULL};
static const GDBusArgInfo * const _slingshot_backend_screenlock_dbus_arg_info_lock_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_screenlock_dbus_method_info_lock = {-1, "Lock", (GDBusArgInfo **) (&_slingshot_backend_screenlock_dbus_arg_info_lock_in), (GDBusArgInfo **) (&_slingshot_backend_screenlock_dbus_arg_info_lock_out), NULL};
static const GDBusMethodInfo * const _slingshot_backend_screenlock_dbus_method_info[] = {&_slingshot_backend_screenlock_dbus_method_info_lock, NULL};
static const GDBusSignalInfo * const _slingshot_backend_screenlock_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _slingshot_backend_screenlock_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _slingshot_backend_screenlock_dbus_interface_info = {-1, "org.buddiesofbudgie.BudgieScreenlock", (GDBusMethodInfo **) (&_slingshot_backend_screenlock_dbus_method_info), (GDBusSignalInfo **) (&_slingshot_backend_screenlock_dbus_signal_info), (GDBusPropertyInfo **) (&_slingshot_backend_screenlock_dbus_property_info), NULL};
static const GDBusInterfaceVTable _slingshot_backend_screenlock_dbus_interface_vtable = {slingshot_backend_screenlock_dbus_interface_method_call, slingshot_backend_screenlock_dbus_interface_get_property, slingshot_backend_screenlock_dbus_interface_set_property};
static const GDBusArgInfo _slingshot_backend_logind_interface_dbus_arg_info_suspend_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _slingshot_backend_logind_interface_dbus_arg_info_suspend_in[] = {&_slingshot_backend_logind_interface_dbus_arg_info_suspend_interactive, NULL};
static const GDBusArgInfo * const _slingshot_backend_logind_interface_dbus_arg_info_suspend_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_logind_interface_dbus_method_info_suspend = {-1, "Suspend", (GDBusArgInfo **) (&_slingshot_backend_logind_interface_dbus_arg_info_suspend_in), (GDBusArgInfo **) (&_slingshot_backend_logind_interface_dbus_arg_info_suspend_out), NULL};
static const GDBusArgInfo _slingshot_backend_logind_interface_dbus_arg_info_hibernate_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _slingshot_backend_logind_interface_dbus_arg_info_hibernate_in[] = {&_slingshot_backend_logind_interface_dbus_arg_info_hibernate_interactive, NULL};
static const GDBusArgInfo * const _slingshot_backend_logind_interface_dbus_arg_info_hibernate_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_logind_interface_dbus_method_info_hibernate = {-1, "Hibernate", (GDBusArgInfo **) (&_slingshot_backend_logind_interface_dbus_arg_info_hibernate_in), (GDBusArgInfo **) (&_slingshot_backend_logind_interface_dbus_arg_info_hibernate_out), NULL};
static const GDBusMethodInfo * const _slingshot_backend_logind_interface_dbus_method_info[] = {&_slingshot_backend_logind_interface_dbus_method_info_suspend, &_slingshot_backend_logind_interface_dbus_method_info_hibernate, NULL};
static const GDBusSignalInfo * const _slingshot_backend_logind_interface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _slingshot_backend_logind_interface_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _slingshot_backend_logind_interface_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_slingshot_backend_logind_interface_dbus_method_info), (GDBusSignalInfo **) (&_slingshot_backend_logind_interface_dbus_signal_info), (GDBusPropertyInfo **) (&_slingshot_backend_logind_interface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _slingshot_backend_logind_interface_dbus_interface_vtable = {slingshot_backend_logind_interface_dbus_interface_method_call, slingshot_backend_logind_interface_dbus_interface_get_property, slingshot_backend_logind_interface_dbus_interface_set_property};
static const GDBusArgInfo _slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_mode = {-1, "mode", "u", NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_in[] = {&_slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_mode, NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_gnome_session_manager_dbus_method_info_Logout = {-1, "Logout", (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_in), (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Logout_out), NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Reboot_in[] = {NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Reboot_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_gnome_session_manager_dbus_method_info_Reboot = {-1, "Reboot", (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Reboot_in), (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Reboot_out), NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Shutdown_in[] = {NULL};
static const GDBusArgInfo * const _slingshot_backend_gnome_session_manager_dbus_arg_info_Shutdown_out[] = {NULL};
static const GDBusMethodInfo _slingshot_backend_gnome_session_manager_dbus_method_info_Shutdown = {-1, "Shutdown", (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Shutdown_in), (GDBusArgInfo **) (&_slingshot_backend_gnome_session_manager_dbus_arg_info_Shutdown_out), NULL};
static const GDBusMethodInfo * const _slingshot_backend_gnome_session_manager_dbus_method_info[] = {&_slingshot_backend_gnome_session_manager_dbus_method_info_Logout, &_slingshot_backend_gnome_session_manager_dbus_method_info_Reboot, &_slingshot_backend_gnome_session_manager_dbus_method_info_Shutdown, NULL};
static const GDBusSignalInfo * const _slingshot_backend_gnome_session_manager_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _slingshot_backend_gnome_session_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _slingshot_backend_gnome_session_manager_dbus_interface_info = {-1, "org.gnome.SessionManager", (GDBusMethodInfo **) (&_slingshot_backend_gnome_session_manager_dbus_method_info), (GDBusSignalInfo **) (&_slingshot_backend_gnome_session_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_slingshot_backend_gnome_session_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _slingshot_backend_gnome_session_manager_dbus_interface_vtable = {slingshot_backend_gnome_session_manager_dbus_interface_method_call, slingshot_backend_gnome_session_manager_dbus_interface_get_property, slingshot_backend_gnome_session_manager_dbus_interface_set_property};

void
slingshot_backend_screenlock_lock (SlingshotBackendScreenlock* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	SlingshotBackendScreenlockIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_SCREENLOCK_GET_INTERFACE (self);
	if (_iface_->lock) {
		_iface_->lock (self, _callback_, _user_data_);
	}
}

void
slingshot_backend_screenlock_lock_finish (SlingshotBackendScreenlock* self,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	SlingshotBackendScreenlockIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_SCREENLOCK_GET_INTERFACE (self);
	if (_iface_->lock_finish) {
		_iface_->lock_finish (self, _res_, error);
	}
}

static void
slingshot_backend_screenlock_default_init (SlingshotBackendScreenlockIface * iface,
                                           gpointer iface_data)
{
}

GType
slingshot_backend_screenlock_get_type (void)
{
	return slingshot_backend_screenlock_type_id;
}

GType
slingshot_backend_screenlock_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotBackendScreenlockIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_backend_screenlock_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	slingshot_backend_screenlock_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "SlingshotBackendScreenlock", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (slingshot_backend_screenlock_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (slingshot_backend_screenlock_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) slingshot_backend_screenlock_proxy_get_type);
	g_type_set_qdata (slingshot_backend_screenlock_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.buddiesofbudgie.BudgieScreenlock");
	g_type_set_qdata (slingshot_backend_screenlock_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_slingshot_backend_screenlock_dbus_interface_info));
	g_type_set_qdata (slingshot_backend_screenlock_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) slingshot_backend_screenlock_register_object);
	return slingshot_backend_screenlock_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (SlingshotBackendScreenlockProxy, slingshot_backend_screenlock_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (SLINGSHOT_BACKEND_TYPE_SCREENLOCK, slingshot_backend_screenlock_proxy_slingshot_backend_screenlock_interface_init) )
static void
slingshot_backend_screenlock_proxy_class_init (SlingshotBackendScreenlockProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = slingshot_backend_screenlock_proxy_g_signal;
}

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

static void
slingshot_backend_screenlock_proxy_class_finalize (SlingshotBackendScreenlockProxyClass* klass)
{
}

void
slingshot_backend_screenlock_proxy_register_dynamic_type (GTypeModule* module)
{
	slingshot_backend_screenlock_proxy_register_type (module);
}

static void
slingshot_backend_screenlock_proxy_init (SlingshotBackendScreenlockProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_slingshot_backend_screenlock_dbus_interface_info));
}

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

static void
slingshot_backend_screenlock_proxy_lock_async (SlingshotBackendScreenlock* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenlock", "Lock");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		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_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
slingshot_backend_screenlock_proxy_lock_finish (SlingshotBackendScreenlock* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
slingshot_backend_screenlock_proxy_slingshot_backend_screenlock_interface_init (SlingshotBackendScreenlockIface* iface)
{
	iface->lock = slingshot_backend_screenlock_proxy_lock_async;
	iface->lock_finish = slingshot_backend_screenlock_proxy_lock_finish;
}

static void
_dbus_slingshot_backend_screenlock_lock (SlingshotBackendScreenlock* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SlingshotBackendScreenlockLockReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (SlingshotBackendScreenlockLockReadyData);
	_ready_data->_invocation_ = invocation;
	slingshot_backend_screenlock_lock (self, (GAsyncReadyCallback) _dbus_slingshot_backend_screenlock_lock_ready, _ready_data);
}

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

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

static GVariant*
slingshot_backend_screenlock_dbus_interface_get_property (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* property_name,
                                                          GError** error,
                                                          gpointer user_data)
{
	return NULL;
}

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

guint
slingshot_backend_screenlock_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 *) (&_slingshot_backend_screenlock_dbus_interface_info), &_slingshot_backend_screenlock_dbus_interface_vtable, data, _slingshot_backend_screenlock_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_slingshot_backend_screenlock_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
slingshot_backend_logind_interface_suspend (SlingshotBackendLogindInterface* self,
                                            gboolean interactive,
                                            GError** error)
{
	SlingshotBackendLogindInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SLINGSHOT_BACKEND_LOGIND_INTERFACE_GET_INTERFACE (self);
	if (_iface_->suspend) {
		_iface_->suspend (self, interactive, error);
	}
}

void
slingshot_backend_logind_interface_hibernate (SlingshotBackendLogindInterface* self,
                                              gboolean interactive,
                                              GError** error)
{
	SlingshotBackendLogindInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SLINGSHOT_BACKEND_LOGIND_INTERFACE_GET_INTERFACE (self);
	if (_iface_->hibernate) {
		_iface_->hibernate (self, interactive, error);
	}
}

static void
slingshot_backend_logind_interface_default_init (SlingshotBackendLogindInterfaceIface * iface,
                                                 gpointer iface_data)
{
}

GType
slingshot_backend_logind_interface_get_type (void)
{
	return slingshot_backend_logind_interface_type_id;
}

GType
slingshot_backend_logind_interface_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotBackendLogindInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_backend_logind_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	slingshot_backend_logind_interface_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "SlingshotBackendLogindInterface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (slingshot_backend_logind_interface_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (slingshot_backend_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) slingshot_backend_logind_interface_proxy_get_type);
	g_type_set_qdata (slingshot_backend_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (slingshot_backend_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_slingshot_backend_logind_interface_dbus_interface_info));
	g_type_set_qdata (slingshot_backend_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) slingshot_backend_logind_interface_register_object);
	return slingshot_backend_logind_interface_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (SlingshotBackendLogindInterfaceProxy, slingshot_backend_logind_interface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (SLINGSHOT_BACKEND_TYPE_LOGIND_INTERFACE, slingshot_backend_logind_interface_proxy_slingshot_backend_logind_interface_interface_init) )
static void
slingshot_backend_logind_interface_proxy_class_init (SlingshotBackendLogindInterfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = slingshot_backend_logind_interface_proxy_g_signal;
}

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

static void
slingshot_backend_logind_interface_proxy_class_finalize (SlingshotBackendLogindInterfaceProxyClass* klass)
{
}

void
slingshot_backend_logind_interface_proxy_register_dynamic_type (GTypeModule* module)
{
	slingshot_backend_logind_interface_proxy_register_type (module);
}

static void
slingshot_backend_logind_interface_proxy_init (SlingshotBackendLogindInterfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_slingshot_backend_logind_interface_dbus_interface_info));
}

static void
slingshot_backend_logind_interface_proxy_suspend (SlingshotBackendLogindInterface* self,
                                                  gboolean interactive,
                                                  GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.login1.Manager", "Suspend");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
	_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
slingshot_backend_logind_interface_proxy_hibernate (SlingshotBackendLogindInterface* self,
                                                    gboolean interactive,
                                                    GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.login1.Manager", "Hibernate");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
	_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
slingshot_backend_logind_interface_proxy_slingshot_backend_logind_interface_interface_init (SlingshotBackendLogindInterfaceIface* iface)
{
	iface->suspend = slingshot_backend_logind_interface_proxy_suspend;
	iface->hibernate = slingshot_backend_logind_interface_proxy_hibernate;
}

static void
_dbus_slingshot_backend_logind_interface_suspend (SlingshotBackendLogindInterface* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp28_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp28_ = g_variant_iter_next_value (&_arguments_iter);
	interactive = g_variant_get_boolean (_tmp28_);
	g_variant_unref (_tmp28_);
	slingshot_backend_logind_interface_suspend (self, interactive, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_slingshot_backend_logind_interface_hibernate (SlingshotBackendLogindInterface* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp29_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp29_ = g_variant_iter_next_value (&_arguments_iter);
	interactive = g_variant_get_boolean (_tmp29_);
	g_variant_unref (_tmp29_);
	slingshot_backend_logind_interface_hibernate (self, interactive, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
slingshot_backend_logind_interface_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, "Suspend") == 0) {
		_dbus_slingshot_backend_logind_interface_suspend (object, parameters, invocation);
	} else if (strcmp (method_name, "Hibernate") == 0) {
		_dbus_slingshot_backend_logind_interface_hibernate (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
slingshot_backend_logind_interface_dbus_interface_get_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GError** error,
                                                                gpointer user_data)
{
	return NULL;
}

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

guint
slingshot_backend_logind_interface_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 *) (&_slingshot_backend_logind_interface_dbus_interface_info), &_slingshot_backend_logind_interface_dbus_interface_vtable, data, _slingshot_backend_logind_interface_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_slingshot_backend_logind_interface_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
slingshot_backend_gnome_session_manager_Logout (SlingshotBackendGnomeSessionManager* self,
                                                guint mode,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Logout) {
		_iface_->Logout (self, mode, _callback_, _user_data_);
	}
}

void
slingshot_backend_gnome_session_manager_Logout_finish (SlingshotBackendGnomeSessionManager* self,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Logout_finish) {
		_iface_->Logout_finish (self, _res_, error);
	}
}

void
slingshot_backend_gnome_session_manager_Reboot (SlingshotBackendGnomeSessionManager* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Reboot) {
		_iface_->Reboot (self, _callback_, _user_data_);
	}
}

void
slingshot_backend_gnome_session_manager_Reboot_finish (SlingshotBackendGnomeSessionManager* self,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Reboot_finish) {
		_iface_->Reboot_finish (self, _res_, error);
	}
}

void
slingshot_backend_gnome_session_manager_Shutdown (SlingshotBackendGnomeSessionManager* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Shutdown) {
		_iface_->Shutdown (self, _callback_, _user_data_);
	}
}

void
slingshot_backend_gnome_session_manager_Shutdown_finish (SlingshotBackendGnomeSessionManager* self,
                                                         GAsyncResult* _res_,
                                                         GError** error)
{
	SlingshotBackendGnomeSessionManagerIface* _iface_;
	_iface_ = SLINGSHOT_BACKEND_GNOME_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Shutdown_finish) {
		_iface_->Shutdown_finish (self, _res_, error);
	}
}

static void
slingshot_backend_gnome_session_manager_default_init (SlingshotBackendGnomeSessionManagerIface * iface,
                                                      gpointer iface_data)
{
}

GType
slingshot_backend_gnome_session_manager_get_type (void)
{
	return slingshot_backend_gnome_session_manager_type_id;
}

GType
slingshot_backend_gnome_session_manager_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotBackendGnomeSessionManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_backend_gnome_session_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	slingshot_backend_gnome_session_manager_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "SlingshotBackendGnomeSessionManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (slingshot_backend_gnome_session_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (slingshot_backend_gnome_session_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) slingshot_backend_gnome_session_manager_proxy_get_type);
	g_type_set_qdata (slingshot_backend_gnome_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.SessionManager");
	g_type_set_qdata (slingshot_backend_gnome_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_slingshot_backend_gnome_session_manager_dbus_interface_info));
	g_type_set_qdata (slingshot_backend_gnome_session_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) slingshot_backend_gnome_session_manager_register_object);
	return slingshot_backend_gnome_session_manager_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (SlingshotBackendGnomeSessionManagerProxy, slingshot_backend_gnome_session_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (SLINGSHOT_BACKEND_TYPE_GNOME_SESSION_MANAGER, slingshot_backend_gnome_session_manager_proxy_slingshot_backend_gnome_session_manager_interface_init) )
static void
slingshot_backend_gnome_session_manager_proxy_class_init (SlingshotBackendGnomeSessionManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = slingshot_backend_gnome_session_manager_proxy_g_signal;
}

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

static void
slingshot_backend_gnome_session_manager_proxy_class_finalize (SlingshotBackendGnomeSessionManagerProxyClass* klass)
{
}

void
slingshot_backend_gnome_session_manager_proxy_register_dynamic_type (GTypeModule* module)
{
	slingshot_backend_gnome_session_manager_proxy_register_type (module);
}

static void
slingshot_backend_gnome_session_manager_proxy_init (SlingshotBackendGnomeSessionManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_slingshot_backend_gnome_session_manager_dbus_interface_info));
}

static void
slingshot_backend_gnome_session_manager_proxy_Logout_async (SlingshotBackendGnomeSessionManager* self,
                                                            guint mode,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Logout");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (mode));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		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_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
slingshot_backend_gnome_session_manager_proxy_Logout_finish (SlingshotBackendGnomeSessionManager* self,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
slingshot_backend_gnome_session_manager_proxy_Reboot_async (SlingshotBackendGnomeSessionManager* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Reboot");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		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_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
slingshot_backend_gnome_session_manager_proxy_Reboot_finish (SlingshotBackendGnomeSessionManager* self,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
slingshot_backend_gnome_session_manager_proxy_Shutdown_async (SlingshotBackendGnomeSessionManager* self,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Shutdown");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		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_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
slingshot_backend_gnome_session_manager_proxy_Shutdown_finish (SlingshotBackendGnomeSessionManager* self,
                                                               GAsyncResult* _res_,
                                                               GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
slingshot_backend_gnome_session_manager_proxy_slingshot_backend_gnome_session_manager_interface_init (SlingshotBackendGnomeSessionManagerIface* iface)
{
	iface->Logout = slingshot_backend_gnome_session_manager_proxy_Logout_async;
	iface->Logout_finish = slingshot_backend_gnome_session_manager_proxy_Logout_finish;
	iface->Reboot = slingshot_backend_gnome_session_manager_proxy_Reboot_async;
	iface->Reboot_finish = slingshot_backend_gnome_session_manager_proxy_Reboot_finish;
	iface->Shutdown = slingshot_backend_gnome_session_manager_proxy_Shutdown_async;
	iface->Shutdown_finish = slingshot_backend_gnome_session_manager_proxy_Shutdown_finish;
}

static void
_dbus_slingshot_backend_gnome_session_manager_Logout (SlingshotBackendGnomeSessionManager* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	slingshot_backend_gnome_session_manager_LogoutReadyData* _ready_data;
	GVariant* _tmp30_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (slingshot_backend_gnome_session_manager_LogoutReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp30_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->mode = g_variant_get_uint32 (_tmp30_);
	g_variant_unref (_tmp30_);
	slingshot_backend_gnome_session_manager_Logout (self, _ready_data->mode, (GAsyncReadyCallback) _dbus_slingshot_backend_gnome_session_manager_Logout_ready, _ready_data);
}

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

static void
_dbus_slingshot_backend_gnome_session_manager_Reboot (SlingshotBackendGnomeSessionManager* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	slingshot_backend_gnome_session_manager_RebootReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (slingshot_backend_gnome_session_manager_RebootReadyData);
	_ready_data->_invocation_ = invocation;
	slingshot_backend_gnome_session_manager_Reboot (self, (GAsyncReadyCallback) _dbus_slingshot_backend_gnome_session_manager_Reboot_ready, _ready_data);
}

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

static void
_dbus_slingshot_backend_gnome_session_manager_Shutdown (SlingshotBackendGnomeSessionManager* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	slingshot_backend_gnome_session_manager_ShutdownReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (slingshot_backend_gnome_session_manager_ShutdownReadyData);
	_ready_data->_invocation_ = invocation;
	slingshot_backend_gnome_session_manager_Shutdown (self, (GAsyncReadyCallback) _dbus_slingshot_backend_gnome_session_manager_Shutdown_ready, _ready_data);
}

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

static void
slingshot_backend_gnome_session_manager_dbus_interface_method_call (GDBusConnection* connection,
                                                                    const gchar* sender,
                                                                    const gchar* object_path,
                                                                    const gchar* interface_name,
                                                                    const gchar* method_name,
                                                                    GVariant* parameters,
                                                                    GDBusMethodInvocation* invocation,
                                                                    gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Logout") == 0) {
		_dbus_slingshot_backend_gnome_session_manager_Logout (object, parameters, invocation);
	} else if (strcmp (method_name, "Reboot") == 0) {
		_dbus_slingshot_backend_gnome_session_manager_Reboot (object, parameters, invocation);
	} else if (strcmp (method_name, "Shutdown") == 0) {
		_dbus_slingshot_backend_gnome_session_manager_Shutdown (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
slingshot_backend_gnome_session_manager_dbus_interface_get_property (GDBusConnection* connection,
                                                                     const gchar* sender,
                                                                     const gchar* object_path,
                                                                     const gchar* interface_name,
                                                                     const gchar* property_name,
                                                                     GError** error,
                                                                     gpointer user_data)
{
	return NULL;
}

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

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

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

static inline gpointer
slingshot_backend_session_manager_get_instance_private (SlingshotBackendSessionManager* self)
{
	return G_STRUCT_MEMBER_P (self, SlingshotBackendSessionManager_private_offset);
}

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

SlingshotBackendSessionManager*
slingshot_backend_session_manager_get_default (void)
{
	SlingshotBackendSessionManager* _tmp0_;
	SlingshotBackendSessionManager* _tmp2_;
	SlingshotBackendSessionManager* _tmp3_;
	SlingshotBackendSessionManager* result;
	_tmp0_ = slingshot_backend_session_manager_instance;
	if (_tmp0_ == NULL) {
		SlingshotBackendSessionManager* _tmp1_;
		_tmp1_ = slingshot_backend_session_manager_new ();
		_g_object_unref0 (slingshot_backend_session_manager_instance);
		slingshot_backend_session_manager_instance = _tmp1_;
	}
	_tmp2_ = slingshot_backend_session_manager_instance;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

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

static void
slingshot_backend_session_manager_setup_dbus (SlingshotBackendSessionManager* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	SlingshotBackendSessionManagerSetupDbusData* _data_;
	SlingshotBackendSessionManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (SlingshotBackendSessionManagerSetupDbusData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, slingshot_backend_session_manager_setup_dbus_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	slingshot_backend_session_manager_setup_dbus_co (_data_);
}

static void
slingshot_backend_session_manager_setup_dbus_finish (SlingshotBackendSessionManager* self,
                                                     GAsyncResult* _res_)
{
	SlingshotBackendSessionManagerSetupDbusData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
slingshot_backend_session_manager_setup_dbus_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	SlingshotBackendSessionManagerSetupDbusData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	slingshot_backend_session_manager_setup_dbus_co (_data_);
}

static gboolean
slingshot_backend_session_manager_setup_dbus_co (SlingshotBackendSessionManagerSetupDbusData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		g_async_initable_new_async (SLINGSHOT_BACKEND_TYPE_SCREENLOCK_PROXY, 0, NULL, slingshot_backend_session_manager_setup_dbus_ready, _data_, "g-flags", 0, "g-name", "org.buddiesofbudgie.BudgieScreenlock", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/buddiesofbudgie/Screenlock", "g-interface-name", "org.buddiesofbudgie.BudgieScreenlock", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = (SlingshotBackendScreenlock*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp0_ = (SlingshotBackendScreenlock*) _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->_tmp0_;
		_data_->_tmp0_ = NULL;
		_g_object_unref0 (_data_->self->priv->saver);
		_data_->self->priv->saver = _data_->_tmp2_;
		_g_object_unref0 (_data_->_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp3_ = _data_->e;
		_data_->_tmp4_ = _data_->_tmp3_->message;
		g_warning ("SessionManager.vala:57: Unable to contact screen saver: %s", _data_->_tmp4_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 2;
		g_async_initable_new_async (SLINGSHOT_BACKEND_TYPE_GNOME_SESSION_MANAGER_PROXY, 0, NULL, slingshot_backend_session_manager_setup_dbus_ready, _data_, "g-flags", 0, "g-name", "org.gnome.SessionManager", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/SessionManager", "g-interface-name", "org.gnome.SessionManager", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp6_ = (SlingshotBackendGnomeSessionManager*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp5_ = (SlingshotBackendGnomeSessionManager*) _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_data_->_tmp7_ = _data_->_tmp5_;
		_data_->_tmp5_ = NULL;
		_g_object_unref0 (_data_->self->priv->session);
		_data_->self->priv->session = _data_->_tmp7_;
		_g_object_unref0 (_data_->_tmp5_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp8_ = _data_->_vala1_e;
		_data_->_tmp9_ = _data_->_tmp8_->message;
		g_warning ("SessionManager.vala:63: Unable to contact GNOME Session: %s", _data_->_tmp9_);
		_g_error_free0 (_data_->_vala1_e);
	}
	__finally1:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 3;
		g_async_initable_new_async (SLINGSHOT_BACKEND_TYPE_LOGIND_INTERFACE_PROXY, 0, NULL, slingshot_backend_session_manager_setup_dbus_ready, _data_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
		return FALSE;
		_state_3:
		_data_->_tmp11_ = (SlingshotBackendLogindInterface*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp10_ = (SlingshotBackendLogindInterface*) _data_->_tmp11_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch2_g_error;
		}
		_data_->_tmp12_ = _data_->_tmp10_;
		_data_->_tmp10_ = NULL;
		_g_object_unref0 (_data_->self->priv->logind_interface);
		_data_->self->priv->logind_interface = _data_->_tmp12_;
		_g_object_unref0 (_data_->_tmp10_);
	}
	goto __finally2;
	__catch2_g_error:
	{
		_data_->_vala2_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp13_ = _data_->_vala2_e;
		_data_->_tmp14_ = _data_->_tmp13_->message;
		g_warning ("SessionManager.vala:69: Unable to contact logind: %s", _data_->_tmp14_);
		_g_error_free0 (_data_->_vala2_e);
	}
	__finally2:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
__lambda23_ (SlingshotBackendSessionManager* self)
{
	SlingshotBackendScreenlock* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->saver;
	if (_tmp0_ != NULL) {
		SlingshotBackendScreenlock* _tmp1_;
		_tmp1_ = self->priv->saver;
		slingshot_backend_screenlock_lock (_tmp1_, NULL, NULL);
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda23__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda23_ ((SlingshotBackendSessionManager*) self);
	return result;
}

void
slingshot_backend_session_manager_lock (SlingshotBackendSessionManager* self)
{
	g_return_if_fail (self != NULL);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda23__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
__lambda24_ (SlingshotBackendSessionManager* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	{
		SlingshotBackendGnomeSessionManager* _tmp0_;
		_tmp0_ = self->priv->session;
		slingshot_backend_gnome_session_manager_Logout (_tmp0_, (guint) 0, NULL, NULL);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("SessionManager.vala:91: Logout failed: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp3_;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda24__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda24_ ((SlingshotBackendSessionManager*) self);
	return result;
}

void
slingshot_backend_session_manager_logout (SlingshotBackendSessionManager* self)
{
	SlingshotBackendGnomeSessionManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->session;
	if (_tmp0_ == NULL) {
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda24__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
__lambda26_ (SlingshotBackendSessionManager* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	{
		SlingshotBackendLogindInterface* _tmp0_;
		_tmp0_ = self->priv->logind_interface;
		slingshot_backend_logind_interface_suspend (_tmp0_, FALSE, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("SessionManager.vala:112: Cannot suspend: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp3_;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda26__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda26_ ((SlingshotBackendSessionManager*) self);
	return result;
}

static gboolean
__lambda25_ (SlingshotBackendSessionManager* self)
{
	SlingshotBackendScreenlock* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->saver;
	if (_tmp0_ != NULL) {
		SlingshotBackendScreenlock* _tmp1_;
		_tmp1_ = self->priv->saver;
		slingshot_backend_screenlock_lock (_tmp1_, NULL, NULL);
	}
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 2000, ___lambda26__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	return result;
}

static gboolean
___lambda25__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda25_ ((SlingshotBackendSessionManager*) self);
	return result;
}

void
slingshot_backend_session_manager_suspend (SlingshotBackendSessionManager* self)
{
	SlingshotBackendLogindInterface* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->logind_interface;
	if (_tmp0_ == NULL) {
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda25__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
__lambda27_ (SlingshotBackendSessionManager* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	{
		SlingshotBackendGnomeSessionManager* _tmp0_;
		_tmp0_ = self->priv->session;
		slingshot_backend_gnome_session_manager_Reboot (_tmp0_, NULL, NULL);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("SessionManager.vala:130: Restart failed: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp3_;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda27__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda27_ ((SlingshotBackendSessionManager*) self);
	return result;
}

void
slingshot_backend_session_manager_restart (SlingshotBackendSessionManager* self)
{
	SlingshotBackendGnomeSessionManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->session;
	if (_tmp0_ == NULL) {
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda27__gsource_func, g_object_ref (self), g_object_unref);
}

static gboolean
__lambda28_ (SlingshotBackendSessionManager* self)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	{
		SlingshotBackendGnomeSessionManager* _tmp0_;
		_tmp0_ = self->priv->session;
		slingshot_backend_gnome_session_manager_Shutdown (_tmp0_, NULL, NULL);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_warning ("SessionManager.vala:145: Shutdown failed: %s", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp3_;
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda28__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda28_ ((SlingshotBackendSessionManager*) self);
	return result;
}

void
slingshot_backend_session_manager_shutdown (SlingshotBackendSessionManager* self)
{
	SlingshotBackendGnomeSessionManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->session;
	if (_tmp0_ == NULL) {
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda28__gsource_func, g_object_ref (self), g_object_unref);
}

SlingshotBackendSessionManager*
slingshot_backend_session_manager_construct (GType object_type)
{
	SlingshotBackendSessionManager * self = NULL;
	self = (SlingshotBackendSessionManager*) g_object_new (object_type, NULL);
	return self;
}

SlingshotBackendSessionManager*
slingshot_backend_session_manager_new (void)
{
	return slingshot_backend_session_manager_construct (SLINGSHOT_BACKEND_TYPE_SESSION_MANAGER);
}

static GObject *
slingshot_backend_session_manager_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SlingshotBackendSessionManager * self;
	parent_class = G_OBJECT_CLASS (slingshot_backend_session_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_BACKEND_TYPE_SESSION_MANAGER, SlingshotBackendSessionManager);
	slingshot_backend_session_manager_setup_dbus (self, NULL, NULL);
	return obj;
}

static void
slingshot_backend_session_manager_class_init (SlingshotBackendSessionManagerClass * klass,
                                              gpointer klass_data)
{
	slingshot_backend_session_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SlingshotBackendSessionManager_private_offset);
	G_OBJECT_CLASS (klass)->constructor = slingshot_backend_session_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = slingshot_backend_session_manager_finalize;
}

static void
slingshot_backend_session_manager_instance_init (SlingshotBackendSessionManager * self,
                                                 gpointer klass)
{
	self->priv = slingshot_backend_session_manager_get_instance_private (self);
	self->priv->saver = NULL;
	self->priv->session = NULL;
	self->priv->logind_interface = NULL;
}

static void
slingshot_backend_session_manager_finalize (GObject * obj)
{
	SlingshotBackendSessionManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_BACKEND_TYPE_SESSION_MANAGER, SlingshotBackendSessionManager);
	_g_object_unref0 (self->priv->saver);
	_g_object_unref0 (self->priv->session);
	_g_object_unref0 (self->priv->logind_interface);
	G_OBJECT_CLASS (slingshot_backend_session_manager_parent_class)->finalize (obj);
}

GType
slingshot_backend_session_manager_get_type (void)
{
	return slingshot_backend_session_manager_type_id;
}

GType
slingshot_backend_session_manager_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotBackendSessionManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_backend_session_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SlingshotBackendSessionManager), 0, (GInstanceInitFunc) slingshot_backend_session_manager_instance_init, NULL };
	slingshot_backend_session_manager_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "SlingshotBackendSessionManager", &g_define_type_info, 0);
	SlingshotBackendSessionManager_private_offset = sizeof (SlingshotBackendSessionManagerPrivate);
	return slingshot_backend_session_manager_type_id;
}

