/* SessionLocker.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from SessionLocker.vala, do not modify */

/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: 2020, 2025 elementary, Inc. (https://elementary.io)
 */

#include <clutter/clutter.h>
#include <glib-object.h>
#include <glib.h>
#include "gala.h"
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gunixinputstream.h>
#include <meta/meta-plugin.h>
#include <meta/display.h>
#include <float.h>
#include <math.h>
#include <meta/meta-cursor-tracker.h>
#include <meta/prefs.h>
#include <gio/gunixfdlist.h>
#include <meta/meta-monitor-manager.h>
#include <meta/meta-context.h>
#include <meta/meta-backend.h>

#define GALA_SESSION_LOCKER_LONG_ANIMATION_TIME ((guint) 3000)
#define GALA_SESSION_LOCKER_SHORT_ANIMATION_TIME ((guint) 300)
#define GALA_SESSION_LOCKER_LOCK_ENABLED_KEY "lock-enabled"
#define GALA_SESSION_LOCKER_LOCK_PROHIBITED_KEY "disable-lock-screen"
#define GALA_SESSION_LOCKER_LOCK_ON_SUSPEND_KEY "lock-on-suspend"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GALA_TYPE_SESSION_LOCKER (gala_session_locker_get_type ())
#define GALA_SESSION_LOCKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_SESSION_LOCKER, GalaSessionLocker))
#define GALA_SESSION_LOCKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_SESSION_LOCKER, GalaSessionLockerClass))
#define GALA_IS_SESSION_LOCKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_SESSION_LOCKER))
#define GALA_IS_SESSION_LOCKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_SESSION_LOCKER))
#define GALA_SESSION_LOCKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_SESSION_LOCKER, GalaSessionLockerClass))

typedef struct _GalaSessionLocker GalaSessionLocker;
typedef struct _GalaSessionLockerClass GalaSessionLockerClass;
typedef struct _GalaSessionLockerPrivate GalaSessionLockerPrivate;

#define GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER (gala_session_locker_login_manager_get_type ())
#define GALA_SESSION_LOCKER_LOGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER, GalaSessionLockerLoginManager))
#define GALA_SESSION_LOCKER_IS_LOGIN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER))
#define GALA_SESSION_LOCKER_LOGIN_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER, GalaSessionLockerLoginManagerIface))

typedef struct _GalaSessionLockerLoginManager GalaSessionLockerLoginManager;
typedef struct _GalaSessionLockerLoginManagerIface GalaSessionLockerLoginManagerIface;

#define GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER_PROXY (gala_session_locker_login_manager_proxy_get_type ())

#define GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER (gala_session_locker_login_user_manager_get_type ())
#define GALA_SESSION_LOCKER_LOGIN_USER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER, GalaSessionLockerLoginUserManager))
#define GALA_SESSION_LOCKER_IS_LOGIN_USER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER))
#define GALA_SESSION_LOCKER_LOGIN_USER_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER, GalaSessionLockerLoginUserManagerIface))

typedef struct _GalaSessionLockerLoginUserManager GalaSessionLockerLoginUserManager;
typedef struct _GalaSessionLockerLoginUserManagerIface GalaSessionLockerLoginUserManagerIface;

#define GALA_SESSION_LOCKER_TYPE_LOGIN_DISPLAY (gala_session_locker_login_display_get_type ())
typedef struct _GalaSessionLockerLoginDisplay GalaSessionLockerLoginDisplay;

#define GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER_PROXY (gala_session_locker_login_user_manager_proxy_get_type ())

#define GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER (gala_session_locker_login_session_manager_get_type ())
#define GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER, GalaSessionLockerLoginSessionManager))
#define GALA_SESSION_LOCKER_IS_LOGIN_SESSION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER))
#define GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER, GalaSessionLockerLoginSessionManagerIface))

typedef struct _GalaSessionLockerLoginSessionManager GalaSessionLockerLoginSessionManager;
typedef struct _GalaSessionLockerLoginSessionManagerIface GalaSessionLockerLoginSessionManagerIface;

#define GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER_PROXY (gala_session_locker_login_session_manager_proxy_get_type ())

#define GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE (gala_session_locker_session_presence_get_type ())
#define GALA_SESSION_LOCKER_SESSION_PRESENCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE, GalaSessionLockerSessionPresence))
#define GALA_SESSION_LOCKER_IS_SESSION_PRESENCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE))
#define GALA_SESSION_LOCKER_SESSION_PRESENCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE, GalaSessionLockerSessionPresenceIface))

typedef struct _GalaSessionLockerSessionPresence GalaSessionLockerSessionPresence;
typedef struct _GalaSessionLockerSessionPresenceIface GalaSessionLockerSessionPresenceIface;
typedef enum  {
	GALA_SESSION_LOCKER_PRESENCE_STATUS_AVAILABLE = 0,
	GALA_SESSION_LOCKER_PRESENCE_STATUS_INVISIBLE = 1,
	GALA_SESSION_LOCKER_PRESENCE_STATUS_BUSY = 2,
	GALA_SESSION_LOCKER_PRESENCE_STATUS_IDLE = 3
} GalaSessionLockerPresenceStatus;

#define GALA_SESSION_LOCKER_TYPE_PRESENCE_STATUS (gala_session_locker_presence_status_get_type ())

#define GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE_PROXY (gala_session_locker_session_presence_proxy_get_type ())

#define GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT (gala_session_locker_display_manager_seat_get_type ())
#define GALA_SESSION_LOCKER_DISPLAY_MANAGER_SEAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT, GalaSessionLockerDisplayManagerSeat))
#define GALA_SESSION_LOCKER_IS_DISPLAY_MANAGER_SEAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT))
#define GALA_SESSION_LOCKER_DISPLAY_MANAGER_SEAT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT, GalaSessionLockerDisplayManagerSeatIface))

typedef struct _GalaSessionLockerDisplayManagerSeat GalaSessionLockerDisplayManagerSeat;
typedef struct _GalaSessionLockerDisplayManagerSeatIface GalaSessionLockerDisplayManagerSeatIface;

#define GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT_PROXY (gala_session_locker_display_manager_seat_proxy_get_type ())
enum  {
	GALA_SESSION_LOCKER_0_PROPERTY,
	GALA_SESSION_LOCKER_ACTIVE_PROPERTY,
	GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY,
	GALA_SESSION_LOCKER_IN_GREETER_PROPERTY,
	GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY,
	GALA_SESSION_LOCKER_WM_PROPERTY,
	GALA_SESSION_LOCKER_NUM_PROPERTIES
};
static GParamSpec* gala_session_locker_properties[GALA_SESSION_LOCKER_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)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GalaSessionLockerInitDbusInterfacesData GalaSessionLockerInitDbusInterfacesData;
#define _gala_session_locker_login_display_free0(var) ((var == NULL) ? NULL : (var = (gala_session_locker_login_display_free (var), NULL)))
enum  {
	GALA_SESSION_LOCKER_LOGIN_MANAGER_PREPARE_FOR_SLEEP_SIGNAL,
	GALA_SESSION_LOCKER_LOGIN_MANAGER_NUM_SIGNALS
};
static guint gala_session_locker_login_manager_signals[GALA_SESSION_LOCKER_LOGIN_MANAGER_NUM_SIGNALS] = {0};
typedef GDBusProxy GalaSessionLockerLoginManagerProxy;
typedef GDBusProxyClass GalaSessionLockerLoginManagerProxyClass;
enum  {
	GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_LOCK_SIGNAL,
	GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_UNLOCK_SIGNAL,
	GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_NUM_SIGNALS
};
static guint gala_session_locker_login_session_manager_signals[GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_NUM_SIGNALS] = {0};
typedef GDBusProxy GalaSessionLockerLoginSessionManagerProxy;
typedef GDBusProxyClass GalaSessionLockerLoginSessionManagerProxyClass;
typedef GDBusProxy GalaSessionLockerLoginUserManagerProxy;
typedef GDBusProxyClass GalaSessionLockerLoginUserManagerProxyClass;
enum  {
	GALA_SESSION_LOCKER_SESSION_PRESENCE_STATUS_CHANGED_SIGNAL,
	GALA_SESSION_LOCKER_SESSION_PRESENCE_NUM_SIGNALS
};
static guint gala_session_locker_session_presence_signals[GALA_SESSION_LOCKER_SESSION_PRESENCE_NUM_SIGNALS] = {0};
typedef GDBusProxy GalaSessionLockerSessionPresenceProxy;
typedef GDBusProxyClass GalaSessionLockerSessionPresenceProxyClass;
typedef GDBusProxy GalaSessionLockerDisplayManagerSeatProxy;
typedef GDBusProxyClass GalaSessionLockerDisplayManagerSeatProxyClass;
#define __vala_ClutterColor_free0(var) ((var == NULL) ? NULL : (var = (_vala_ClutterColor_free (var), NULL)))
enum  {
	GALA_SESSION_LOCKER_ACTIVE_CHANGED_SIGNAL,
	GALA_SESSION_LOCKER_NUM_SIGNALS
};
static guint gala_session_locker_signals[GALA_SESSION_LOCKER_NUM_SIGNALS] = {0};

struct _GalaSessionLocker {
	ClutterActor parent_instance;
	GalaSessionLockerPrivate * priv;
};

struct _GalaSessionLockerClass {
	ClutterActorClass parent_class;
};

struct _GalaSessionLockerLoginManagerIface {
	GTypeInterface parent_iface;
	char* (*get_session) (GalaSessionLockerLoginManager* self, const gchar* session_id, GError** error);
	GUnixInputStream* (*inhibit) (GalaSessionLockerLoginManager* self, const gchar* what, const gchar* who, const gchar* why, const gchar* mode, GError** error);
};

struct _GalaSessionLockerLoginDisplay {
	gchar* session;
	char* objectpath;
};

struct _GalaSessionLockerLoginUserManagerIface {
	GTypeInterface parent_iface;
	GalaSessionLockerLoginDisplay* (*get_display) (GalaSessionLockerLoginUserManager* self);
};

struct _GalaSessionLockerLoginSessionManagerIface {
	GTypeInterface parent_iface;
	void (*set_locked_hint) (GalaSessionLockerLoginSessionManager* self, gboolean locked, GError** error);
	gboolean (*get_active) (GalaSessionLockerLoginSessionManager* self);
};

struct _GalaSessionLockerSessionPresenceIface {
	GTypeInterface parent_iface;
	GalaSessionLockerPresenceStatus (*get_status) (GalaSessionLockerSessionPresence* self);
};

struct _GalaSessionLockerDisplayManagerSeatIface {
	GTypeInterface parent_iface;
	void (*switch_to_greeter) (GalaSessionLockerDisplayManagerSeat* self, GError** error);
};

struct _GalaSessionLockerPrivate {
	gboolean _active;
	gboolean _is_locked;
	gboolean _in_greeter;
	gint64 _activation_time;
	GalaWindowManager* _wm;
	GalaModalProxy* modal_proxy;
	GalaSessionLockerLoginManager* login_manager;
	GalaSessionLockerLoginUserManager* login_user_manager;
	GalaSessionLockerLoginSessionManager* login_session;
	GalaSessionLockerSessionPresence* session_presence;
	GalaSessionLockerDisplayManagerSeat* display_manager;
	guint animate_id;
	GUnixInputStream* inhibitor;
	GSettings* screensaver_settings;
	GSettings* lockdown_settings;
	GSettings* gala_settings;
	gboolean connected_to_buses;
};

struct _GalaSessionLockerInitDbusInterfacesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GalaSessionLocker* self;
	gboolean success;
	GalaSessionLockerLoginManager* _tmp0_;
	GalaSessionLockerLoginManager* _tmp1_;
	GalaSessionLockerLoginManager* _tmp2_;
	GalaSessionLockerLoginUserManager* _tmp3_;
	GalaSessionLockerLoginUserManager* _tmp4_;
	GalaSessionLockerLoginUserManager* _tmp5_;
	GalaSessionLockerLoginManager* _tmp6_;
	GalaSessionLockerLoginSessionManager* _tmp7_;
	GalaSessionLockerLoginSessionManager* _tmp8_;
	GalaSessionLockerLoginSessionManager* _tmp9_;
	GalaSessionLockerLoginSessionManager* _tmp10_;
	GalaSessionLockerLoginSessionManager* _tmp11_;
	GalaSessionLockerLoginSessionManager* _tmp12_;
	GalaSessionLockerLoginSessionManager* _tmp13_;
	GError* e;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GalaSessionLockerSessionPresence* _tmp16_;
	GalaSessionLockerSessionPresence* _tmp17_;
	GalaSessionLockerSessionPresence* _tmp18_;
	GalaSessionLockerSessionPresence* _tmp19_;
	GalaSessionLockerPresenceStatus _tmp20_;
	GalaSessionLockerPresenceStatus _tmp21_;
	GalaSessionLockerSessionPresence* _tmp22_;
	GError* _vala1_e;
	GError* _tmp23_;
	const gchar* _tmp24_;
	gchar* seat_path;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	const gchar* _tmp27_;
	GalaSessionLockerDisplayManagerSeat* _tmp28_;
	const gchar* _tmp29_;
	GalaSessionLockerDisplayManagerSeat* _tmp30_;
	GalaSessionLockerDisplayManagerSeat* _tmp31_;
	GError* _inner_error0_;
};

static gint GalaSessionLocker_private_offset;
static gpointer gala_session_locker_parent_class = NULL;

VALA_EXTERN GType gala_session_locker_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLocker, g_object_unref)
VALA_EXTERN GType gala_session_locker_login_manager_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_session_locker_login_manager_register_object (void* object,
                                                         GDBusConnection* connection,
                                                         const gchar* path,
                                                         GError** error);
static GType gala_session_locker_login_manager_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLockerLoginManager, g_object_unref)
static GType gala_session_locker_login_display_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GalaSessionLockerLoginDisplay* gala_session_locker_login_display_dup (const GalaSessionLockerLoginDisplay* self);
static void gala_session_locker_login_display_free (GalaSessionLockerLoginDisplay* self);
static void gala_session_locker_login_display_copy (const GalaSessionLockerLoginDisplay* self,
                                             GalaSessionLockerLoginDisplay* dest);
static void gala_session_locker_login_display_destroy (GalaSessionLockerLoginDisplay* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (GalaSessionLockerLoginDisplay, gala_session_locker_login_display_destroy)
static GType gala_session_locker_login_user_manager_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLockerLoginUserManager, g_object_unref)
VALA_EXTERN GType gala_session_locker_login_user_manager_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_session_locker_login_user_manager_register_object (void* object,
                                                              GDBusConnection* connection,
                                                              const gchar* path,
                                                              GError** error);
VALA_EXTERN GType gala_session_locker_login_session_manager_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_session_locker_login_session_manager_register_object (void* object,
                                                                 GDBusConnection* connection,
                                                                 const gchar* path,
                                                                 GError** error);
static GType gala_session_locker_login_session_manager_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLockerLoginSessionManager, g_object_unref)
static GType gala_session_locker_presence_status_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GType gala_session_locker_session_presence_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLockerSessionPresence, g_object_unref)
VALA_EXTERN GType gala_session_locker_session_presence_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_session_locker_session_presence_register_object (void* object,
                                                            GDBusConnection* connection,
                                                            const gchar* path,
                                                            GError** error);
VALA_EXTERN GType gala_session_locker_display_manager_seat_proxy_get_type (void) G_GNUC_CONST ;
static guint gala_session_locker_display_manager_seat_register_object (void* object,
                                                                GDBusConnection* connection,
                                                                const gchar* path,
                                                                GError** error);
static GType gala_session_locker_display_manager_seat_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaSessionLockerDisplayManagerSeat, g_object_unref)
VALA_EXTERN GalaSessionLocker* gala_session_locker_new (GalaWindowManager* wm);
VALA_EXTERN GalaSessionLocker* gala_session_locker_construct (GType object_type,
                                                  GalaWindowManager* wm);
static void gala_session_locker_init_dbus_interfaces_data_free (gpointer _data);
static void gala_session_locker_init_dbus_interfaces (GalaSessionLocker* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void gala_session_locker_init_dbus_interfaces_finish (GalaSessionLocker* self,
                                                      GAsyncResult* _res_);
static gboolean gala_session_locker_init_dbus_interfaces_co (GalaSessionLockerInitDbusInterfacesData* _data_);
static void gala_session_locker_init_dbus_interfaces_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void gala_session_locker_prepare_for_sleep (GalaSessionLocker* self,
                                            gboolean about_to_suspend);
static void _gala_session_locker_prepare_for_sleep_gala_session_locker_login_manager_prepare_for_sleep (GalaSessionLockerLoginManager* _sender,
                                                                                                 gboolean about_to_suspend,
                                                                                                 gpointer self);
static GalaSessionLockerLoginSessionManager* gala_session_locker_get_current_session_manager (GalaSessionLocker* self,
                                                                                       GError** error);
static void ____lambda76_ (GalaSessionLocker* self);
VALA_EXTERN void gala_session_locker_lock (GalaSessionLocker* self,
                               gboolean animate);
static void _____lambda76__gala_session_locker_login_session_manager_lock (GalaSessionLockerLoginSessionManager* _sender,
                                                                    gpointer self);
static void ____lambda77_ (GalaSessionLocker* self);
VALA_EXTERN void gala_session_locker_deactivate (GalaSessionLocker* self,
                                     gboolean animate);
static void gala_session_locker_set_in_greeter (GalaSessionLocker* self,
                                         gboolean value);
static void _____lambda77__gala_session_locker_login_session_manager_unlock (GalaSessionLockerLoginSessionManager* _sender,
                                                                      gpointer self);
static void gala_session_locker_sync_inhibitor (GalaSessionLocker* self);
static void _gala_session_locker_sync_inhibitor_g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                                            GVariant* changed_properties,
                                                                            gchar** invalidated_properties,
                                                                            gpointer self);
static void gala_session_locker_on_status_changed (GalaSessionLocker* self,
                                            GalaSessionLockerPresenceStatus status);
 G_GNUC_INTERNAL GalaSessionLockerPresenceStatus gala_session_locker_session_presence_get_status (GalaSessionLockerSessionPresence* self);
static void ___lambda78_ (GalaSessionLocker* self,
                   GalaSessionLockerPresenceStatus status);
static void ____lambda78__gala_session_locker_session_presence_status_changed (GalaSessionLockerSessionPresence* _sender,
                                                                        GalaSessionLockerPresenceStatus new_status,
                                                                        gpointer self);
static void gala_session_locker_expand_to_screen_size (GalaSessionLocker* self);
VALA_EXTERN GalaWindowManager* gala_session_locker_get_wm (GalaSessionLocker* self);
static void gala_session_locker_on_user_became_active (GalaSessionLocker* self);
VALA_EXTERN void gala_session_locker_activate (GalaSessionLocker* self,
                                   gboolean animate,
                                   guint animation_time);
 G_GNUC_INTERNAL gboolean gala_session_locker_login_session_manager_get_active (GalaSessionLockerLoginSessionManager* self);
VALA_EXTERN gboolean gala_session_locker_get_active (GalaSessionLocker* self);
static GUnixInputStream* gala_session_locker_login_manager_inhibit (GalaSessionLockerLoginManager* self,
                                                             const gchar* what,
                                                             const gchar* who,
                                                             const gchar* why,
                                                             const gchar* mode,
                                                             GError** error);
VALA_EXTERN gboolean gala_session_locker_get_is_locked (GalaSessionLocker* self);
VALA_EXTERN gboolean gala_session_locker_get_in_greeter (GalaSessionLocker* self);
static void gala_session_locker_cancel_animation (GalaSessionLocker* self);
static void gala_session_locker_display_manager_seat_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                                 GError** error);
 G_GNUC_INTERNAL GalaSessionLockerLoginDisplay* gala_session_locker_login_user_manager_get_display (GalaSessionLockerLoginUserManager* self);
static char* gala_session_locker_login_manager_get_session (GalaSessionLockerLoginManager* self,
                                                     const gchar* session_id,
                                                     GError** error);
static void gala_session_locker_set_is_locked (GalaSessionLocker* self,
                                        gboolean value);
VALA_EXTERN gint64 gala_session_locker_get_activation_time (GalaSessionLocker* self);
static void gala_session_locker_set_activation_time (GalaSessionLocker* self,
                                              gint64 value);
static void gala_session_locker_animate_and_lock (GalaSessionLocker* self,
                                           guint animation_time);
static void _gala_session_locker_set_active (GalaSessionLocker* self,
                                      gboolean new_active);
static gboolean __lambda75_ (GalaSessionLocker* self);
static gboolean ___lambda75__gsource_func (gpointer self);
static void gala_session_locker_set_active (GalaSessionLocker* self,
                                     gboolean value);
static void gala_session_locker_login_session_manager_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                                gboolean locked,
                                                                GError** error);
static void gala_session_locker_set_wm (GalaSessionLocker* self,
                                 GalaWindowManager* value);
static GType gala_session_locker_login_manager_get_type_once (void);
static void gala_session_locker_login_manager_proxy_g_signal (GDBusProxy* proxy,
                                                       const gchar* sender_name,
                                                       const gchar* signal_name,
                                                       GVariant* parameters);
static void _dbus_handle_gala_session_locker_login_manager_prepare_for_sleep (GalaSessionLockerLoginManager* self,
                                                                       GVariant* parameters);
static char* gala_session_locker_login_manager_proxy_get_session (GalaSessionLockerLoginManager* self,
                                                           const gchar* session_id,
                                                           GError** error);
static GUnixInputStream* gala_session_locker_login_manager_proxy_inhibit (GalaSessionLockerLoginManager* self,
                                                                   const gchar* what,
                                                                   const gchar* who,
                                                                   const gchar* why,
                                                                   const gchar* mode,
                                                                   GError** error);
static void gala_session_locker_login_manager_proxy_gala_session_locker_login_manager_interface_init (GalaSessionLockerLoginManagerIface* iface);
static void _dbus_gala_session_locker_login_manager_get_session (GalaSessionLockerLoginManager* self,
                                                          GVariant* _parameters_,
                                                          GDBusMethodInvocation* invocation);
static void _dbus_gala_session_locker_login_manager_inhibit (GalaSessionLockerLoginManager* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation);
static void gala_session_locker_login_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* gala_session_locker_login_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 gala_session_locker_login_manager_dbus_interface_set_property (GDBusConnection* connection,
                                                                        const gchar* sender,
                                                                        const gchar* object_path,
                                                                        const gchar* interface_name,
                                                                        const gchar* property_name,
                                                                        GVariant* value,
                                                                        GError** error,
                                                                        gpointer user_data);
static void _dbus_gala_session_locker_login_manager_prepare_for_sleep (GObject* _sender,
                                                                gboolean about_to_suspend,
                                                                gpointer* _data);
static void _gala_session_locker_login_manager_unregister_object (gpointer user_data);
static GType gala_session_locker_login_session_manager_get_type_once (void);
static void gala_session_locker_login_session_manager_proxy_g_signal (GDBusProxy* proxy,
                                                               const gchar* sender_name,
                                                               const gchar* signal_name,
                                                               GVariant* parameters);
static void _dbus_handle_gala_session_locker_login_session_manager_lock (GalaSessionLockerLoginSessionManager* self,
                                                                  GVariant* parameters);
static void _dbus_handle_gala_session_locker_login_session_manager_unlock (GalaSessionLockerLoginSessionManager* self,
                                                                    GVariant* parameters);
static void gala_session_locker_login_session_manager_proxy_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                                      gboolean locked,
                                                                      GError** error);
static gboolean gala_session_locker_login_session_manager_dbus_proxy_get_active (GalaSessionLockerLoginSessionManager* self);
static void gala_session_locker_login_session_manager_proxy_gala_session_locker_login_session_manager_interface_init (GalaSessionLockerLoginSessionManagerIface* iface);
static void _dbus_gala_session_locker_login_session_manager_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                                      GVariant* _parameters_,
                                                                      GDBusMethodInvocation* invocation);
static void gala_session_locker_login_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* gala_session_locker_login_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 GVariant* _dbus_gala_session_locker_login_session_manager_get_active (GalaSessionLockerLoginSessionManager* self);
static gboolean gala_session_locker_login_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 _dbus_gala_session_locker_login_session_manager_lock (GObject* _sender,
                                                           gpointer* _data);
static void _dbus_gala_session_locker_login_session_manager_unlock (GObject* _sender,
                                                             gpointer* _data);
static void _gala_session_locker_login_session_manager_unregister_object (gpointer user_data);
static GType gala_session_locker_login_user_manager_get_type_once (void);
static void gala_session_locker_login_user_manager_proxy_g_signal (GDBusProxy* proxy,
                                                            const gchar* sender_name,
                                                            const gchar* signal_name,
                                                            GVariant* parameters);
static GalaSessionLockerLoginDisplay* gala_session_locker_login_user_manager_dbus_proxy_get_display (GalaSessionLockerLoginUserManager* self);
static void gala_session_locker_login_user_manager_proxy_gala_session_locker_login_user_manager_interface_init (GalaSessionLockerLoginUserManagerIface* iface);
static void gala_session_locker_login_user_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* gala_session_locker_login_user_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 GVariant* _dbus_gala_session_locker_login_user_manager_get_display (GalaSessionLockerLoginUserManager* self);
static gboolean gala_session_locker_login_user_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 _gala_session_locker_login_user_manager_unregister_object (gpointer user_data);
static GType gala_session_locker_session_presence_get_type_once (void);
static void gala_session_locker_session_presence_proxy_g_signal (GDBusProxy* proxy,
                                                          const gchar* sender_name,
                                                          const gchar* signal_name,
                                                          GVariant* parameters);
static void _dbus_handle_gala_session_locker_session_presence_status_changed (GalaSessionLockerSessionPresence* self,
                                                                       GVariant* parameters);
static GalaSessionLockerPresenceStatus gala_session_locker_session_presence_dbus_proxy_get_status (GalaSessionLockerSessionPresence* self);
static void gala_session_locker_session_presence_proxy_gala_session_locker_session_presence_interface_init (GalaSessionLockerSessionPresenceIface* iface);
static void gala_session_locker_session_presence_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* gala_session_locker_session_presence_dbus_interface_get_property (GDBusConnection* connection,
                                                                            const gchar* sender,
                                                                            const gchar* object_path,
                                                                            const gchar* interface_name,
                                                                            const gchar* property_name,
                                                                            GError** error,
                                                                            gpointer user_data);
static GVariant* _dbus_gala_session_locker_session_presence_get_status (GalaSessionLockerSessionPresence* self);
static gboolean gala_session_locker_session_presence_dbus_interface_set_property (GDBusConnection* connection,
                                                                           const gchar* sender,
                                                                           const gchar* object_path,
                                                                           const gchar* interface_name,
                                                                           const gchar* property_name,
                                                                           GVariant* value,
                                                                           GError** error,
                                                                           gpointer user_data);
static void _dbus_gala_session_locker_session_presence_status_changed (GObject* _sender,
                                                                GalaSessionLockerPresenceStatus new_status,
                                                                gpointer* _data);
static void _gala_session_locker_session_presence_unregister_object (gpointer user_data);
static GType gala_session_locker_display_manager_seat_get_type_once (void);
static void gala_session_locker_display_manager_seat_proxy_g_signal (GDBusProxy* proxy,
                                                              const gchar* sender_name,
                                                              const gchar* signal_name,
                                                              GVariant* parameters);
static void gala_session_locker_display_manager_seat_proxy_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                                       GError** error);
static void gala_session_locker_display_manager_seat_proxy_gala_session_locker_display_manager_seat_interface_init (GalaSessionLockerDisplayManagerSeatIface* iface);
static void _dbus_gala_session_locker_display_manager_seat_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                                       GVariant* _parameters_,
                                                                       GDBusMethodInvocation* invocation);
static void gala_session_locker_display_manager_seat_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* gala_session_locker_display_manager_seat_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 gala_session_locker_display_manager_seat_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 _gala_session_locker_display_manager_seat_unregister_object (gpointer user_data);
static GObject * gala_session_locker_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static gboolean _gala_session_locker___lambda79_ (GalaSessionLocker* self,
                                           ClutterEvent* event);
static gboolean __gala_session_locker___lambda79__clutter_actor_key_press_event (ClutterActor* _sender,
                                                                          ClutterEvent* event,
                                                                          gpointer self);
static gboolean _gala_session_locker___lambda80_ (GalaSessionLocker* self,
                                           ClutterEvent* event);
static gboolean __gala_session_locker___lambda80__clutter_actor_motion_event (ClutterActor* _sender,
                                                                       ClutterEvent* event,
                                                                       gpointer self);
static void _vala_ClutterColor_free (ClutterColor* self);
static void _gala_session_locker_expand_to_screen_size_meta_monitor_manager_monitors_changed (MetaMonitorManager* _sender,
                                                                                       gpointer self);
static void gala_session_locker_finalize (GObject * obj);
static GType gala_session_locker_get_type_once (void);
static void _vala_gala_session_locker_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_gala_session_locker_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_get_session_session_id = {-1, "session_id", "s", NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_get_session_result = {-1, "result", "o", NULL};
static const GDBusArgInfo * const _gala_session_locker_login_manager_dbus_arg_info_get_session_in[] = {&_gala_session_locker_login_manager_dbus_arg_info_get_session_session_id, NULL};
static const GDBusArgInfo * const _gala_session_locker_login_manager_dbus_arg_info_get_session_out[] = {&_gala_session_locker_login_manager_dbus_arg_info_get_session_result, NULL};
static const GDBusMethodInfo _gala_session_locker_login_manager_dbus_method_info_get_session = {-1, "GetSession", (GDBusArgInfo **) (&_gala_session_locker_login_manager_dbus_arg_info_get_session_in), (GDBusArgInfo **) (&_gala_session_locker_login_manager_dbus_arg_info_get_session_out), NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_inhibit_what = {-1, "what", "s", NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_inhibit_who = {-1, "who", "s", NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_inhibit_why = {-1, "why", "s", NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_inhibit_mode = {-1, "mode", "s", NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_inhibit_result = {-1, "result", "h", NULL};
static const GDBusArgInfo * const _gala_session_locker_login_manager_dbus_arg_info_inhibit_in[] = {&_gala_session_locker_login_manager_dbus_arg_info_inhibit_what, &_gala_session_locker_login_manager_dbus_arg_info_inhibit_who, &_gala_session_locker_login_manager_dbus_arg_info_inhibit_why, &_gala_session_locker_login_manager_dbus_arg_info_inhibit_mode, NULL};
static const GDBusArgInfo * const _gala_session_locker_login_manager_dbus_arg_info_inhibit_out[] = {&_gala_session_locker_login_manager_dbus_arg_info_inhibit_result, NULL};
static const GDBusMethodInfo _gala_session_locker_login_manager_dbus_method_info_inhibit = {-1, "Inhibit", (GDBusArgInfo **) (&_gala_session_locker_login_manager_dbus_arg_info_inhibit_in), (GDBusArgInfo **) (&_gala_session_locker_login_manager_dbus_arg_info_inhibit_out), NULL};
static const GDBusMethodInfo * const _gala_session_locker_login_manager_dbus_method_info[] = {&_gala_session_locker_login_manager_dbus_method_info_get_session, &_gala_session_locker_login_manager_dbus_method_info_inhibit, NULL};
static const GDBusArgInfo _gala_session_locker_login_manager_dbus_arg_info_prepare_for_sleep_about_to_suspend = {-1, "about_to_suspend", "b", NULL};
static const GDBusArgInfo * const _gala_session_locker_login_manager_dbus_arg_info_prepare_for_sleep[] = {&_gala_session_locker_login_manager_dbus_arg_info_prepare_for_sleep_about_to_suspend, NULL};
static const GDBusSignalInfo _gala_session_locker_login_manager_dbus_signal_info_prepare_for_sleep = {-1, "PrepareForSleep", (GDBusArgInfo **) (&_gala_session_locker_login_manager_dbus_arg_info_prepare_for_sleep), NULL};
static const GDBusSignalInfo * const _gala_session_locker_login_manager_dbus_signal_info[] = {&_gala_session_locker_login_manager_dbus_signal_info_prepare_for_sleep, NULL};
static const GDBusPropertyInfo * const _gala_session_locker_login_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _gala_session_locker_login_manager_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_gala_session_locker_login_manager_dbus_method_info), (GDBusSignalInfo **) (&_gala_session_locker_login_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_session_locker_login_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_session_locker_login_manager_dbus_interface_vtable = {gala_session_locker_login_manager_dbus_interface_method_call, gala_session_locker_login_manager_dbus_interface_get_property, gala_session_locker_login_manager_dbus_interface_set_property};
static const GDBusArgInfo _gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_locked = {-1, "locked", "b", NULL};
static const GDBusArgInfo * const _gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_in[] = {&_gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_locked, NULL};
static const GDBusArgInfo * const _gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_out[] = {NULL};
static const GDBusMethodInfo _gala_session_locker_login_session_manager_dbus_method_info_set_locked_hint = {-1, "SetLockedHint", (GDBusArgInfo **) (&_gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_in), (GDBusArgInfo **) (&_gala_session_locker_login_session_manager_dbus_arg_info_set_locked_hint_out), NULL};
static const GDBusMethodInfo * const _gala_session_locker_login_session_manager_dbus_method_info[] = {&_gala_session_locker_login_session_manager_dbus_method_info_set_locked_hint, NULL};
static const GDBusArgInfo * const _gala_session_locker_login_session_manager_dbus_arg_info_lock[] = {NULL};
static const GDBusSignalInfo _gala_session_locker_login_session_manager_dbus_signal_info_lock = {-1, "Lock", (GDBusArgInfo **) (&_gala_session_locker_login_session_manager_dbus_arg_info_lock), NULL};
static const GDBusArgInfo * const _gala_session_locker_login_session_manager_dbus_arg_info_unlock[] = {NULL};
static const GDBusSignalInfo _gala_session_locker_login_session_manager_dbus_signal_info_unlock = {-1, "Unlock", (GDBusArgInfo **) (&_gala_session_locker_login_session_manager_dbus_arg_info_unlock), NULL};
static const GDBusSignalInfo * const _gala_session_locker_login_session_manager_dbus_signal_info[] = {&_gala_session_locker_login_session_manager_dbus_signal_info_lock, &_gala_session_locker_login_session_manager_dbus_signal_info_unlock, NULL};
static const GDBusPropertyInfo _gala_session_locker_login_session_manager_dbus_property_info_active = {-1, "Active", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _gala_session_locker_login_session_manager_dbus_property_info[] = {&_gala_session_locker_login_session_manager_dbus_property_info_active, NULL};
static const GDBusInterfaceInfo _gala_session_locker_login_session_manager_dbus_interface_info = {-1, "org.freedesktop.login1.Session", (GDBusMethodInfo **) (&_gala_session_locker_login_session_manager_dbus_method_info), (GDBusSignalInfo **) (&_gala_session_locker_login_session_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_session_locker_login_session_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_session_locker_login_session_manager_dbus_interface_vtable = {gala_session_locker_login_session_manager_dbus_interface_method_call, gala_session_locker_login_session_manager_dbus_interface_get_property, gala_session_locker_login_session_manager_dbus_interface_set_property};
static const GDBusMethodInfo * const _gala_session_locker_login_user_manager_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _gala_session_locker_login_user_manager_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _gala_session_locker_login_user_manager_dbus_property_info_display = {-1, "Display", "(so)", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _gala_session_locker_login_user_manager_dbus_property_info[] = {&_gala_session_locker_login_user_manager_dbus_property_info_display, NULL};
static const GDBusInterfaceInfo _gala_session_locker_login_user_manager_dbus_interface_info = {-1, "org.freedesktop.login1.User", (GDBusMethodInfo **) (&_gala_session_locker_login_user_manager_dbus_method_info), (GDBusSignalInfo **) (&_gala_session_locker_login_user_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_session_locker_login_user_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_session_locker_login_user_manager_dbus_interface_vtable = {gala_session_locker_login_user_manager_dbus_interface_method_call, gala_session_locker_login_user_manager_dbus_interface_get_property, gala_session_locker_login_user_manager_dbus_interface_set_property};
static const GDBusMethodInfo * const _gala_session_locker_session_presence_dbus_method_info[] = {NULL};
static const GDBusArgInfo _gala_session_locker_session_presence_dbus_arg_info_status_changed_new_status = {-1, "new_status", "u", NULL};
static const GDBusArgInfo * const _gala_session_locker_session_presence_dbus_arg_info_status_changed[] = {&_gala_session_locker_session_presence_dbus_arg_info_status_changed_new_status, NULL};
static const GDBusSignalInfo _gala_session_locker_session_presence_dbus_signal_info_status_changed = {-1, "StatusChanged", (GDBusArgInfo **) (&_gala_session_locker_session_presence_dbus_arg_info_status_changed), NULL};
static const GDBusSignalInfo * const _gala_session_locker_session_presence_dbus_signal_info[] = {&_gala_session_locker_session_presence_dbus_signal_info_status_changed, NULL};
static const GDBusPropertyInfo _gala_session_locker_session_presence_dbus_property_info_status = {-1, "Status", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _gala_session_locker_session_presence_dbus_property_info[] = {&_gala_session_locker_session_presence_dbus_property_info_status, NULL};
static const GDBusInterfaceInfo _gala_session_locker_session_presence_dbus_interface_info = {-1, "org.gnome.SessionManager.Presence", (GDBusMethodInfo **) (&_gala_session_locker_session_presence_dbus_method_info), (GDBusSignalInfo **) (&_gala_session_locker_session_presence_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_session_locker_session_presence_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_session_locker_session_presence_dbus_interface_vtable = {gala_session_locker_session_presence_dbus_interface_method_call, gala_session_locker_session_presence_dbus_interface_get_property, gala_session_locker_session_presence_dbus_interface_set_property};
static const GDBusArgInfo * const _gala_session_locker_display_manager_seat_dbus_arg_info_switch_to_greeter_in[] = {NULL};
static const GDBusArgInfo * const _gala_session_locker_display_manager_seat_dbus_arg_info_switch_to_greeter_out[] = {NULL};
static const GDBusMethodInfo _gala_session_locker_display_manager_seat_dbus_method_info_switch_to_greeter = {-1, "SwitchToGreeter", (GDBusArgInfo **) (&_gala_session_locker_display_manager_seat_dbus_arg_info_switch_to_greeter_in), (GDBusArgInfo **) (&_gala_session_locker_display_manager_seat_dbus_arg_info_switch_to_greeter_out), NULL};
static const GDBusMethodInfo * const _gala_session_locker_display_manager_seat_dbus_method_info[] = {&_gala_session_locker_display_manager_seat_dbus_method_info_switch_to_greeter, NULL};
static const GDBusSignalInfo * const _gala_session_locker_display_manager_seat_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _gala_session_locker_display_manager_seat_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _gala_session_locker_display_manager_seat_dbus_interface_info = {-1, "org.freedesktop.DisplayManager.Seat", (GDBusMethodInfo **) (&_gala_session_locker_display_manager_seat_dbus_method_info), (GDBusSignalInfo **) (&_gala_session_locker_display_manager_seat_dbus_signal_info), (GDBusPropertyInfo **) (&_gala_session_locker_display_manager_seat_dbus_property_info), NULL};
static const GDBusInterfaceVTable _gala_session_locker_display_manager_seat_dbus_interface_vtable = {gala_session_locker_display_manager_seat_dbus_interface_method_call, gala_session_locker_display_manager_seat_dbus_interface_get_property, gala_session_locker_display_manager_seat_dbus_interface_set_property};

static inline gpointer
gala_session_locker_get_instance_private (GalaSessionLocker* self)
{
	return G_STRUCT_MEMBER_P (self, GalaSessionLocker_private_offset);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_presence_status_get_type_once (void)
{
	static const GEnumValue values[] = {{GALA_SESSION_LOCKER_PRESENCE_STATUS_AVAILABLE, "GALA_SESSION_LOCKER_PRESENCE_STATUS_AVAILABLE", "available"}, {GALA_SESSION_LOCKER_PRESENCE_STATUS_INVISIBLE, "GALA_SESSION_LOCKER_PRESENCE_STATUS_INVISIBLE", "invisible"}, {GALA_SESSION_LOCKER_PRESENCE_STATUS_BUSY, "GALA_SESSION_LOCKER_PRESENCE_STATUS_BUSY", "busy"}, {GALA_SESSION_LOCKER_PRESENCE_STATUS_IDLE, "GALA_SESSION_LOCKER_PRESENCE_STATUS_IDLE", "idle"}, {0, NULL, NULL}};
	GType gala_session_locker_presence_status_type_id;
	gala_session_locker_presence_status_type_id = g_enum_register_static ("GalaSessionLockerPresenceStatus", values);
	return gala_session_locker_presence_status_type_id;
}

static GType
gala_session_locker_presence_status_get_type (void)
{
	static gsize gala_session_locker_presence_status_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_presence_status_type_id__once)) {
		GType gala_session_locker_presence_status_type_id;
		gala_session_locker_presence_status_type_id = gala_session_locker_presence_status_get_type_once ();
		g_once_init_leave (&gala_session_locker_presence_status_type_id__once, gala_session_locker_presence_status_type_id);
	}
	return gala_session_locker_presence_status_type_id__once;
}

GalaSessionLocker*
gala_session_locker_construct (GType object_type,
                               GalaWindowManager* wm)
{
	GalaSessionLocker * self = NULL;
	g_return_val_if_fail (wm != NULL, NULL);
	self = (GalaSessionLocker*) g_object_new (object_type, "wm", wm, NULL);
	return self;
}

GalaSessionLocker*
gala_session_locker_new (GalaWindowManager* wm)
{
	return gala_session_locker_construct (GALA_TYPE_SESSION_LOCKER, wm);
}

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

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

static void
gala_session_locker_init_dbus_interfaces (GalaSessionLocker* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	GalaSessionLockerInitDbusInterfacesData* _data_;
	GalaSessionLocker* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (GalaSessionLockerInitDbusInterfacesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gala_session_locker_init_dbus_interfaces_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	gala_session_locker_init_dbus_interfaces_co (_data_);
}

static void
gala_session_locker_init_dbus_interfaces_finish (GalaSessionLocker* self,
                                                 GAsyncResult* _res_)
{
	GalaSessionLockerInitDbusInterfacesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
gala_session_locker_init_dbus_interfaces_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	GalaSessionLockerInitDbusInterfacesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gala_session_locker_init_dbus_interfaces_co (_data_);
}

static void
_gala_session_locker_prepare_for_sleep_gala_session_locker_login_manager_prepare_for_sleep (GalaSessionLockerLoginManager* _sender,
                                                                                            gboolean about_to_suspend,
                                                                                            gpointer self)
{
	gala_session_locker_prepare_for_sleep ((GalaSessionLocker*) self, about_to_suspend);
}

static void
____lambda76_ (GalaSessionLocker* self)
{
	gala_session_locker_lock (self, FALSE);
}

static void
_____lambda76__gala_session_locker_login_session_manager_lock (GalaSessionLockerLoginSessionManager* _sender,
                                                               gpointer self)
{
	____lambda76_ ((GalaSessionLocker*) self);
}

static void
____lambda77_ (GalaSessionLocker* self)
{
	gala_session_locker_deactivate (self, FALSE);
	gala_session_locker_set_in_greeter (self, FALSE);
}

static void
_____lambda77__gala_session_locker_login_session_manager_unlock (GalaSessionLockerLoginSessionManager* _sender,
                                                                 gpointer self)
{
	____lambda77_ ((GalaSessionLocker*) self);
}

static void
_gala_session_locker_sync_inhibitor_g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                                       GVariant* changed_properties,
                                                                       gchar** invalidated_properties,
                                                                       gpointer self)
{
	gala_session_locker_sync_inhibitor ((GalaSessionLocker*) self);
}

static void
___lambda78_ (GalaSessionLocker* self,
              GalaSessionLockerPresenceStatus status)
{
	gala_session_locker_on_status_changed (self, status);
}

static void
____lambda78__gala_session_locker_session_presence_status_changed (GalaSessionLockerSessionPresence* _sender,
                                                                   GalaSessionLockerPresenceStatus new_status,
                                                                   gpointer self)
{
	___lambda78_ ((GalaSessionLocker*) self, new_status);
}

static gboolean
gala_session_locker_init_dbus_interfaces_co (GalaSessionLockerInitDbusInterfacesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->success = TRUE;
	{
		_data_->_state_ = 1;
		g_async_initable_new_async (GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER_PROXY, 0, NULL, gala_session_locker_init_dbus_interfaces_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.login1", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/login1", "g-interface-name", "org.freedesktop.login1.Manager", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = (GalaSessionLockerLoginManager*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp0_ = (GalaSessionLockerLoginManager*) _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->login_manager);
		_data_->self->priv->login_manager = _data_->_tmp2_;
		_data_->_state_ = 2;
		g_async_initable_new_async (GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER_PROXY, 0, NULL, gala_session_locker_init_dbus_interfaces_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.login1", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/login1/user/self", "g-interface-name", "org.freedesktop.login1.User", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp4_ = (GalaSessionLockerLoginUserManager*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp3_ = (GalaSessionLockerLoginUserManager*) _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp0_);
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->_tmp3_;
		_data_->_tmp3_ = NULL;
		_g_object_unref0 (_data_->self->priv->login_user_manager);
		_data_->self->priv->login_user_manager = _data_->_tmp5_;
		_data_->_tmp6_ = _data_->self->priv->login_manager;
		g_signal_connect_object (_data_->_tmp6_, "prepare-for-sleep", (GCallback) _gala_session_locker_prepare_for_sleep_gala_session_locker_login_manager_prepare_for_sleep, _data_->self, 0);
		_data_->_tmp8_ = gala_session_locker_get_current_session_manager (_data_->self, &_data_->_inner_error0_);
		_data_->_tmp7_ = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp3_);
			_g_object_unref0 (_data_->_tmp0_);
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = _data_->_tmp7_;
		_data_->_tmp7_ = NULL;
		_g_object_unref0 (_data_->self->priv->login_session);
		_data_->self->priv->login_session = _data_->_tmp9_;
		_data_->_tmp10_ = _data_->self->priv->login_session;
		if (_data_->_tmp10_ != NULL) {
			_data_->_tmp11_ = _data_->self->priv->login_session;
			g_signal_connect_object (_data_->_tmp11_, "lock", (GCallback) _____lambda76__gala_session_locker_login_session_manager_lock, _data_->self, 0);
			_data_->_tmp12_ = _data_->self->priv->login_session;
			g_signal_connect_object (_data_->_tmp12_, "unlock", (GCallback) _____lambda77__gala_session_locker_login_session_manager_unlock, _data_->self, 0);
			_data_->_tmp13_ = _data_->self->priv->login_session;
			g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp13_, g_dbus_proxy_get_type (), GDBusProxy), "g-properties-changed", (GCallback) _gala_session_locker_sync_inhibitor_g_dbus_proxy_g_properties_changed, _data_->self, 0);
			gala_session_locker_sync_inhibitor (_data_->self);
		}
		_g_object_unref0 (_data_->_tmp7_);
		_g_object_unref0 (_data_->_tmp3_);
		_g_object_unref0 (_data_->_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->success = FALSE;
		_data_->_tmp14_ = _data_->e;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_critical ("SessionLocker.vala:160: Unable to connect to logind bus, screen lockin" \
"g disabled: %s", _data_->_tmp15_);
		_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_ = 3;
		g_async_initable_new_async (GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE_PROXY, 0, NULL, gala_session_locker_init_dbus_interfaces_ready, _data_, "g-flags", 0, "g-name", "org.gnome.SessionManager", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/SessionManager/Presence", "g-interface-name", "org.gnome.SessionManager.Presence", NULL);
		return FALSE;
		_state_3:
		_data_->_tmp17_ = (GalaSessionLockerSessionPresence*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp16_ = (GalaSessionLockerSessionPresence*) _data_->_tmp17_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_data_->_tmp18_ = _data_->_tmp16_;
		_data_->_tmp16_ = NULL;
		_g_object_unref0 (_data_->self->priv->session_presence);
		_data_->self->priv->session_presence = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->self->priv->session_presence;
		_data_->_tmp20_ = gala_session_locker_session_presence_get_status (_data_->_tmp19_);
		_data_->_tmp21_ = _data_->_tmp20_;
		gala_session_locker_on_status_changed (_data_->self, _data_->_tmp21_);
		_data_->_tmp22_ = _data_->self->priv->session_presence;
		g_signal_connect_object (_data_->_tmp22_, "status-changed", (GCallback) ____lambda78__gala_session_locker_session_presence_status_changed, _data_->self, 0);
		_g_object_unref0 (_data_->_tmp16_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->success = FALSE;
		_data_->_tmp23_ = _data_->_vala1_e;
		_data_->_tmp24_ = _data_->_tmp23_->message;
		g_critical ("SessionLocker.vala:169: Unable to connect to session presence bus, scr" \
"een locking disabled: %s", _data_->_tmp24_);
		_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_->_tmp25_ = g_getenv ("XDG_SEAT_PATH");
	_data_->_tmp26_ = g_strdup (_data_->_tmp25_);
	_data_->seat_path = _data_->_tmp26_;
	_data_->_tmp27_ = _data_->seat_path;
	if (_data_->_tmp27_ != NULL) {
		{
			_data_->_tmp29_ = _data_->seat_path;
			_data_->_state_ = 4;
			g_async_initable_new_async (GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT_PROXY, 0, NULL, gala_session_locker_init_dbus_interfaces_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.DisplayManager", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", _data_->_tmp29_, "g-interface-name", "org.freedesktop.DisplayManager.Seat", NULL);
			return FALSE;
			_state_4:
			_data_->_tmp30_ = (GalaSessionLockerDisplayManagerSeat*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
			_data_->_tmp28_ = (GalaSessionLockerDisplayManagerSeat*) _data_->_tmp30_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch2_g_error;
			}
			_data_->_tmp31_ = _data_->_tmp28_;
			_data_->_tmp28_ = NULL;
			_g_object_unref0 (_data_->self->priv->display_manager);
			_data_->self->priv->display_manager = _data_->_tmp31_;
			_g_object_unref0 (_data_->_tmp28_);
		}
		goto __finally2;
		__catch2_g_error:
		{
			g_clear_error (&_data_->_inner_error0_);
			_data_->success = FALSE;
			g_critical ("SessionLocker.vala:179: Unable to connect to display manager bus, scre" \
"en locking disabled");
		}
		__finally2:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->seat_path);
			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;
		}
	} else {
		_data_->success = FALSE;
		g_critical ("SessionLocker.vala:183: XDG_SEAT_PATH unset, screen locking disabled");
	}
	_data_->self->priv->connected_to_buses = _data_->success;
	_g_free0 (_data_->seat_path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gala_session_locker_expand_to_screen_size (GalaSessionLocker* self)
{
	gint screen_width = 0;
	gint screen_height = 0;
	GalaWindowManager* _tmp0_;
	MetaDisplay* _tmp1_;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_wm;
	_tmp1_ = meta_plugin_get_display ((MetaPlugin*) _tmp0_);
	meta_display_get_size (_tmp1_, &_tmp2_, &_tmp3_);
	screen_width = _tmp2_;
	screen_height = _tmp3_;
	clutter_actor_set_width ((ClutterActor*) self, (gfloat) screen_width);
	clutter_actor_set_height ((ClutterActor*) self, (gfloat) screen_height);
}

static void
gala_session_locker_prepare_for_sleep (GalaSessionLocker* self,
                                       gboolean about_to_suspend)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->connected_to_buses) {
		return;
	}
	if (about_to_suspend) {
		GSettings* _tmp0_;
		_tmp0_ = self->priv->gala_settings;
		if (g_settings_get_boolean (_tmp0_, GALA_SESSION_LOCKER_LOCK_ON_SUSPEND_KEY)) {
			g_debug ("SessionLocker.vala:203: about to sleep, locking screen");
			gala_session_locker_lock (self, FALSE);
		}
	} else {
		g_debug ("SessionLocker.vala:207: resumed from suspend, waking screen");
		gala_session_locker_on_user_became_active (self);
		gala_session_locker_expand_to_screen_size (self);
	}
}

static void
gala_session_locker_on_status_changed (GalaSessionLocker* self,
                                       GalaSessionLockerPresenceStatus status)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (status != GALA_SESSION_LOCKER_PRESENCE_STATUS_IDLE) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !self->priv->connected_to_buses;
	}
	if (_tmp0_) {
		return;
	}
	g_debug ("SessionLocker.vala:219: session became idle, activating screensaver");
	gala_session_locker_activate (self, TRUE, GALA_SESSION_LOCKER_LONG_ANIMATION_TIME);
}

static void
gala_session_locker_sync_inhibitor (GalaSessionLocker* self)
{
	gboolean lock_enabled = FALSE;
	GSettings* _tmp0_;
	gboolean lock_prohibited = FALSE;
	GSettings* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GalaSessionLockerLoginSessionManager* _tmp6_;
	gboolean inhibit = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (!self->priv->connected_to_buses) {
		return;
	}
	_tmp0_ = self->priv->gala_settings;
	lock_enabled = g_settings_get_boolean (_tmp0_, GALA_SESSION_LOCKER_LOCK_ON_SUSPEND_KEY);
	_tmp1_ = self->priv->lockdown_settings;
	lock_prohibited = g_settings_get_boolean (_tmp1_, GALA_SESSION_LOCKER_LOCK_PROHIBITED_KEY);
	_tmp6_ = self->priv->login_session;
	if (_tmp6_ != NULL) {
		GalaSessionLockerLoginSessionManager* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->login_session;
		_tmp8_ = gala_session_locker_login_session_manager_get_active (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp5_ = _tmp9_;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		gboolean _tmp10_;
		_tmp10_ = self->priv->_active;
		_tmp4_ = !_tmp10_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = lock_enabled;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = !lock_prohibited;
	} else {
		_tmp2_ = FALSE;
	}
	inhibit = _tmp2_;
	if (inhibit) {
		{
			GUnixInputStream* new_inhibitor = NULL;
			GalaSessionLockerLoginManager* _tmp11_;
			GUnixInputStream* _tmp12_;
			GUnixInputStream* _tmp13_;
			GUnixInputStream* _tmp15_;
			GUnixInputStream* _tmp16_;
			_tmp11_ = self->priv->login_manager;
			_tmp12_ = gala_session_locker_login_manager_inhibit (_tmp11_, "sleep", "Pantheon", "Pantheon needs to lock the screen", "delay", &_inner_error0_);
			new_inhibitor = _tmp12_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp13_ = self->priv->inhibitor;
			if (_tmp13_ != NULL) {
				GUnixInputStream* _tmp14_;
				_tmp14_ = self->priv->inhibitor;
				g_input_stream_close ((GInputStream*) _tmp14_, NULL, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (new_inhibitor);
					goto __catch0_g_error;
				}
				_g_object_unref0 (self->priv->inhibitor);
				self->priv->inhibitor = NULL;
			}
			_tmp15_ = new_inhibitor;
			_tmp16_ = _g_object_ref0 (_tmp15_);
			_g_object_unref0 (self->priv->inhibitor);
			self->priv->inhibitor = _tmp16_;
			_g_object_unref0 (new_inhibitor);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp17_;
			const gchar* _tmp18_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp17_ = e;
			_tmp18_ = _tmp17_->message;
			g_warning ("SessionLocker.vala:244: Unable to inhibit sleep, may be unable to lock" \
" before sleep starts: %s", _tmp18_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	} else {
		GUnixInputStream* _tmp19_;
		_tmp19_ = self->priv->inhibitor;
		if (_tmp19_ != NULL) {
			{
				GUnixInputStream* _tmp20_;
				_tmp20_ = self->priv->inhibitor;
				g_input_stream_close ((GInputStream*) _tmp20_, NULL, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch1_g_error;
				}
			}
			goto __finally1;
			__catch1_g_error:
			{
				GError* e = NULL;
				GError* _tmp21_;
				const gchar* _tmp22_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp21_ = e;
				_tmp22_ = _tmp21_->message;
				g_warning ("SessionLocker.vala:251: Unable to remove sleep inhibitor: %s", _tmp22_);
				_g_error_free0 (e);
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
			_g_object_unref0 (self->priv->inhibitor);
			self->priv->inhibitor = NULL;
		}
	}
}

static void
gala_session_locker_on_user_became_active (GalaSessionLocker* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (!self->priv->connected_to_buses) {
		return;
	}
	_tmp1_ = self->priv->_is_locked;
	if (_tmp1_) {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_in_greeter;
		_tmp0_ = !_tmp2_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_debug ("SessionLocker.vala:266: user became active, switching to greeter");
		gala_session_locker_cancel_animation (self);
		{
			GalaSessionLockerDisplayManagerSeat* _tmp3_;
			_tmp3_ = self->priv->display_manager;
			gala_session_locker_display_manager_seat_switch_to_greeter (_tmp3_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			gala_session_locker_set_in_greeter (self, TRUE);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp4_ = e;
			_tmp5_ = _tmp4_->message;
			g_critical ("SessionLocker.vala:272: Unable to switch to greeter to unlock: %s", _tmp5_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	} else {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_is_locked;
		if (!_tmp6_) {
			g_debug ("SessionLocker.vala:276: user became active in unlocked session, closin" \
"g screensaver");
			gala_session_locker_deactivate (self, FALSE);
		}
	}
}

static GalaSessionLockerLoginSessionManager*
gala_session_locker_get_current_session_manager (GalaSessionLocker* self,
                                                 GError** error)
{
	gchar* session_id = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp12_;
	char* session_path = NULL;
	GalaSessionLockerLoginManager* _tmp13_;
	const gchar* _tmp14_;
	char* _tmp15_;
	GalaSessionLockerLoginSessionManager* _tmp16_ = NULL;
	const char* _tmp17_;
	GalaSessionLockerLoginSessionManager* _tmp18_;
	GalaSessionLockerLoginSessionManager* _tmp19_;
	GError* _inner_error0_ = NULL;
	GalaSessionLockerLoginSessionManager* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_getenv ("XDG_SESSION_ID");
	_tmp1_ = g_strdup (_tmp0_);
	session_id = _tmp1_;
	_tmp2_ = session_id;
	if (_tmp2_ == NULL) {
		GalaSessionLockerLoginUserManager* _tmp3_;
		GalaSessionLockerLoginDisplay* login_display = NULL;
		GalaSessionLockerLoginUserManager* _tmp4_;
		GalaSessionLockerLoginDisplay* _tmp5_;
		GalaSessionLockerLoginDisplay* _tmp6_;
		GalaSessionLockerLoginDisplay* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		GalaSessionLockerLoginDisplay* _tmp10_;
		const char* _tmp11_;
		g_debug ("SessionLocker.vala:284: Unset XDG_SESSION_ID, asking logind");
		_tmp3_ = self->priv->login_user_manager;
		if (_tmp3_ == NULL) {
			result = NULL;
			_g_free0 (session_id);
			return result;
		}
		_tmp4_ = self->priv->login_user_manager;
		_tmp5_ = gala_session_locker_login_user_manager_get_display (_tmp4_);
		_tmp6_ = _tmp5_;
		login_display = _tmp6_;
		_tmp7_ = login_display;
		_tmp8_ = (*_tmp7_).session;
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (session_id);
		session_id = _tmp9_;
		_tmp10_ = login_display;
		_tmp11_ = (*_tmp10_).objectpath;
		g_debug ("SessionLocker.vala:291: Acquired user %s", (const gchar*) _tmp11_);
		_gala_session_locker_login_display_free0 (login_display);
	}
	_tmp12_ = session_id;
	if (_tmp12_ == NULL) {
		g_critical ("SessionLocker.vala:295: Couldn't get user session, lock and suspend wi" \
"ll be broken");
		result = NULL;
		_g_free0 (session_id);
		return result;
	}
	_tmp13_ = self->priv->login_manager;
	_tmp14_ = session_id;
	_tmp15_ = gala_session_locker_login_manager_get_session (_tmp13_, _tmp14_, &_inner_error0_);
	session_path = _tmp15_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_free0 (session_id);
		return NULL;
	}
	_tmp17_ = session_path;
	_tmp18_ = (GalaSessionLockerLoginSessionManager*) g_initable_new (GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.freedesktop.login1", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", (const gchar*) _tmp17_, "g-interface-name", "org.freedesktop.login1.Session", NULL);
	_tmp16_ = (GalaSessionLockerLoginSessionManager*) _tmp18_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_free0 (session_path);
		_g_free0 (session_id);
		return NULL;
	}
	_tmp19_ = _tmp16_;
	_tmp16_ = NULL;
	result = _tmp19_;
	_g_object_unref0 (_tmp16_);
	_g_free0 (session_path);
	_g_free0 (session_id);
	return result;
}

void
gala_session_locker_lock (GalaSessionLocker* self,
                          gboolean animate)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GSettings* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_is_locked;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !self->priv->connected_to_buses;
	}
	if (_tmp0_) {
		return;
	}
	_tmp2_ = self->priv->lockdown_settings;
	if (g_settings_get_boolean (_tmp2_, GALA_SESSION_LOCKER_LOCK_PROHIBITED_KEY)) {
		g_debug ("SessionLocker.vala:310: Lock prohibited, ignoring lock request");
		return;
	}
	gala_session_locker_set_is_locked (self, TRUE);
	gala_session_locker_activate (self, animate, GALA_SESSION_LOCKER_SHORT_ANIMATION_TIME);
}

void
gala_session_locker_activate (GalaSessionLocker* self,
                              gboolean animate,
                              guint animation_time)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gint64 _tmp3_;
	MetaCursorTracker* tracker = NULL;
	GalaWindowManager* _tmp4_;
	MetaDisplay* _tmp5_;
	MetaCursorTracker* _tmp6_;
	MetaCursorTracker* _tmp7_;
	GalaWindowManager* _tmp8_;
	GalaModalProxy* _tmp9_;
	gboolean _tmp10_ = FALSE;
	g_return_if_fail (self != NULL);
	g_object_get ((ClutterActor*) self, "visible", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !self->priv->connected_to_buses;
	}
	if (_tmp0_) {
		return;
	}
	gala_session_locker_expand_to_screen_size (self);
	_tmp3_ = self->priv->_activation_time;
	if (_tmp3_ == ((gint64) 0)) {
		gala_session_locker_set_activation_time (self, g_get_monotonic_time ());
	}
	_tmp4_ = self->priv->_wm;
	_tmp5_ = meta_plugin_get_display ((MetaPlugin*) _tmp4_);
	_tmp6_ = meta_cursor_tracker_get_for_display (_tmp5_);
	tracker = _tmp6_;
	_tmp7_ = tracker;
	meta_cursor_tracker_set_pointer_visible (_tmp7_, FALSE);
	g_object_set ((ClutterActor*) self, "visible", TRUE, NULL);
	clutter_actor_grab_key_focus ((ClutterActor*) self);
	_tmp8_ = self->priv->_wm;
	_tmp9_ = gala_window_manager_push_modal (_tmp8_, (ClutterActor*) self, TRUE);
	_g_object_unref0 (self->priv->modal_proxy);
	self->priv->modal_proxy = _tmp9_;
	if (meta_prefs_get_gnome_animations ()) {
		_tmp10_ = animate;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		gala_session_locker_animate_and_lock (self, animation_time);
	} else {
		GSettings* _tmp11_;
		_gala_session_locker_set_active (self, TRUE);
		clutter_actor_set_opacity ((ClutterActor*) self, (guint) 255);
		_tmp11_ = self->priv->screensaver_settings;
		if (g_settings_get_boolean (_tmp11_, GALA_SESSION_LOCKER_LOCK_ENABLED_KEY)) {
			gala_session_locker_lock (self, FALSE);
		}
	}
}

static gboolean
__lambda75_ (GalaSessionLocker* self)
{
	GSettings* _tmp0_;
	gboolean result;
	self->priv->animate_id = (guint) 0;
	clutter_actor_restore_easing_state ((ClutterActor*) self);
	_gala_session_locker_set_active (self, TRUE);
	_tmp0_ = self->priv->screensaver_settings;
	if (g_settings_get_boolean (_tmp0_, GALA_SESSION_LOCKER_LOCK_ENABLED_KEY)) {
		gala_session_locker_lock (self, FALSE);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda75__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda75_ ((GalaSessionLocker*) self);
	return result;
}

static void
gala_session_locker_animate_and_lock (GalaSessionLocker* self,
                                      guint animation_time)
{
	g_return_if_fail (self != NULL);
	clutter_actor_set_opacity ((ClutterActor*) self, (guint) 0);
	clutter_actor_save_easing_state ((ClutterActor*) self);
	clutter_actor_set_easing_mode ((ClutterActor*) self, CLUTTER_EASE_OUT_QUAD);
	clutter_actor_set_easing_duration ((ClutterActor*) self, animation_time);
	clutter_actor_set_opacity ((ClutterActor*) self, (guint) 255);
	self->priv->animate_id = g_timeout_add_full (G_PRIORITY_DEFAULT, animation_time, ___lambda75__gsource_func, g_object_ref (self), g_object_unref);
}

static void
gala_session_locker_cancel_animation (GalaSessionLocker* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->animate_id != ((guint) 0)) {
		g_source_remove (self->priv->animate_id);
		self->priv->animate_id = (guint) 0;
		clutter_actor_restore_easing_state ((ClutterActor*) self);
	}
}

void
gala_session_locker_deactivate (GalaSessionLocker* self,
                                gboolean animate)
{
	GalaModalProxy* _tmp0_;
	MetaCursorTracker* tracker = NULL;
	GalaWindowManager* _tmp3_;
	MetaDisplay* _tmp4_;
	MetaCursorTracker* _tmp5_;
	MetaCursorTracker* _tmp6_;
	g_return_if_fail (self != NULL);
	if (!self->priv->connected_to_buses) {
		return;
	}
	gala_session_locker_cancel_animation (self);
	gala_session_locker_set_is_locked (self, FALSE);
	_tmp0_ = self->priv->modal_proxy;
	if (_tmp0_ != NULL) {
		GalaWindowManager* _tmp1_;
		GalaModalProxy* _tmp2_;
		_tmp1_ = self->priv->_wm;
		_tmp2_ = self->priv->modal_proxy;
		gala_window_manager_pop_modal (_tmp1_, _tmp2_);
		_g_object_unref0 (self->priv->modal_proxy);
		self->priv->modal_proxy = NULL;
	}
	_tmp3_ = self->priv->_wm;
	_tmp4_ = meta_plugin_get_display ((MetaPlugin*) _tmp3_);
	_tmp5_ = meta_cursor_tracker_get_for_display (_tmp4_);
	tracker = _tmp5_;
	_tmp6_ = tracker;
	meta_cursor_tracker_set_pointer_visible (_tmp6_, TRUE);
	g_object_set ((ClutterActor*) self, "visible", FALSE, NULL);
	gala_session_locker_set_activation_time (self, (gint64) 0);
	_gala_session_locker_set_active (self, FALSE);
}

static void
_gala_session_locker_set_active (GalaSessionLocker* self,
                                 gboolean new_active)
{
	gboolean prev_is_active = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (!self->priv->connected_to_buses) {
		return;
	}
	_tmp0_ = self->priv->_active;
	prev_is_active = _tmp0_;
	gala_session_locker_set_active (self, new_active);
	_tmp1_ = self->priv->_active;
	if (prev_is_active != _tmp1_) {
		g_signal_emit (self, gala_session_locker_signals[GALA_SESSION_LOCKER_ACTIVE_CHANGED_SIGNAL], 0);
	}
	{
		GalaSessionLockerLoginSessionManager* _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = self->priv->login_session;
		_tmp3_ = self->priv->_active;
		gala_session_locker_login_session_manager_set_locked_hint (_tmp2_, _tmp3_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		g_warning ("SessionLocker.vala:433: Unable to set locked hint on login session: %s", _tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	gala_session_locker_sync_inhibitor (self);
}

gboolean
gala_session_locker_get_active (GalaSessionLocker* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

static void
gala_session_locker_set_active (GalaSessionLocker* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_session_locker_get_active (self);
	if (old_value != value) {
		self->priv->_active = value;
		g_object_notify_by_pspec ((GObject *) self, gala_session_locker_properties[GALA_SESSION_LOCKER_ACTIVE_PROPERTY]);
	}
}

gboolean
gala_session_locker_get_is_locked (GalaSessionLocker* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_locked;
	return result;
}

static void
gala_session_locker_set_is_locked (GalaSessionLocker* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_session_locker_get_is_locked (self);
	if (old_value != value) {
		self->priv->_is_locked = value;
		g_object_notify_by_pspec ((GObject *) self, gala_session_locker_properties[GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY]);
	}
}

gboolean
gala_session_locker_get_in_greeter (GalaSessionLocker* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_in_greeter;
	return result;
}

static void
gala_session_locker_set_in_greeter (GalaSessionLocker* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_session_locker_get_in_greeter (self);
	if (old_value != value) {
		self->priv->_in_greeter = value;
		g_object_notify_by_pspec ((GObject *) self, gala_session_locker_properties[GALA_SESSION_LOCKER_IN_GREETER_PROPERTY]);
	}
}

gint64
gala_session_locker_get_activation_time (GalaSessionLocker* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, 0LL);
	result = self->priv->_activation_time;
	return result;
}

static void
gala_session_locker_set_activation_time (GalaSessionLocker* self,
                                         gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_session_locker_get_activation_time (self);
	if (old_value != value) {
		self->priv->_activation_time = value;
		g_object_notify_by_pspec ((GObject *) self, gala_session_locker_properties[GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY]);
	}
}

GalaWindowManager*
gala_session_locker_get_wm (GalaSessionLocker* self)
{
	GalaWindowManager* result;
	GalaWindowManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_wm;
	result = _tmp0_;
	return result;
}

static void
gala_session_locker_set_wm (GalaSessionLocker* self,
                            GalaWindowManager* value)
{
	GalaWindowManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_session_locker_get_wm (self);
	if (old_value != value) {
		GalaWindowManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_wm);
		self->priv->_wm = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_session_locker_properties[GALA_SESSION_LOCKER_WM_PROPERTY]);
	}
}

char*
gala_session_locker_login_manager_get_session (GalaSessionLockerLoginManager* self,
                                               const gchar* session_id,
                                               GError** error)
{
	GalaSessionLockerLoginManagerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GALA_SESSION_LOCKER_LOGIN_MANAGER_GET_INTERFACE (self);
	if (_iface_->get_session) {
		return _iface_->get_session (self, session_id, error);
	}
	return NULL;
}

GUnixInputStream*
gala_session_locker_login_manager_inhibit (GalaSessionLockerLoginManager* self,
                                           const gchar* what,
                                           const gchar* who,
                                           const gchar* why,
                                           const gchar* mode,
                                           GError** error)
{
	GalaSessionLockerLoginManagerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GALA_SESSION_LOCKER_LOGIN_MANAGER_GET_INTERFACE (self);
	if (_iface_->inhibit) {
		return _iface_->inhibit (self, what, who, why, mode, error);
	}
	return NULL;
}

static void
gala_session_locker_login_manager_default_init (GalaSessionLockerLoginManagerIface * iface,
                                                gpointer iface_data)
{
	gala_session_locker_login_manager_signals[GALA_SESSION_LOCKER_LOGIN_MANAGER_PREPARE_FOR_SLEEP_SIGNAL] = g_signal_new ("prepare-for-sleep", GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_login_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerLoginManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_login_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_session_locker_login_manager_type_id;
	gala_session_locker_login_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaSessionLockerLoginManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_session_locker_login_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_session_locker_login_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_session_locker_login_manager_proxy_get_type);
	g_type_set_qdata (gala_session_locker_login_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (gala_session_locker_login_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_session_locker_login_manager_dbus_interface_info));
	g_type_set_qdata (gala_session_locker_login_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_session_locker_login_manager_register_object);
	return gala_session_locker_login_manager_type_id;
}

static GType
gala_session_locker_login_manager_get_type (void)
{
	static gsize gala_session_locker_login_manager_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_login_manager_type_id__once)) {
		GType gala_session_locker_login_manager_type_id;
		gala_session_locker_login_manager_type_id = gala_session_locker_login_manager_get_type_once ();
		g_once_init_leave (&gala_session_locker_login_manager_type_id__once, gala_session_locker_login_manager_type_id);
	}
	return gala_session_locker_login_manager_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaSessionLockerLoginManagerProxy, gala_session_locker_login_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_SESSION_LOCKER_TYPE_LOGIN_MANAGER, gala_session_locker_login_manager_proxy_gala_session_locker_login_manager_interface_init) )
static void
gala_session_locker_login_manager_proxy_class_init (GalaSessionLockerLoginManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_session_locker_login_manager_proxy_g_signal;
}

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

static void
gala_session_locker_login_manager_proxy_g_signal (GDBusProxy* proxy,
                                                  const gchar* sender_name,
                                                  const gchar* signal_name,
                                                  GVariant* parameters)
{
	if (strcmp (signal_name, "PrepareForSleep") == 0) {
		_dbus_handle_gala_session_locker_login_manager_prepare_for_sleep ((GalaSessionLockerLoginManager*) proxy, parameters);
	}
}

static void
gala_session_locker_login_manager_proxy_init (GalaSessionLockerLoginManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_session_locker_login_manager_dbus_interface_info));
}

static char*
gala_session_locker_login_manager_proxy_get_session (GalaSessionLockerLoginManager* self,
                                                     const gchar* session_id,
                                                     GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	char* _result = NULL;
	GVariant* _tmp1_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.login1.Manager", "GetSession");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (session_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp1_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp1_, NULL);
	g_variant_unref (_tmp1_);
	g_object_unref (_reply_message);
	return _result;
}

static GUnixInputStream*
gala_session_locker_login_manager_proxy_inhibit (GalaSessionLockerLoginManager* self,
                                                 const gchar* what,
                                                 const gchar* who,
                                                 const gchar* why,
                                                 const gchar* mode,
                                                 GError** error)
{
	GUnixFDList* _fd_list;
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	gint _fd_index = 0;
	gint _fd;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GUnixInputStream* _result = NULL;
	_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", "Inhibit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_fd_list = g_unix_fd_list_new ();
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (what));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (who));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (why));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (mode));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	g_dbus_message_set_unix_fd_list (_message, _fd_list);
	g_object_unref (_fd_list);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_fd_list = g_dbus_message_get_unix_fd_list (_reply_message);
	if (_fd_list) {
		g_variant_iter_next (&_reply_iter, "h", &_fd_index);
		_fd = g_unix_fd_list_get (_fd_list, _fd_index, error);
		if (_fd >= 0) {
			_result = (GUnixInputStream *) g_unix_input_stream_new (_fd, TRUE);
		}
	} else {
		g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "FD List is NULL");
	}
	if (error && (*error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	g_object_unref (_reply_message);
	return _result;
}

static void
gala_session_locker_login_manager_proxy_gala_session_locker_login_manager_interface_init (GalaSessionLockerLoginManagerIface* iface)
{
	iface->get_session = gala_session_locker_login_manager_proxy_get_session;
	iface->inhibit = gala_session_locker_login_manager_proxy_inhibit;
}

static void
_dbus_gala_session_locker_login_manager_get_session (GalaSessionLockerLoginManager* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* session_id = NULL;
	GVariant* _tmp2_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	char* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	session_id = g_variant_dup_string (_tmp2_, NULL);
	g_variant_unref (_tmp2_);
	result = gala_session_locker_login_manager_get_session (self, session_id, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_object_path (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (session_id);
	;
}

static void
_dbus_gala_session_locker_login_manager_inhibit (GalaSessionLockerLoginManager* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation)
{
	GUnixFDList* _fd_list;
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gint _fd_index = 0;
	gint _fd;
	gchar* what = NULL;
	GVariant* _tmp3_;
	gchar* who = NULL;
	GVariant* _tmp4_;
	gchar* why = NULL;
	GVariant* _tmp5_;
	gchar* mode = NULL;
	GVariant* _tmp6_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GUnixInputStream* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	what = g_variant_dup_string (_tmp3_, NULL);
	g_variant_unref (_tmp3_);
	_tmp4_ = g_variant_iter_next_value (&_arguments_iter);
	who = g_variant_dup_string (_tmp4_, NULL);
	g_variant_unref (_tmp4_);
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	why = g_variant_dup_string (_tmp5_, NULL);
	g_variant_unref (_tmp5_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	mode = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	result = gala_session_locker_login_manager_inhibit (self, what, who, why, mode, &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);
	_fd_list = g_unix_fd_list_new ();
	g_variant_builder_add (&_reply_builder, "h", g_unix_fd_list_append (_fd_list, g_unix_input_stream_get_fd (result), NULL));
	_g_object_unref0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_message_set_unix_fd_list (_reply_message, _fd_list);
	g_object_unref (_fd_list);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (what);
	_g_free0 (who);
	_g_free0 (why);
	_g_free0 (mode);
	;
}

static void
gala_session_locker_login_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, "GetSession") == 0) {
		_dbus_gala_session_locker_login_manager_get_session (object, parameters, invocation);
	} else if (strcmp (method_name, "Inhibit") == 0) {
		_dbus_gala_session_locker_login_manager_inhibit (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
gala_session_locker_login_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
gala_session_locker_login_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

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

static guint
gala_session_locker_login_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 *) (&_gala_session_locker_login_manager_dbus_interface_info), &_gala_session_locker_login_manager_dbus_interface_vtable, data, _gala_session_locker_login_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "prepare-for-sleep", (GCallback) _dbus_gala_session_locker_login_manager_prepare_for_sleep, data);
	return result;
}

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

void
gala_session_locker_login_session_manager_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                           gboolean locked,
                                                           GError** error)
{
	GalaSessionLockerLoginSessionManagerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->set_locked_hint) {
		_iface_->set_locked_hint (self, locked, error);
	}
}

 G_GNUC_INTERNAL gboolean
gala_session_locker_login_session_manager_get_active (GalaSessionLockerLoginSessionManager* self)
{
	GalaSessionLockerLoginSessionManagerIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->get_active) {
		return _iface_->get_active (self);
	}
	return FALSE;
}

static void
gala_session_locker_login_session_manager_default_init (GalaSessionLockerLoginSessionManagerIface * iface,
                                                        gpointer iface_data)
{
	gala_session_locker_login_session_manager_signals[GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_LOCK_SIGNAL] = g_signal_new ("lock", GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gala_session_locker_login_session_manager_signals[GALA_SESSION_LOCKER_LOGIN_SESSION_MANAGER_UNLOCK_SIGNAL] = g_signal_new ("unlock", GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_login_session_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerLoginSessionManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_login_session_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_session_locker_login_session_manager_type_id;
	gala_session_locker_login_session_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaSessionLockerLoginSessionManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_session_locker_login_session_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_session_locker_login_session_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_session_locker_login_session_manager_proxy_get_type);
	g_type_set_qdata (gala_session_locker_login_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Session");
	g_type_set_qdata (gala_session_locker_login_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_session_locker_login_session_manager_dbus_interface_info));
	g_type_set_qdata (gala_session_locker_login_session_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_session_locker_login_session_manager_register_object);
	return gala_session_locker_login_session_manager_type_id;
}

static GType
gala_session_locker_login_session_manager_get_type (void)
{
	static gsize gala_session_locker_login_session_manager_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_login_session_manager_type_id__once)) {
		GType gala_session_locker_login_session_manager_type_id;
		gala_session_locker_login_session_manager_type_id = gala_session_locker_login_session_manager_get_type_once ();
		g_once_init_leave (&gala_session_locker_login_session_manager_type_id__once, gala_session_locker_login_session_manager_type_id);
	}
	return gala_session_locker_login_session_manager_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaSessionLockerLoginSessionManagerProxy, gala_session_locker_login_session_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_SESSION_LOCKER_TYPE_LOGIN_SESSION_MANAGER, gala_session_locker_login_session_manager_proxy_gala_session_locker_login_session_manager_interface_init) )
static void
gala_session_locker_login_session_manager_proxy_class_init (GalaSessionLockerLoginSessionManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_session_locker_login_session_manager_proxy_g_signal;
}

static void
_dbus_handle_gala_session_locker_login_session_manager_lock (GalaSessionLockerLoginSessionManager* self,
                                                             GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "lock");
}

static void
_dbus_handle_gala_session_locker_login_session_manager_unlock (GalaSessionLockerLoginSessionManager* self,
                                                               GVariant* parameters)
{
	GVariantIter _arguments_iter;
	g_variant_iter_init (&_arguments_iter, parameters);
	g_signal_emit_by_name (self, "unlock");
}

static void
gala_session_locker_login_session_manager_proxy_g_signal (GDBusProxy* proxy,
                                                          const gchar* sender_name,
                                                          const gchar* signal_name,
                                                          GVariant* parameters)
{
	if (strcmp (signal_name, "Lock") == 0) {
		_dbus_handle_gala_session_locker_login_session_manager_lock ((GalaSessionLockerLoginSessionManager*) proxy, parameters);
	} else if (strcmp (signal_name, "Unlock") == 0) {
		_dbus_handle_gala_session_locker_login_session_manager_unlock ((GalaSessionLockerLoginSessionManager*) proxy, parameters);
	}
}

static void
gala_session_locker_login_session_manager_proxy_init (GalaSessionLockerLoginSessionManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_session_locker_login_session_manager_dbus_interface_info));
}

static void
gala_session_locker_login_session_manager_proxy_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                                 gboolean locked,
                                                                 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.Session", "SetLockedHint");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (locked));
	_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 gboolean
gala_session_locker_login_session_manager_dbus_proxy_get_active (GalaSessionLockerLoginSessionManager* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Active");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.login1.Session"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Active"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp7_ = FALSE;
			return _tmp7_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
gala_session_locker_login_session_manager_proxy_gala_session_locker_login_session_manager_interface_init (GalaSessionLockerLoginSessionManagerIface* iface)
{
	iface->set_locked_hint = gala_session_locker_login_session_manager_proxy_set_locked_hint;
	iface->get_active = gala_session_locker_login_session_manager_dbus_proxy_get_active;
}

static void
_dbus_gala_session_locker_login_session_manager_set_locked_hint (GalaSessionLockerLoginSessionManager* self,
                                                                 GVariant* _parameters_,
                                                                 GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean locked = FALSE;
	GVariant* _tmp8_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	locked = g_variant_get_boolean (_tmp8_);
	g_variant_unref (_tmp8_);
	gala_session_locker_login_session_manager_set_locked_hint (self, locked, &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
gala_session_locker_login_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, "SetLockedHint") == 0) {
		_dbus_gala_session_locker_login_session_manager_set_locked_hint (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_gala_session_locker_login_session_manager_get_active (GalaSessionLockerLoginSessionManager* self)
{
	gboolean result;
	GVariant* _reply;
	result = gala_session_locker_login_session_manager_get_active (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
gala_session_locker_login_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Active") == 0) {
		return _dbus_gala_session_locker_login_session_manager_get_active (object);
	}
	return NULL;
}

static gboolean
gala_session_locker_login_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_gala_session_locker_login_session_manager_lock (GObject* _sender,
                                                      gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.login1.Session", "Lock", _arguments, NULL);
}

static void
_dbus_gala_session_locker_login_session_manager_unlock (GObject* _sender,
                                                        gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.login1.Session", "Unlock", _arguments, NULL);
}

static guint
gala_session_locker_login_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 *) (&_gala_session_locker_login_session_manager_dbus_interface_info), &_gala_session_locker_login_session_manager_dbus_interface_vtable, data, _gala_session_locker_login_session_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "lock", (GCallback) _dbus_gala_session_locker_login_session_manager_lock, data);
	g_signal_connect (object, "unlock", (GCallback) _dbus_gala_session_locker_login_session_manager_unlock, data);
	return result;
}

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

 G_GNUC_INTERNAL GalaSessionLockerLoginDisplay*
gala_session_locker_login_user_manager_get_display (GalaSessionLockerLoginUserManager* self)
{
	GalaSessionLockerLoginUserManagerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GALA_SESSION_LOCKER_LOGIN_USER_MANAGER_GET_INTERFACE (self);
	if (_iface_->get_display) {
		return _iface_->get_display (self);
	}
	return NULL;
}

static void
gala_session_locker_login_user_manager_default_init (GalaSessionLockerLoginUserManagerIface * iface,
                                                     gpointer iface_data)
{
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_login_user_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerLoginUserManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_login_user_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_session_locker_login_user_manager_type_id;
	gala_session_locker_login_user_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaSessionLockerLoginUserManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_session_locker_login_user_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_session_locker_login_user_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_session_locker_login_user_manager_proxy_get_type);
	g_type_set_qdata (gala_session_locker_login_user_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.User");
	g_type_set_qdata (gala_session_locker_login_user_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_session_locker_login_user_manager_dbus_interface_info));
	g_type_set_qdata (gala_session_locker_login_user_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_session_locker_login_user_manager_register_object);
	return gala_session_locker_login_user_manager_type_id;
}

static GType
gala_session_locker_login_user_manager_get_type (void)
{
	static gsize gala_session_locker_login_user_manager_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_login_user_manager_type_id__once)) {
		GType gala_session_locker_login_user_manager_type_id;
		gala_session_locker_login_user_manager_type_id = gala_session_locker_login_user_manager_get_type_once ();
		g_once_init_leave (&gala_session_locker_login_user_manager_type_id__once, gala_session_locker_login_user_manager_type_id);
	}
	return gala_session_locker_login_user_manager_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaSessionLockerLoginUserManagerProxy, gala_session_locker_login_user_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_SESSION_LOCKER_TYPE_LOGIN_USER_MANAGER, gala_session_locker_login_user_manager_proxy_gala_session_locker_login_user_manager_interface_init) )
static void
gala_session_locker_login_user_manager_proxy_class_init (GalaSessionLockerLoginUserManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_session_locker_login_user_manager_proxy_g_signal;
}

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

static void
gala_session_locker_login_user_manager_proxy_init (GalaSessionLockerLoginUserManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_session_locker_login_user_manager_dbus_interface_info));
}

static GalaSessionLockerLoginDisplay*
gala_session_locker_login_user_manager_dbus_proxy_get_display (GalaSessionLockerLoginUserManager* self)
{
	GVariant *_inner_reply;
	GalaSessionLockerLoginDisplay* _result;
	GalaSessionLockerLoginDisplay _tmp9_;
	GVariantIter _tmp10_;
	GVariant* _tmp11_;
	GVariant* _tmp12_;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Display");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.login1.User"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Display"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	g_variant_iter_init (&_tmp10_, _inner_reply);
	_tmp11_ = g_variant_iter_next_value (&_tmp10_);
	_tmp9_.session = g_variant_dup_string (_tmp11_, NULL);
	g_variant_unref (_tmp11_);
	_tmp12_ = g_variant_iter_next_value (&_tmp10_);
	_tmp9_.objectpath = g_variant_dup_string (_tmp12_, NULL);
	g_variant_unref (_tmp12_);
	_result = g_memdup2 (&_tmp9_, sizeof (GalaSessionLockerLoginDisplay));
	g_variant_unref (_inner_reply);
	return _result;
}

static void
gala_session_locker_login_user_manager_proxy_gala_session_locker_login_user_manager_interface_init (GalaSessionLockerLoginUserManagerIface* iface)
{
	iface->get_display = gala_session_locker_login_user_manager_dbus_proxy_get_display;
}

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

static GVariant*
_dbus_gala_session_locker_login_user_manager_get_display (GalaSessionLockerLoginUserManager* self)
{
	GalaSessionLockerLoginDisplay* result;
	GVariant* _reply;
	GVariantBuilder _tmp13_;
	result = gala_session_locker_login_user_manager_get_display (self);
	g_variant_builder_init (&_tmp13_, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_tmp13_, g_variant_new_string ((*result).session));
	g_variant_builder_add_value (&_tmp13_, g_variant_new_object_path ((*result).objectpath));
	_reply = g_variant_builder_end (&_tmp13_);
	_gala_session_locker_login_display_free0 (result);
	return _reply;
}

static GVariant*
gala_session_locker_login_user_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Display") == 0) {
		return _dbus_gala_session_locker_login_user_manager_get_display (object);
	}
	return NULL;
}

static gboolean
gala_session_locker_login_user_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)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static guint
gala_session_locker_login_user_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 *) (&_gala_session_locker_login_user_manager_dbus_interface_info), &_gala_session_locker_login_user_manager_dbus_interface_vtable, data, _gala_session_locker_login_user_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

 G_GNUC_INTERNAL GalaSessionLockerPresenceStatus
gala_session_locker_session_presence_get_status (GalaSessionLockerSessionPresence* self)
{
	GalaSessionLockerSessionPresenceIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = GALA_SESSION_LOCKER_SESSION_PRESENCE_GET_INTERFACE (self);
	if (_iface_->get_status) {
		return _iface_->get_status (self);
	}
	return 0;
}

static void
gala_session_locker_session_presence_default_init (GalaSessionLockerSessionPresenceIface * iface,
                                                   gpointer iface_data)
{
	gala_session_locker_session_presence_signals[GALA_SESSION_LOCKER_SESSION_PRESENCE_STATUS_CHANGED_SIGNAL] = g_signal_new ("status-changed", GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__ENUM, G_TYPE_NONE, 1, GALA_SESSION_LOCKER_TYPE_PRESENCE_STATUS);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_session_presence_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerSessionPresenceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_session_presence_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_session_locker_session_presence_type_id;
	gala_session_locker_session_presence_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaSessionLockerSessionPresence", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_session_locker_session_presence_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_session_locker_session_presence_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_session_locker_session_presence_proxy_get_type);
	g_type_set_qdata (gala_session_locker_session_presence_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.SessionManager.Presence");
	g_type_set_qdata (gala_session_locker_session_presence_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_session_locker_session_presence_dbus_interface_info));
	g_type_set_qdata (gala_session_locker_session_presence_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_session_locker_session_presence_register_object);
	return gala_session_locker_session_presence_type_id;
}

static GType
gala_session_locker_session_presence_get_type (void)
{
	static gsize gala_session_locker_session_presence_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_session_presence_type_id__once)) {
		GType gala_session_locker_session_presence_type_id;
		gala_session_locker_session_presence_type_id = gala_session_locker_session_presence_get_type_once ();
		g_once_init_leave (&gala_session_locker_session_presence_type_id__once, gala_session_locker_session_presence_type_id);
	}
	return gala_session_locker_session_presence_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaSessionLockerSessionPresenceProxy, gala_session_locker_session_presence_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_SESSION_LOCKER_TYPE_SESSION_PRESENCE, gala_session_locker_session_presence_proxy_gala_session_locker_session_presence_interface_init) )
static void
gala_session_locker_session_presence_proxy_class_init (GalaSessionLockerSessionPresenceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_session_locker_session_presence_proxy_g_signal;
}

static void
_dbus_handle_gala_session_locker_session_presence_status_changed (GalaSessionLockerSessionPresence* self,
                                                                  GVariant* parameters)
{
	GVariantIter _arguments_iter;
	GalaSessionLockerPresenceStatus new_status = 0;
	GVariant* _tmp14_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	new_status = g_variant_get_uint32 (_tmp14_);
	g_variant_unref (_tmp14_);
	g_signal_emit_by_name (self, "status-changed", new_status);
}

static void
gala_session_locker_session_presence_proxy_g_signal (GDBusProxy* proxy,
                                                     const gchar* sender_name,
                                                     const gchar* signal_name,
                                                     GVariant* parameters)
{
	if (strcmp (signal_name, "StatusChanged") == 0) {
		_dbus_handle_gala_session_locker_session_presence_status_changed ((GalaSessionLockerSessionPresence*) proxy, parameters);
	}
}

static void
gala_session_locker_session_presence_proxy_init (GalaSessionLockerSessionPresenceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_session_locker_session_presence_dbus_interface_info));
}

static GalaSessionLockerPresenceStatus
gala_session_locker_session_presence_dbus_proxy_get_status (GalaSessionLockerSessionPresence* self)
{
	GVariant *_inner_reply;
	GalaSessionLockerPresenceStatus _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Status");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.SessionManager.Presence"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Status"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return 0;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
gala_session_locker_session_presence_proxy_gala_session_locker_session_presence_interface_init (GalaSessionLockerSessionPresenceIface* iface)
{
	iface->get_status = gala_session_locker_session_presence_dbus_proxy_get_status;
}

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

static GVariant*
_dbus_gala_session_locker_session_presence_get_status (GalaSessionLockerSessionPresence* self)
{
	GalaSessionLockerPresenceStatus result;
	GVariant* _reply;
	result = gala_session_locker_session_presence_get_status (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
gala_session_locker_session_presence_dbus_interface_get_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GError** error,
                                                                  gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Status") == 0) {
		return _dbus_gala_session_locker_session_presence_get_status (object);
	}
	return NULL;
}

static gboolean
gala_session_locker_session_presence_dbus_interface_set_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GVariant* value,
                                                                  GError** error,
                                                                  gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_gala_session_locker_session_presence_status_changed (GObject* _sender,
                                                           GalaSessionLockerPresenceStatus new_status,
                                                           gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (new_status));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.SessionManager.Presence", "StatusChanged", _arguments, NULL);
}

static guint
gala_session_locker_session_presence_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 *) (&_gala_session_locker_session_presence_dbus_interface_info), &_gala_session_locker_session_presence_dbus_interface_vtable, data, _gala_session_locker_session_presence_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "status-changed", (GCallback) _dbus_gala_session_locker_session_presence_status_changed, data);
	return result;
}

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

void
gala_session_locker_display_manager_seat_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                            GError** error)
{
	GalaSessionLockerDisplayManagerSeatIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GALA_SESSION_LOCKER_DISPLAY_MANAGER_SEAT_GET_INTERFACE (self);
	if (_iface_->switch_to_greeter) {
		_iface_->switch_to_greeter (self, error);
	}
}

static void
gala_session_locker_display_manager_seat_default_init (GalaSessionLockerDisplayManagerSeatIface * iface,
                                                       gpointer iface_data)
{
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_display_manager_seat_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerDisplayManagerSeatIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_display_manager_seat_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gala_session_locker_display_manager_seat_type_id;
	gala_session_locker_display_manager_seat_type_id = g_type_register_static (G_TYPE_INTERFACE, "GalaSessionLockerDisplayManagerSeat", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gala_session_locker_display_manager_seat_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (gala_session_locker_display_manager_seat_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) gala_session_locker_display_manager_seat_proxy_get_type);
	g_type_set_qdata (gala_session_locker_display_manager_seat_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DisplayManager.Seat");
	g_type_set_qdata (gala_session_locker_display_manager_seat_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_gala_session_locker_display_manager_seat_dbus_interface_info));
	g_type_set_qdata (gala_session_locker_display_manager_seat_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) gala_session_locker_display_manager_seat_register_object);
	return gala_session_locker_display_manager_seat_type_id;
}

static GType
gala_session_locker_display_manager_seat_get_type (void)
{
	static gsize gala_session_locker_display_manager_seat_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_display_manager_seat_type_id__once)) {
		GType gala_session_locker_display_manager_seat_type_id;
		gala_session_locker_display_manager_seat_type_id = gala_session_locker_display_manager_seat_get_type_once ();
		g_once_init_leave (&gala_session_locker_display_manager_seat_type_id__once, gala_session_locker_display_manager_seat_type_id);
	}
	return gala_session_locker_display_manager_seat_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (GalaSessionLockerDisplayManagerSeatProxy, gala_session_locker_display_manager_seat_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (GALA_SESSION_LOCKER_TYPE_DISPLAY_MANAGER_SEAT, gala_session_locker_display_manager_seat_proxy_gala_session_locker_display_manager_seat_interface_init) )
static void
gala_session_locker_display_manager_seat_proxy_class_init (GalaSessionLockerDisplayManagerSeatProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = gala_session_locker_display_manager_seat_proxy_g_signal;
}

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

static void
gala_session_locker_display_manager_seat_proxy_init (GalaSessionLockerDisplayManagerSeatProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_gala_session_locker_display_manager_seat_dbus_interface_info));
}

static void
gala_session_locker_display_manager_seat_proxy_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                                  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.DisplayManager.Seat", "SwitchToGreeter");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
gala_session_locker_display_manager_seat_proxy_gala_session_locker_display_manager_seat_interface_init (GalaSessionLockerDisplayManagerSeatIface* iface)
{
	iface->switch_to_greeter = gala_session_locker_display_manager_seat_proxy_switch_to_greeter;
}

static void
_dbus_gala_session_locker_display_manager_seat_switch_to_greeter (GalaSessionLockerDisplayManagerSeat* self,
                                                                  GVariant* _parameters_,
                                                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	gala_session_locker_display_manager_seat_switch_to_greeter (self, &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
gala_session_locker_display_manager_seat_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, "SwitchToGreeter") == 0) {
		_dbus_gala_session_locker_display_manager_seat_switch_to_greeter (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
gala_session_locker_display_manager_seat_dbus_interface_get_property (GDBusConnection* connection,
                                                                      const gchar* sender,
                                                                      const gchar* object_path,
                                                                      const gchar* interface_name,
                                                                      const gchar* property_name,
                                                                      GError** error,
                                                                      gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
gala_session_locker_display_manager_seat_dbus_interface_set_property (GDBusConnection* connection,
                                                                      const gchar* sender,
                                                                      const gchar* object_path,
                                                                      const gchar* interface_name,
                                                                      const gchar* property_name,
                                                                      GVariant* value,
                                                                      GError** error,
                                                                      gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static guint
gala_session_locker_display_manager_seat_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 *) (&_gala_session_locker_display_manager_seat_dbus_interface_info), &_gala_session_locker_display_manager_seat_dbus_interface_vtable, data, _gala_session_locker_display_manager_seat_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_gala_session_locker_display_manager_seat_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 void
gala_session_locker_login_display_copy (const GalaSessionLockerLoginDisplay* self,
                                        GalaSessionLockerLoginDisplay* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const char* _tmp2_;
	char* _tmp3_;
	_tmp0_ = (*self).session;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).session);
	(*dest).session = _tmp1_;
	_tmp2_ = (*self).objectpath;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).objectpath);
	(*dest).objectpath = _tmp3_;
}

static void
gala_session_locker_login_display_destroy (GalaSessionLockerLoginDisplay* self)
{
	_g_free0 ((*self).session);
	_g_free0 ((*self).objectpath);
}

static GalaSessionLockerLoginDisplay*
gala_session_locker_login_display_dup (const GalaSessionLockerLoginDisplay* self)
{
	GalaSessionLockerLoginDisplay* dup;
	dup = g_new0 (GalaSessionLockerLoginDisplay, 1);
	gala_session_locker_login_display_copy (self, dup);
	return dup;
}

static void
gala_session_locker_login_display_free (GalaSessionLockerLoginDisplay* self)
{
	gala_session_locker_login_display_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_login_display_get_type_once (void)
{
	GType gala_session_locker_login_display_type_id;
	gala_session_locker_login_display_type_id = g_boxed_type_register_static ("GalaSessionLockerLoginDisplay", (GBoxedCopyFunc) gala_session_locker_login_display_dup, (GBoxedFreeFunc) gala_session_locker_login_display_free);
	return gala_session_locker_login_display_type_id;
}

static GType
gala_session_locker_login_display_get_type (void)
{
	static gsize gala_session_locker_login_display_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_login_display_type_id__once)) {
		GType gala_session_locker_login_display_type_id;
		gala_session_locker_login_display_type_id = gala_session_locker_login_display_get_type_once ();
		g_once_init_leave (&gala_session_locker_login_display_type_id__once, gala_session_locker_login_display_type_id);
	}
	return gala_session_locker_login_display_type_id__once;
}

static gboolean
_gala_session_locker___lambda79_ (GalaSessionLocker* self,
                                  ClutterEvent* event)
{
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	gala_session_locker_on_user_became_active (self);
	result = CLUTTER_EVENT_STOP;
	return result;
}

static gboolean
__gala_session_locker___lambda79__clutter_actor_key_press_event (ClutterActor* _sender,
                                                                 ClutterEvent* event,
                                                                 gpointer self)
{
	gboolean result;
	result = _gala_session_locker___lambda79_ ((GalaSessionLocker*) self, event);
	return result;
}

static gboolean
_gala_session_locker___lambda80_ (GalaSessionLocker* self,
                                  ClutterEvent* event)
{
	gboolean result;
	g_return_val_if_fail (event != NULL, FALSE);
	gala_session_locker_on_user_became_active (self);
	result = CLUTTER_EVENT_STOP;
	return result;
}

static gboolean
__gala_session_locker___lambda80__clutter_actor_motion_event (ClutterActor* _sender,
                                                              ClutterEvent* event,
                                                              gpointer self)
{
	gboolean result;
	result = _gala_session_locker___lambda80_ ((GalaSessionLocker*) self, event);
	return result;
}

static ClutterColor*
_vala_clutter_color_from_string (const gchar* str)
{
	ClutterColor* color = NULL;
	ClutterColor* _tmp0_;
	ClutterColor* result;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = clutter_color_alloc ();
	color = _tmp0_;
	clutter_color_from_string (color, str);
	result = color;
	return result;
}

static void
_vala_ClutterColor_free (ClutterColor* self)
{
	g_boxed_free (clutter_color_get_type (), self);
}

static void
_gala_session_locker_expand_to_screen_size_meta_monitor_manager_monitors_changed (MetaMonitorManager* _sender,
                                                                                  gpointer self)
{
	gala_session_locker_expand_to_screen_size ((GalaSessionLocker*) self);
}

static GObject *
gala_session_locker_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GalaSessionLocker * self;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	ClutterColor* _tmp3_;
	ClutterColor* _tmp4_;
	ClutterColor _tmp5_;
	MetaMonitorManager* monitor_manager = NULL;
	GalaWindowManager* _tmp6_;
	MetaDisplay* _tmp7_;
	MetaContext* _tmp8_;
	MetaBackend* _tmp9_;
	MetaMonitorManager* _tmp10_;
	MetaMonitorManager* _tmp11_;
	parent_class = G_OBJECT_CLASS (gala_session_locker_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_SESSION_LOCKER, GalaSessionLocker);
	_tmp0_ = g_settings_new ("org.gnome.desktop.screensaver");
	_g_object_unref0 (self->priv->screensaver_settings);
	self->priv->screensaver_settings = _tmp0_;
	_tmp1_ = g_settings_new ("io.elementary.desktop.screensaver");
	_g_object_unref0 (self->priv->gala_settings);
	self->priv->gala_settings = _tmp1_;
	_tmp2_ = g_settings_new ("org.gnome.desktop.lockdown");
	_g_object_unref0 (self->priv->lockdown_settings);
	self->priv->lockdown_settings = _tmp2_;
	g_object_set ((ClutterActor*) self, "visible", FALSE, NULL);
	clutter_actor_set_reactive ((ClutterActor*) self, TRUE);
	g_signal_connect_object ((ClutterActor*) self, "key-press-event", (GCallback) __gala_session_locker___lambda79__clutter_actor_key_press_event, self, 0);
	g_signal_connect_object ((ClutterActor*) self, "motion-event", (GCallback) __gala_session_locker___lambda80__clutter_actor_motion_event, self, 0);
	_tmp3_ = _vala_clutter_color_from_string ("black");
	_tmp4_ = _tmp3_;
	_tmp5_ = *_tmp4_;
	clutter_actor_set_background_color ((ClutterActor*) self, &_tmp5_);
	__vala_ClutterColor_free0 (_tmp4_);
	gala_session_locker_expand_to_screen_size (self);
	_tmp6_ = self->priv->_wm;
	_tmp7_ = meta_plugin_get_display ((MetaPlugin*) _tmp6_);
	_tmp8_ = meta_display_get_context (_tmp7_);
	_tmp9_ = meta_context_get_backend (_tmp8_);
	_tmp10_ = meta_backend_get_monitor_manager (_tmp9_);
	monitor_manager = _tmp10_;
	_tmp11_ = monitor_manager;
	g_signal_connect_object (_tmp11_, "monitors-changed", (GCallback) _gala_session_locker_expand_to_screen_size_meta_monitor_manager_monitors_changed, self, 0);
	gala_session_locker_init_dbus_interfaces (self, NULL, NULL);
	return obj;
}

static void
gala_session_locker_class_init (GalaSessionLockerClass * klass,
                                gpointer klass_data)
{
	gala_session_locker_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaSessionLocker_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gala_session_locker_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gala_session_locker_set_property;
	G_OBJECT_CLASS (klass)->constructor = gala_session_locker_constructor;
	G_OBJECT_CLASS (klass)->finalize = gala_session_locker_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_SESSION_LOCKER_ACTIVE_PROPERTY, gala_session_locker_properties[GALA_SESSION_LOCKER_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY, gala_session_locker_properties[GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY] = g_param_spec_boolean ("is-locked", "is-locked", "is-locked", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_SESSION_LOCKER_IN_GREETER_PROPERTY, gala_session_locker_properties[GALA_SESSION_LOCKER_IN_GREETER_PROPERTY] = g_param_spec_boolean ("in-greeter", "in-greeter", "in-greeter", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY, gala_session_locker_properties[GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY] = g_param_spec_int64 ("activation-time", "activation-time", "activation-time", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_SESSION_LOCKER_WM_PROPERTY, gala_session_locker_properties[GALA_SESSION_LOCKER_WM_PROPERTY] = g_param_spec_object ("wm", "wm", "wm", GALA_TYPE_WINDOW_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	gala_session_locker_signals[GALA_SESSION_LOCKER_ACTIVE_CHANGED_SIGNAL] = g_signal_new ("active-changed", GALA_TYPE_SESSION_LOCKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
gala_session_locker_instance_init (GalaSessionLocker * self,
                                   gpointer klass)
{
	self->priv = gala_session_locker_get_instance_private (self);
	self->priv->_active = FALSE;
	self->priv->_is_locked = FALSE;
	self->priv->_in_greeter = FALSE;
	self->priv->_activation_time = (gint64) 0;
	self->priv->animate_id = (guint) 0;
	self->priv->connected_to_buses = FALSE;
}

static void
gala_session_locker_finalize (GObject * obj)
{
	GalaSessionLocker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_SESSION_LOCKER, GalaSessionLocker);
	_g_object_unref0 (self->priv->_wm);
	_g_object_unref0 (self->priv->modal_proxy);
	_g_object_unref0 (self->priv->login_manager);
	_g_object_unref0 (self->priv->login_user_manager);
	_g_object_unref0 (self->priv->login_session);
	_g_object_unref0 (self->priv->session_presence);
	_g_object_unref0 (self->priv->display_manager);
	_g_object_unref0 (self->priv->inhibitor);
	_g_object_unref0 (self->priv->screensaver_settings);
	_g_object_unref0 (self->priv->lockdown_settings);
	_g_object_unref0 (self->priv->gala_settings);
	G_OBJECT_CLASS (gala_session_locker_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_session_locker_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaSessionLockerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_session_locker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaSessionLocker), 0, (GInstanceInitFunc) gala_session_locker_instance_init, NULL };
	GType gala_session_locker_type_id;
	gala_session_locker_type_id = g_type_register_static (clutter_actor_get_type (), "GalaSessionLocker", &g_define_type_info, 0);
	GalaSessionLocker_private_offset = g_type_add_instance_private (gala_session_locker_type_id, sizeof (GalaSessionLockerPrivate));
	return gala_session_locker_type_id;
}

GType
gala_session_locker_get_type (void)
{
	static gsize gala_session_locker_type_id__once = 0;
	if (g_once_init_enter (&gala_session_locker_type_id__once)) {
		GType gala_session_locker_type_id;
		gala_session_locker_type_id = gala_session_locker_get_type_once ();
		g_once_init_leave (&gala_session_locker_type_id__once, gala_session_locker_type_id);
	}
	return gala_session_locker_type_id__once;
}

static void
_vala_gala_session_locker_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	GalaSessionLocker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_SESSION_LOCKER, GalaSessionLocker);
	switch (property_id) {
		case GALA_SESSION_LOCKER_ACTIVE_PROPERTY:
		g_value_set_boolean (value, gala_session_locker_get_active (self));
		break;
		case GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY:
		g_value_set_boolean (value, gala_session_locker_get_is_locked (self));
		break;
		case GALA_SESSION_LOCKER_IN_GREETER_PROPERTY:
		g_value_set_boolean (value, gala_session_locker_get_in_greeter (self));
		break;
		case GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY:
		g_value_set_int64 (value, gala_session_locker_get_activation_time (self));
		break;
		case GALA_SESSION_LOCKER_WM_PROPERTY:
		g_value_set_object (value, gala_session_locker_get_wm (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gala_session_locker_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	GalaSessionLocker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_SESSION_LOCKER, GalaSessionLocker);
	switch (property_id) {
		case GALA_SESSION_LOCKER_ACTIVE_PROPERTY:
		gala_session_locker_set_active (self, g_value_get_boolean (value));
		break;
		case GALA_SESSION_LOCKER_IS_LOCKED_PROPERTY:
		gala_session_locker_set_is_locked (self, g_value_get_boolean (value));
		break;
		case GALA_SESSION_LOCKER_IN_GREETER_PROPERTY:
		gala_session_locker_set_in_greeter (self, g_value_get_boolean (value));
		break;
		case GALA_SESSION_LOCKER_ACTIVATION_TIME_PROPERTY:
		gala_session_locker_set_activation_time (self, g_value_get_int64 (value));
		break;
		case GALA_SESSION_LOCKER_WM_PROPERTY:
		gala_session_locker_set_wm (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

