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

/*
* This file is part of budgie-desktop
*
* Copyright © 2019 Ubuntu Budgie Developers,
*             2015-2019 Budgie Desktop Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/

#include "slingshot.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

typedef GDBusProxy AppMenuScreenlockProxy;
typedef GDBusProxyClass AppMenuScreenlockProxyClass;
typedef struct _AppMenuScreenlockLockReadyData AppMenuScreenlockLockReadyData;
typedef GDBusProxy AppMenuLogindInterfaceProxy;
typedef GDBusProxyClass AppMenuLogindInterfaceProxyClass;
typedef GDBusProxy AppMenuSessionManagerProxy;
typedef GDBusProxyClass AppMenuSessionManagerProxyClass;
typedef struct _app_menu_session_manager_LogoutReadyData app_menu_session_manager_LogoutReadyData;
typedef struct _app_menu_session_manager_RebootReadyData app_menu_session_manager_RebootReadyData;
typedef struct _app_menu_session_manager_ShutdownReadyData app_menu_session_manager_ShutdownReadyData;

#define APP_MENU_TYPE_POWER_STRIP (app_menu_power_strip_get_type ())
#define APP_MENU_POWER_STRIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStrip))
#define APP_MENU_POWER_STRIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStripClass))
#define APP_MENU_IS_POWER_STRIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APP_MENU_TYPE_POWER_STRIP))
#define APP_MENU_IS_POWER_STRIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), APP_MENU_TYPE_POWER_STRIP))
#define APP_MENU_POWER_STRIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStripClass))

typedef struct _AppMenuPowerStrip AppMenuPowerStrip;
typedef struct _AppMenuPowerStripClass AppMenuPowerStripClass;
typedef struct _AppMenuPowerStripPrivate AppMenuPowerStripPrivate;
enum  {
	APP_MENU_POWER_STRIP_0_PROPERTY,
	APP_MENU_POWER_STRIP_NUM_PROPERTIES
};
static GParamSpec* app_menu_power_strip_properties[APP_MENU_POWER_STRIP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AppMenuPowerStripSetupDbusData AppMenuPowerStripSetupDbusData;
typedef struct _Block16Data Block16Data;
enum  {
	APP_MENU_POWER_STRIP_INVOKE_ACTION_SIGNAL,
	APP_MENU_POWER_STRIP_NUM_SIGNALS
};
static guint app_menu_power_strip_signals[APP_MENU_POWER_STRIP_NUM_SIGNALS] = {0};

struct _AppMenuScreenlockLockReadyData {
	GDBusMethodInvocation* _invocation_;
};

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

struct _app_menu_session_manager_RebootReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _app_menu_session_manager_ShutdownReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _AppMenuPowerStrip {
	GtkBox parent_instance;
	AppMenuPowerStripPrivate * priv;
};

struct _AppMenuPowerStripClass {
	GtkBoxClass parent_class;
};

struct _AppMenuPowerStripPrivate {
	AppMenuScreenlock* saver;
	AppMenuSessionManager* session;
	AppMenuLogindInterface* logind_interface;
	GtkButton* lock_btn;
	GtkButton* power_btn;
};

struct _AppMenuPowerStripSetupDbusData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AppMenuPowerStrip* self;
	AppMenuScreenlock* _tmp0_;
	AppMenuScreenlock* _tmp1_;
	AppMenuScreenlock* _tmp2_;
	GError* e;
	GError* _tmp3_;
	const gchar* _tmp4_;
	AppMenuSessionManager* _tmp5_;
	AppMenuSessionManager* _tmp6_;
	AppMenuSessionManager* _tmp7_;
	GError* _vala1_e;
	GtkButton* _tmp8_;
	GError* _tmp9_;
	const gchar* _tmp10_;
	AppMenuLogindInterface* _tmp11_;
	AppMenuLogindInterface* _tmp12_;
	AppMenuLogindInterface* _tmp13_;
	GError* _vala2_e;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GError* _inner_error0_;
};

struct _Block16Data {
	int _ref_count_;
	AppMenuPowerStrip* self;
	SlingshotBackendSessionManager* session_manager;
};

static GType app_menu_screenlock_type_id = 0;
static GType app_menu_logind_interface_type_id = 0;
static GType app_menu_session_manager_type_id = 0;
static gint AppMenuPowerStrip_private_offset;
static gpointer app_menu_power_strip_parent_class = NULL;
static GSettings* app_menu_power_strip__settings;
static GSettings* app_menu_power_strip__settings = NULL;
static GType app_menu_power_strip_type_id = 0;

static void app_menu_screenlock_proxy_g_signal (GDBusProxy* proxy,
                                         const gchar* sender_name,
                                         const gchar* signal_name,
                                         GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void app_menu_screenlock_proxy_lock_async (AppMenuScreenlock* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static void app_menu_screenlock_proxy_lock_finish (AppMenuScreenlock* self,
                                            GAsyncResult* _res_,
                                            GError** error);
static void app_menu_screenlock_proxy_app_menu_screenlock_interface_init (AppMenuScreenlockIface* iface);
static void _dbus_app_menu_screenlock_lock (AppMenuScreenlock* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation);
static void _dbus_app_menu_screenlock_lock_ready (GObject * source_object,
                                           GAsyncResult * _res_,
                                           gpointer _user_data_);
static void app_menu_screenlock_dbus_interface_method_call (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* method_name,
                                                     GVariant* parameters,
                                                     GDBusMethodInvocation* invocation,
                                                     gpointer user_data);
static GVariant* app_menu_screenlock_dbus_interface_get_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GError** error,
                                                           gpointer user_data);
static gboolean app_menu_screenlock_dbus_interface_set_property (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* property_name,
                                                          GVariant* value,
                                                          GError** error,
                                                          gpointer user_data);
static void _app_menu_screenlock_unregister_object (gpointer user_data);
static void app_menu_logind_interface_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void app_menu_logind_interface_proxy_suspend (AppMenuLogindInterface* self,
                                              gboolean interactive,
                                              GError** error);
static void app_menu_logind_interface_proxy_hibernate (AppMenuLogindInterface* self,
                                                gboolean interactive,
                                                GError** error);
static void app_menu_logind_interface_proxy_app_menu_logind_interface_interface_init (AppMenuLogindInterfaceIface* iface);
static void _dbus_app_menu_logind_interface_suspend (AppMenuLogindInterface* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_app_menu_logind_interface_hibernate (AppMenuLogindInterface* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void app_menu_logind_interface_dbus_interface_method_call (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* method_name,
                                                           GVariant* parameters,
                                                           GDBusMethodInvocation* invocation,
                                                           gpointer user_data);
static GVariant* app_menu_logind_interface_dbus_interface_get_property (GDBusConnection* connection,
                                                                 const gchar* sender,
                                                                 const gchar* object_path,
                                                                 const gchar* interface_name,
                                                                 const gchar* property_name,
                                                                 GError** error,
                                                                 gpointer user_data);
static gboolean app_menu_logind_interface_dbus_interface_set_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GVariant* value,
                                                                GError** error,
                                                                gpointer user_data);
static void _app_menu_logind_interface_unregister_object (gpointer user_data);
static void app_menu_session_manager_proxy_g_signal (GDBusProxy* proxy,
                                              const gchar* sender_name,
                                              const gchar* signal_name,
                                              GVariant* parameters);
static void app_menu_session_manager_proxy_Logout_async (AppMenuSessionManager* self,
                                                  guint mode,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void app_menu_session_manager_proxy_Logout_finish (AppMenuSessionManager* self,
                                                   GAsyncResult* _res_,
                                                   GError** error);
static void app_menu_session_manager_proxy_Reboot_async (AppMenuSessionManager* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void app_menu_session_manager_proxy_Reboot_finish (AppMenuSessionManager* self,
                                                   GAsyncResult* _res_,
                                                   GError** error);
static void app_menu_session_manager_proxy_Shutdown_async (AppMenuSessionManager* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void app_menu_session_manager_proxy_Shutdown_finish (AppMenuSessionManager* self,
                                                     GAsyncResult* _res_,
                                                     GError** error);
static void app_menu_session_manager_proxy_app_menu_session_manager_interface_init (AppMenuSessionManagerIface* iface);
static void _dbus_app_menu_session_manager_Logout (AppMenuSessionManager* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_app_menu_session_manager_Logout_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_);
static void _dbus_app_menu_session_manager_Reboot (AppMenuSessionManager* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_app_menu_session_manager_Reboot_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_);
static void _dbus_app_menu_session_manager_Shutdown (AppMenuSessionManager* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_app_menu_session_manager_Shutdown_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_);
static void app_menu_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* app_menu_session_manager_dbus_interface_get_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GError** error,
                                                                gpointer user_data);
static gboolean app_menu_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 _app_menu_session_manager_unregister_object (gpointer user_data);
GType app_menu_power_strip_register_type (GTypeModule * module);
VALA_EXTERN GType app_menu_power_strip_get_type (void) G_GNUC_CONST ;
static void app_menu_power_strip_setup_dbus_data_free (gpointer _data);
static void app_menu_power_strip_setup_dbus (AppMenuPowerStrip* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static void app_menu_power_strip_setup_dbus_finish (AppMenuPowerStrip* self,
                                             GAsyncResult* _res_);
static gboolean app_menu_power_strip_setup_dbus_co (AppMenuPowerStripSetupDbusData* _data_);
static void app_menu_power_strip_setup_dbus_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
VALA_EXTERN AppMenuPowerStrip* app_menu_power_strip_new (GtkOrientation direction);
VALA_EXTERN AppMenuPowerStrip* app_menu_power_strip_construct (GType object_type,
                                                   GtkOrientation direction);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static void __lambda29_ (Block16Data* _data16_);
static void ___lambda29__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda30_ (Block16Data* _data16_);
static void ___lambda30__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda31_ (Block16Data* _data16_);
static void ___lambda31__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda32_ (Block16Data* _data16_);
static void ___lambda32__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda33_ (Block16Data* _data16_);
static void ___lambda33__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda34_ (AppMenuPowerStrip* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda34__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static GSettings* app_menu_power_strip_get_settings (void);
static void __lambda35_ (AppMenuPowerStrip* self);
static void ___lambda35__g_settings_changed (GSettings* _sender,
                                      const gchar* key,
                                      gpointer self);
static void app_menu_power_strip_set_settings (GSettings* value);
static void app_menu_power_strip_finalize (GObject * obj);
static void _vala_app_menu_power_strip_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_app_menu_power_strip_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);

static const GDBusArgInfo * const _app_menu_screenlock_dbus_arg_info_lock_in[] = {NULL};
static const GDBusArgInfo * const _app_menu_screenlock_dbus_arg_info_lock_out[] = {NULL};
static const GDBusMethodInfo _app_menu_screenlock_dbus_method_info_lock = {-1, "Lock", (GDBusArgInfo **) (&_app_menu_screenlock_dbus_arg_info_lock_in), (GDBusArgInfo **) (&_app_menu_screenlock_dbus_arg_info_lock_out), NULL};
static const GDBusMethodInfo * const _app_menu_screenlock_dbus_method_info[] = {&_app_menu_screenlock_dbus_method_info_lock, NULL};
static const GDBusSignalInfo * const _app_menu_screenlock_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _app_menu_screenlock_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _app_menu_screenlock_dbus_interface_info = {-1, "org.buddiesofbudgie.BudgieScreenlock", (GDBusMethodInfo **) (&_app_menu_screenlock_dbus_method_info), (GDBusSignalInfo **) (&_app_menu_screenlock_dbus_signal_info), (GDBusPropertyInfo **) (&_app_menu_screenlock_dbus_property_info), NULL};
static const GDBusInterfaceVTable _app_menu_screenlock_dbus_interface_vtable = {app_menu_screenlock_dbus_interface_method_call, app_menu_screenlock_dbus_interface_get_property, app_menu_screenlock_dbus_interface_set_property};
static const GDBusArgInfo _app_menu_logind_interface_dbus_arg_info_suspend_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _app_menu_logind_interface_dbus_arg_info_suspend_in[] = {&_app_menu_logind_interface_dbus_arg_info_suspend_interactive, NULL};
static const GDBusArgInfo * const _app_menu_logind_interface_dbus_arg_info_suspend_out[] = {NULL};
static const GDBusMethodInfo _app_menu_logind_interface_dbus_method_info_suspend = {-1, "Suspend", (GDBusArgInfo **) (&_app_menu_logind_interface_dbus_arg_info_suspend_in), (GDBusArgInfo **) (&_app_menu_logind_interface_dbus_arg_info_suspend_out), NULL};
static const GDBusArgInfo _app_menu_logind_interface_dbus_arg_info_hibernate_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _app_menu_logind_interface_dbus_arg_info_hibernate_in[] = {&_app_menu_logind_interface_dbus_arg_info_hibernate_interactive, NULL};
static const GDBusArgInfo * const _app_menu_logind_interface_dbus_arg_info_hibernate_out[] = {NULL};
static const GDBusMethodInfo _app_menu_logind_interface_dbus_method_info_hibernate = {-1, "Hibernate", (GDBusArgInfo **) (&_app_menu_logind_interface_dbus_arg_info_hibernate_in), (GDBusArgInfo **) (&_app_menu_logind_interface_dbus_arg_info_hibernate_out), NULL};
static const GDBusMethodInfo * const _app_menu_logind_interface_dbus_method_info[] = {&_app_menu_logind_interface_dbus_method_info_suspend, &_app_menu_logind_interface_dbus_method_info_hibernate, NULL};
static const GDBusSignalInfo * const _app_menu_logind_interface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _app_menu_logind_interface_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _app_menu_logind_interface_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_app_menu_logind_interface_dbus_method_info), (GDBusSignalInfo **) (&_app_menu_logind_interface_dbus_signal_info), (GDBusPropertyInfo **) (&_app_menu_logind_interface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _app_menu_logind_interface_dbus_interface_vtable = {app_menu_logind_interface_dbus_interface_method_call, app_menu_logind_interface_dbus_interface_get_property, app_menu_logind_interface_dbus_interface_set_property};
static const GDBusArgInfo _app_menu_session_manager_dbus_arg_info_Logout_mode = {-1, "mode", "u", NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Logout_in[] = {&_app_menu_session_manager_dbus_arg_info_Logout_mode, NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Logout_out[] = {NULL};
static const GDBusMethodInfo _app_menu_session_manager_dbus_method_info_Logout = {-1, "Logout", (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Logout_in), (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Logout_out), NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Reboot_in[] = {NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Reboot_out[] = {NULL};
static const GDBusMethodInfo _app_menu_session_manager_dbus_method_info_Reboot = {-1, "Reboot", (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Reboot_in), (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Reboot_out), NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Shutdown_in[] = {NULL};
static const GDBusArgInfo * const _app_menu_session_manager_dbus_arg_info_Shutdown_out[] = {NULL};
static const GDBusMethodInfo _app_menu_session_manager_dbus_method_info_Shutdown = {-1, "Shutdown", (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Shutdown_in), (GDBusArgInfo **) (&_app_menu_session_manager_dbus_arg_info_Shutdown_out), NULL};
static const GDBusMethodInfo * const _app_menu_session_manager_dbus_method_info[] = {&_app_menu_session_manager_dbus_method_info_Logout, &_app_menu_session_manager_dbus_method_info_Reboot, &_app_menu_session_manager_dbus_method_info_Shutdown, NULL};
static const GDBusSignalInfo * const _app_menu_session_manager_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _app_menu_session_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _app_menu_session_manager_dbus_interface_info = {-1, "org.gnome.SessionManager", (GDBusMethodInfo **) (&_app_menu_session_manager_dbus_method_info), (GDBusSignalInfo **) (&_app_menu_session_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_app_menu_session_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _app_menu_session_manager_dbus_interface_vtable = {app_menu_session_manager_dbus_interface_method_call, app_menu_session_manager_dbus_interface_get_property, app_menu_session_manager_dbus_interface_set_property};

void
app_menu_screenlock_lock (AppMenuScreenlock* self,
                          GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	AppMenuScreenlockIface* _iface_;
	_iface_ = APP_MENU_SCREENLOCK_GET_INTERFACE (self);
	if (_iface_->lock) {
		_iface_->lock (self, _callback_, _user_data_);
	}
}

void
app_menu_screenlock_lock_finish (AppMenuScreenlock* self,
                                 GAsyncResult* _res_,
                                 GError** error)
{
	AppMenuScreenlockIface* _iface_;
	_iface_ = APP_MENU_SCREENLOCK_GET_INTERFACE (self);
	if (_iface_->lock_finish) {
		_iface_->lock_finish (self, _res_, error);
	}
}

static void
app_menu_screenlock_default_init (AppMenuScreenlockIface * iface,
                                  gpointer iface_data)
{
}

GType
app_menu_screenlock_get_type (void)
{
	return app_menu_screenlock_type_id;
}

GType
app_menu_screenlock_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuScreenlockIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_screenlock_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	app_menu_screenlock_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "AppMenuScreenlock", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (app_menu_screenlock_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (app_menu_screenlock_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) app_menu_screenlock_proxy_get_type);
	g_type_set_qdata (app_menu_screenlock_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.buddiesofbudgie.BudgieScreenlock");
	g_type_set_qdata (app_menu_screenlock_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_app_menu_screenlock_dbus_interface_info));
	g_type_set_qdata (app_menu_screenlock_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) app_menu_screenlock_register_object);
	return app_menu_screenlock_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (AppMenuScreenlockProxy, app_menu_screenlock_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (APP_MENU_TYPE_SCREENLOCK, app_menu_screenlock_proxy_app_menu_screenlock_interface_init) )
static void
app_menu_screenlock_proxy_class_init (AppMenuScreenlockProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = app_menu_screenlock_proxy_g_signal;
}

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

static void
app_menu_screenlock_proxy_class_finalize (AppMenuScreenlockProxyClass* klass)
{
}

void
app_menu_screenlock_proxy_register_dynamic_type (GTypeModule* module)
{
	app_menu_screenlock_proxy_register_type (module);
}

static void
app_menu_screenlock_proxy_init (AppMenuScreenlockProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_app_menu_screenlock_dbus_interface_info));
}

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

static void
app_menu_screenlock_proxy_lock_async (AppMenuScreenlock* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.buddiesofbudgie.BudgieScreenlock", "Lock");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
app_menu_screenlock_proxy_lock_finish (AppMenuScreenlock* self,
                                       GAsyncResult* _res_,
                                       GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_screenlock_proxy_app_menu_screenlock_interface_init (AppMenuScreenlockIface* iface)
{
	iface->lock = app_menu_screenlock_proxy_lock_async;
	iface->lock_finish = app_menu_screenlock_proxy_lock_finish;
}

static void
_dbus_app_menu_screenlock_lock (AppMenuScreenlock* self,
                                GVariant* _parameters_,
                                GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	AppMenuScreenlockLockReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (AppMenuScreenlockLockReadyData);
	_ready_data->_invocation_ = invocation;
	app_menu_screenlock_lock (self, (GAsyncReadyCallback) _dbus_app_menu_screenlock_lock_ready, _ready_data);
}

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

static void
app_menu_screenlock_dbus_interface_method_call (GDBusConnection* connection,
                                                const gchar* sender,
                                                const gchar* object_path,
                                                const gchar* interface_name,
                                                const gchar* method_name,
                                                GVariant* parameters,
                                                GDBusMethodInvocation* invocation,
                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Lock") == 0) {
		_dbus_app_menu_screenlock_lock (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

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

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

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

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

void
app_menu_logind_interface_suspend (AppMenuLogindInterface* self,
                                   gboolean interactive,
                                   GError** error)
{
	AppMenuLogindInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = APP_MENU_LOGIND_INTERFACE_GET_INTERFACE (self);
	if (_iface_->suspend) {
		_iface_->suspend (self, interactive, error);
	}
}

void
app_menu_logind_interface_hibernate (AppMenuLogindInterface* self,
                                     gboolean interactive,
                                     GError** error)
{
	AppMenuLogindInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = APP_MENU_LOGIND_INTERFACE_GET_INTERFACE (self);
	if (_iface_->hibernate) {
		_iface_->hibernate (self, interactive, error);
	}
}

static void
app_menu_logind_interface_default_init (AppMenuLogindInterfaceIface * iface,
                                        gpointer iface_data)
{
}

GType
app_menu_logind_interface_get_type (void)
{
	return app_menu_logind_interface_type_id;
}

GType
app_menu_logind_interface_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuLogindInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_logind_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	app_menu_logind_interface_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "AppMenuLogindInterface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (app_menu_logind_interface_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (app_menu_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) app_menu_logind_interface_proxy_get_type);
	g_type_set_qdata (app_menu_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (app_menu_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_app_menu_logind_interface_dbus_interface_info));
	g_type_set_qdata (app_menu_logind_interface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) app_menu_logind_interface_register_object);
	return app_menu_logind_interface_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (AppMenuLogindInterfaceProxy, app_menu_logind_interface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (APP_MENU_TYPE_LOGIND_INTERFACE, app_menu_logind_interface_proxy_app_menu_logind_interface_interface_init) )
static void
app_menu_logind_interface_proxy_class_init (AppMenuLogindInterfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = app_menu_logind_interface_proxy_g_signal;
}

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

static void
app_menu_logind_interface_proxy_class_finalize (AppMenuLogindInterfaceProxyClass* klass)
{
}

void
app_menu_logind_interface_proxy_register_dynamic_type (GTypeModule* module)
{
	app_menu_logind_interface_proxy_register_type (module);
}

static void
app_menu_logind_interface_proxy_init (AppMenuLogindInterfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_app_menu_logind_interface_dbus_interface_info));
}

static void
app_menu_logind_interface_proxy_suspend (AppMenuLogindInterface* self,
                                         gboolean interactive,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.login1.Manager", "Suspend");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_logind_interface_proxy_hibernate (AppMenuLogindInterface* self,
                                           gboolean interactive,
                                           GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.login1.Manager", "Hibernate");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_logind_interface_proxy_app_menu_logind_interface_interface_init (AppMenuLogindInterfaceIface* iface)
{
	iface->suspend = app_menu_logind_interface_proxy_suspend;
	iface->hibernate = app_menu_logind_interface_proxy_hibernate;
}

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

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

static void
app_menu_logind_interface_dbus_interface_method_call (GDBusConnection* connection,
                                                      const gchar* sender,
                                                      const gchar* object_path,
                                                      const gchar* interface_name,
                                                      const gchar* method_name,
                                                      GVariant* parameters,
                                                      GDBusMethodInvocation* invocation,
                                                      gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Suspend") == 0) {
		_dbus_app_menu_logind_interface_suspend (object, parameters, invocation);
	} else if (strcmp (method_name, "Hibernate") == 0) {
		_dbus_app_menu_logind_interface_hibernate (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

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

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

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

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

void
app_menu_session_manager_Logout (AppMenuSessionManager* self,
                                 guint mode,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Logout) {
		_iface_->Logout (self, mode, _callback_, _user_data_);
	}
}

void
app_menu_session_manager_Logout_finish (AppMenuSessionManager* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Logout_finish) {
		_iface_->Logout_finish (self, _res_, error);
	}
}

void
app_menu_session_manager_Reboot (AppMenuSessionManager* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Reboot) {
		_iface_->Reboot (self, _callback_, _user_data_);
	}
}

void
app_menu_session_manager_Reboot_finish (AppMenuSessionManager* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Reboot_finish) {
		_iface_->Reboot_finish (self, _res_, error);
	}
}

void
app_menu_session_manager_Shutdown (AppMenuSessionManager* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Shutdown) {
		_iface_->Shutdown (self, _callback_, _user_data_);
	}
}

void
app_menu_session_manager_Shutdown_finish (AppMenuSessionManager* self,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	AppMenuSessionManagerIface* _iface_;
	_iface_ = APP_MENU_SESSION_MANAGER_GET_INTERFACE (self);
	if (_iface_->Shutdown_finish) {
		_iface_->Shutdown_finish (self, _res_, error);
	}
}

static void
app_menu_session_manager_default_init (AppMenuSessionManagerIface * iface,
                                       gpointer iface_data)
{
}

GType
app_menu_session_manager_get_type (void)
{
	return app_menu_session_manager_type_id;
}

GType
app_menu_session_manager_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuSessionManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_session_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	app_menu_session_manager_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "AppMenuSessionManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (app_menu_session_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (app_menu_session_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) app_menu_session_manager_proxy_get_type);
	g_type_set_qdata (app_menu_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.SessionManager");
	g_type_set_qdata (app_menu_session_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_app_menu_session_manager_dbus_interface_info));
	g_type_set_qdata (app_menu_session_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) app_menu_session_manager_register_object);
	return app_menu_session_manager_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (AppMenuSessionManagerProxy, app_menu_session_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (APP_MENU_TYPE_SESSION_MANAGER, app_menu_session_manager_proxy_app_menu_session_manager_interface_init) )
static void
app_menu_session_manager_proxy_class_init (AppMenuSessionManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = app_menu_session_manager_proxy_g_signal;
}

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

static void
app_menu_session_manager_proxy_class_finalize (AppMenuSessionManagerProxyClass* klass)
{
}

void
app_menu_session_manager_proxy_register_dynamic_type (GTypeModule* module)
{
	app_menu_session_manager_proxy_register_type (module);
}

static void
app_menu_session_manager_proxy_init (AppMenuSessionManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_app_menu_session_manager_dbus_interface_info));
}

static void
app_menu_session_manager_proxy_Logout_async (AppMenuSessionManager* self,
                                             guint mode,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Logout");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (mode));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
app_menu_session_manager_proxy_Logout_finish (AppMenuSessionManager* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_session_manager_proxy_Reboot_async (AppMenuSessionManager* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Reboot");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
app_menu_session_manager_proxy_Reboot_finish (AppMenuSessionManager* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_session_manager_proxy_Shutdown_async (AppMenuSessionManager* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.SessionManager", "Shutdown");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
app_menu_session_manager_proxy_Shutdown_finish (AppMenuSessionManager* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
app_menu_session_manager_proxy_app_menu_session_manager_interface_init (AppMenuSessionManagerIface* iface)
{
	iface->Logout = app_menu_session_manager_proxy_Logout_async;
	iface->Logout_finish = app_menu_session_manager_proxy_Logout_finish;
	iface->Reboot = app_menu_session_manager_proxy_Reboot_async;
	iface->Reboot_finish = app_menu_session_manager_proxy_Reboot_finish;
	iface->Shutdown = app_menu_session_manager_proxy_Shutdown_async;
	iface->Shutdown_finish = app_menu_session_manager_proxy_Shutdown_finish;
}

static void
_dbus_app_menu_session_manager_Logout (AppMenuSessionManager* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	app_menu_session_manager_LogoutReadyData* _ready_data;
	GVariant* _tmp33_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (app_menu_session_manager_LogoutReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp33_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->mode = g_variant_get_uint32 (_tmp33_);
	g_variant_unref (_tmp33_);
	app_menu_session_manager_Logout (self, _ready_data->mode, (GAsyncReadyCallback) _dbus_app_menu_session_manager_Logout_ready, _ready_data);
}

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

static void
_dbus_app_menu_session_manager_Reboot (AppMenuSessionManager* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	app_menu_session_manager_RebootReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (app_menu_session_manager_RebootReadyData);
	_ready_data->_invocation_ = invocation;
	app_menu_session_manager_Reboot (self, (GAsyncReadyCallback) _dbus_app_menu_session_manager_Reboot_ready, _ready_data);
}

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

static void
_dbus_app_menu_session_manager_Shutdown (AppMenuSessionManager* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	app_menu_session_manager_ShutdownReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (app_menu_session_manager_ShutdownReadyData);
	_ready_data->_invocation_ = invocation;
	app_menu_session_manager_Shutdown (self, (GAsyncReadyCallback) _dbus_app_menu_session_manager_Shutdown_ready, _ready_data);
}

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

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

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

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

guint
app_menu_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 *) (&_app_menu_session_manager_dbus_interface_info), &_app_menu_session_manager_dbus_interface_vtable, data, _app_menu_session_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

static inline gpointer
app_menu_power_strip_get_instance_private (AppMenuPowerStrip* self)
{
	return G_STRUCT_MEMBER_P (self, AppMenuPowerStrip_private_offset);
}

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

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

static void
app_menu_power_strip_setup_dbus (AppMenuPowerStrip* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	AppMenuPowerStripSetupDbusData* _data_;
	AppMenuPowerStrip* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (AppMenuPowerStripSetupDbusData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, app_menu_power_strip_setup_dbus_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	app_menu_power_strip_setup_dbus_co (_data_);
}

static void
app_menu_power_strip_setup_dbus_finish (AppMenuPowerStrip* self,
                                        GAsyncResult* _res_)
{
	AppMenuPowerStripSetupDbusData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
app_menu_power_strip_setup_dbus_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	AppMenuPowerStripSetupDbusData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	app_menu_power_strip_setup_dbus_co (_data_);
}

static gboolean
app_menu_power_strip_setup_dbus_co (AppMenuPowerStripSetupDbusData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		g_async_initable_new_async (APP_MENU_TYPE_SCREENLOCK_PROXY, 0, NULL, app_menu_power_strip_setup_dbus_ready, _data_, "g-flags", 0, "g-name", "org.buddiesofbudgie.BudgieScreenlock", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/buddiesofbudgie/Screenlock", "g-interface-name", "org.buddiesofbudgie.BudgieScreenlock", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = (AppMenuScreenlock*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp0_ = (AppMenuScreenlock*) _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->_tmp0_;
		_data_->_tmp0_ = NULL;
		_g_object_unref0 (_data_->self->priv->saver);
		_data_->self->priv->saver = _data_->_tmp2_;
		_g_object_unref0 (_data_->_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp3_ = _data_->e;
		_data_->_tmp4_ = _data_->_tmp3_->message;
		g_warning ("powerstrip.vala:62: Unable to contact screen saver: %s", _data_->_tmp4_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 2;
		g_async_initable_new_async (APP_MENU_TYPE_SESSION_MANAGER_PROXY, 0, NULL, app_menu_power_strip_setup_dbus_ready, _data_, "g-flags", 0, "g-name", "org.gnome.SessionManager", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/SessionManager", "g-interface-name", "org.gnome.SessionManager", NULL);
		return FALSE;
		_state_2:
		_data_->_tmp6_ = (AppMenuSessionManager*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp5_ = (AppMenuSessionManager*) _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_data_->_tmp7_ = _data_->_tmp5_;
		_data_->_tmp5_ = NULL;
		_g_object_unref0 (_data_->self->priv->session);
		_data_->self->priv->session = _data_->_tmp7_;
		_g_object_unref0 (_data_->_tmp5_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp8_ = _data_->self->priv->power_btn;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp8_, FALSE);
		_data_->_tmp9_ = _data_->_vala1_e;
		_data_->_tmp10_ = _data_->_tmp9_->message;
		g_warning ("powerstrip.vala:68: Unable to contact GNOME Session: %s", _data_->_tmp10_);
		_g_error_free0 (_data_->_vala1_e);
	}
	__finally1:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 3;
		g_async_initable_new_async (APP_MENU_TYPE_LOGIND_INTERFACE_PROXY, 0, NULL, app_menu_power_strip_setup_dbus_ready, _data_, "g-flags", 0, "g-name", APP_MENU_LOGIND_LOGIN, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/login1", "g-interface-name", "org.freedesktop.login1.Manager", NULL);
		return FALSE;
		_state_3:
		_data_->_tmp12_ = (AppMenuLogindInterface*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp11_ = (AppMenuLogindInterface*) _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch2_g_error;
		}
		_data_->_tmp13_ = _data_->_tmp11_;
		_data_->_tmp11_ = NULL;
		_g_object_unref0 (_data_->self->priv->logind_interface);
		_data_->self->priv->logind_interface = _data_->_tmp13_;
		_g_object_unref0 (_data_->_tmp11_);
	}
	goto __finally2;
	__catch2_g_error:
	{
		_data_->_vala2_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = _data_->_vala2_e;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_warning (APP_MENU_UNABLE_CONTACT "logind: %s", _data_->_tmp15_);
		_g_error_free0 (_data_->_vala2_e);
	}
	__finally2:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static Block16Data*
block16_data_ref (Block16Data* _data16_)
{
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}

static void
block16_data_unref (void * _userdata_)
{
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		AppMenuPowerStrip* self;
		self = _data16_->self;
		_g_object_unref0 (_data16_->session_manager);
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}

static void
__lambda29_ (Block16Data* _data16_)
{
	AppMenuPowerStrip* self;
	self = _data16_->self;
	slingshot_backend_session_manager_shutdown (_data16_->session_manager);
}

static void
___lambda29__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda29_ (self);
}

static void
__lambda30_ (Block16Data* _data16_)
{
	AppMenuPowerStrip* self;
	self = _data16_->self;
	slingshot_backend_session_manager_suspend (_data16_->session_manager);
}

static void
___lambda30__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda30_ (self);
}

static void
__lambda31_ (Block16Data* _data16_)
{
	AppMenuPowerStrip* self;
	self = _data16_->self;
	slingshot_backend_session_manager_restart (_data16_->session_manager);
}

static void
___lambda31__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda31_ (self);
}

static void
__lambda32_ (Block16Data* _data16_)
{
	AppMenuPowerStrip* self;
	self = _data16_->self;
	slingshot_backend_session_manager_lock (_data16_->session_manager);
}

static void
___lambda32__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda32_ (self);
}

static void
__lambda33_ (Block16Data* _data16_)
{
	AppMenuPowerStrip* self;
	GError* _inner_error0_ = NULL;
	self = _data16_->self;
	{
		AppMenuSessionManager* _tmp0_;
		_tmp0_ = self->priv->session;
		if (_tmp0_ == NULL) {
			return;
		}
		g_signal_emit (self, app_menu_power_strip_signals[APP_MENU_POWER_STRIP_INVOKE_ACTION_SIGNAL], 0);
		slingshot_backend_session_manager_logout (_data16_->session_manager);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_message ("powerstrip.vala:142: Error invoking end session dialog: %s", _tmp2_);
		_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;
	}
}

static void
___lambda33__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda33_ (self);
}

static void
__lambda34_ (AppMenuPowerStrip* self,
             GObject* obj,
             GAsyncResult* res)
{
	AppMenuScreenlock* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->saver;
	if (_tmp0_ != NULL) {
		GtkButton* _tmp1_;
		GtkButton* _tmp2_;
		_tmp1_ = self->priv->lock_btn;
		gtk_widget_set_no_show_all ((GtkWidget*) _tmp1_, FALSE);
		_tmp2_ = self->priv->lock_btn;
		gtk_widget_show_all ((GtkWidget*) _tmp2_);
	}
}

static void
___lambda34__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda34_ ((AppMenuPowerStrip*) self, source_object, res);
	g_object_unref (self);
}

static void
__lambda35_ (AppMenuPowerStrip* self)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	_tmp0_ = app_menu_power_strip_get_settings ();
	_tmp1_ = _tmp0_;
	gtk_widget_set_visible ((GtkWidget*) self, g_settings_get_boolean (_tmp1_, "enable-powerstrip"));
}

static void
___lambda35__g_settings_changed (GSettings* _sender,
                                 const gchar* key,
                                 gpointer self)
{
	__lambda35_ ((AppMenuPowerStrip*) self);
}

AppMenuPowerStrip*
app_menu_power_strip_construct (GType object_type,
                                GtkOrientation direction)
{
	AppMenuPowerStrip * self = NULL;
	Block16Data* _data16_;
	SlingshotBackendSessionManager* _tmp0_;
	GtkBox* bottom = NULL;
	GtkBox* _tmp1_;
	GtkStyleContext* _tmp2_;
	GtkStyleContext* _tmp3_;
	GtkStyleContext* _tmp4_;
	GtkButton* btn = NULL;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	GtkStyleContext* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkStyleContext* _tmp17_;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkButton* _tmp24_;
	GtkStyleContext* _tmp25_;
	GtkButton* _tmp26_;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_;
	GtkButton* _tmp29_;
	GtkButton* _tmp30_;
	GtkButton* _tmp31_;
	GtkButton* _tmp32_;
	GtkButton* _tmp33_;
	GtkButton* _tmp34_;
	GtkStyleContext* _tmp35_;
	GtkButton* _tmp36_;
	GtkButton* _tmp37_;
	GtkButton* _tmp38_;
	GtkButton* _tmp39_;
	GtkButton* _tmp40_;
	GtkButton* _tmp41_;
	GtkButton* _tmp42_;
	GtkButton* _tmp43_;
	GtkButton* _tmp44_;
	GtkStyleContext* _tmp45_;
	GtkButton* _tmp46_;
	GtkButton* _tmp47_;
	GtkButton* _tmp48_;
	GtkButton* _tmp49_;
	GtkButton* _tmp50_;
	GSettings* _tmp51_;
	GSettings* _tmp52_;
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	self = (AppMenuPowerStrip*) g_object_new (object_type, NULL);
	_data16_->self = g_object_ref (self);
	_tmp0_ = slingshot_backend_session_manager_get_default ();
	_data16_->session_manager = _tmp0_;
	_tmp1_ = (GtkBox*) gtk_box_new (direction, 1);
	g_object_ref_sink (_tmp1_);
	bottom = _tmp1_;
	_tmp2_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp2_, "powerstrip");
	_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp3_, "bottom");
	gtk_widget_set_halign ((GtkWidget*) bottom, GTK_ALIGN_CENTER);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) bottom);
	_tmp4_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp4_, "primary-control");
	_tmp5_ = (GtkButton*) gtk_button_new_from_icon_name ("system-shutdown-symbolic", (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp5_);
	btn = _tmp5_;
	_tmp6_ = btn;
	g_signal_connect_data (_tmp6_, "clicked", (GCallback) ___lambda29__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp7_ = btn;
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_START);
	_tmp8_ = btn;
	_tmp9_ = gtk_widget_get_style_context ((GtkWidget*) _tmp8_);
	gtk_style_context_add_class (_tmp9_, "flat");
	_tmp10_ = btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp10_, _ ("Shutdown"));
	_tmp11_ = btn;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp11_, FALSE);
	_tmp12_ = btn;
	gtk_box_pack_start (bottom, (GtkWidget*) _tmp12_, FALSE, FALSE, (guint) 0);
	_tmp13_ = (GtkButton*) gtk_button_new_from_icon_name ("system-suspend-symbolic", (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (btn);
	btn = _tmp13_;
	_tmp14_ = btn;
	g_signal_connect_data (_tmp14_, "clicked", (GCallback) ___lambda30__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp15_ = btn;
	gtk_widget_set_halign ((GtkWidget*) _tmp15_, GTK_ALIGN_START);
	_tmp16_ = btn;
	_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
	gtk_style_context_add_class (_tmp17_, "flat");
	_tmp18_ = btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp18_, _ ("Suspend"));
	_tmp19_ = btn;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp19_, FALSE);
	_tmp20_ = btn;
	gtk_box_pack_start (bottom, (GtkWidget*) _tmp20_, FALSE, FALSE, (guint) 0);
	_tmp21_ = (GtkButton*) gtk_button_new_from_icon_name ("system-restart-symbolic", (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (btn);
	btn = _tmp21_;
	_tmp22_ = btn;
	g_signal_connect_data (_tmp22_, "clicked", (GCallback) ___lambda31__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp23_ = btn;
	gtk_widget_set_halign ((GtkWidget*) _tmp23_, GTK_ALIGN_START);
	_tmp24_ = btn;
	_tmp25_ = gtk_widget_get_style_context ((GtkWidget*) _tmp24_);
	gtk_style_context_add_class (_tmp25_, "flat");
	_tmp26_ = btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp26_, _ ("Restart"));
	_tmp27_ = btn;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp27_, FALSE);
	_tmp28_ = btn;
	gtk_box_pack_start (bottom, (GtkWidget*) _tmp28_, FALSE, FALSE, (guint) 0);
	_tmp29_ = (GtkButton*) gtk_button_new_from_icon_name ("system-lock-screen-symbolic", (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (btn);
	btn = _tmp29_;
	_tmp30_ = btn;
	g_signal_connect_data (_tmp30_, "clicked", (GCallback) ___lambda32__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp31_ = btn;
	_tmp32_ = _g_object_ref0 (_tmp31_);
	_g_object_unref0 (self->priv->lock_btn);
	self->priv->lock_btn = _tmp32_;
	_tmp33_ = btn;
	gtk_widget_set_halign ((GtkWidget*) _tmp33_, GTK_ALIGN_START);
	_tmp34_ = btn;
	_tmp35_ = gtk_widget_get_style_context ((GtkWidget*) _tmp34_);
	gtk_style_context_add_class (_tmp35_, "flat");
	_tmp36_ = btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp36_, _ ("Lock"));
	_tmp37_ = btn;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp37_, FALSE);
	_tmp38_ = btn;
	gtk_box_pack_start (bottom, (GtkWidget*) _tmp38_, FALSE, FALSE, (guint) 0);
	_tmp39_ = (GtkButton*) gtk_button_new_from_icon_name ("system-log-out-symbolic", (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp39_);
	_g_object_unref0 (btn);
	btn = _tmp39_;
	_tmp40_ = btn;
	_tmp41_ = _g_object_ref0 (_tmp40_);
	_g_object_unref0 (self->priv->power_btn);
	self->priv->power_btn = _tmp41_;
	_tmp42_ = btn;
	g_signal_connect_data (_tmp42_, "clicked", (GCallback) ___lambda33__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp43_ = btn;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_START);
	_tmp44_ = btn;
	_tmp45_ = gtk_widget_get_style_context ((GtkWidget*) _tmp44_);
	gtk_style_context_add_class (_tmp45_, "flat");
	_tmp46_ = btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp46_, _ ("Logout"));
	_tmp47_ = btn;
	gtk_widget_set_can_focus ((GtkWidget*) _tmp47_, FALSE);
	_tmp48_ = btn;
	gtk_box_pack_start (bottom, (GtkWidget*) _tmp48_, FALSE, FALSE, (guint) 0);
	_tmp49_ = self->priv->lock_btn;
	gtk_widget_set_no_show_all ((GtkWidget*) _tmp49_, TRUE);
	_tmp50_ = self->priv->lock_btn;
	gtk_widget_hide ((GtkWidget*) _tmp50_);
	app_menu_power_strip_setup_dbus (self, ___lambda34__gasync_ready_callback, g_object_ref (self));
	_tmp51_ = app_menu_power_strip_get_settings ();
	_tmp52_ = _tmp51_;
	g_signal_connect_object (_tmp52_, "changed::enable-powerstrip", (GCallback) ___lambda35__g_settings_changed, self, 0);
	_g_object_unref0 (btn);
	_g_object_unref0 (bottom);
	block16_data_unref (_data16_);
	_data16_ = NULL;
	return self;
}

AppMenuPowerStrip*
app_menu_power_strip_new (GtkOrientation direction)
{
	return app_menu_power_strip_construct (APP_MENU_TYPE_POWER_STRIP, direction);
}

static GSettings*
app_menu_power_strip_get_settings (void)
{
	GSettings* result;
	GSettings* _tmp0_;
	_tmp0_ = app_menu_power_strip__settings;
	result = _tmp0_;
	return result;
}

static void
app_menu_power_strip_set_settings (GSettings* value)
{
	GSettings* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (app_menu_power_strip__settings);
	app_menu_power_strip__settings = _tmp0_;
}

static void
app_menu_power_strip_class_init (AppMenuPowerStripClass * klass,
                                 gpointer klass_data)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	app_menu_power_strip_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AppMenuPowerStrip_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_app_menu_power_strip_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_app_menu_power_strip_set_property;
	G_OBJECT_CLASS (klass)->finalize = app_menu_power_strip_finalize;
	app_menu_power_strip_signals[APP_MENU_POWER_STRIP_INVOKE_ACTION_SIGNAL] = g_signal_new ("invoke-action", APP_MENU_TYPE_POWER_STRIP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	_tmp0_ = g_settings_new ("org.ubuntubudgie.plugins.budgie-appmenu");
	_tmp1_ = _tmp0_;
	app_menu_power_strip_set_settings (_tmp1_);
	_g_object_unref0 (_tmp1_);
}

static void
app_menu_power_strip_instance_init (AppMenuPowerStrip * self,
                                    gpointer klass)
{
	self->priv = app_menu_power_strip_get_instance_private (self);
	self->priv->saver = NULL;
	self->priv->session = NULL;
	self->priv->logind_interface = NULL;
	self->priv->lock_btn = NULL;
	self->priv->power_btn = NULL;
}

static void
app_menu_power_strip_finalize (GObject * obj)
{
	AppMenuPowerStrip * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStrip);
	_g_object_unref0 (self->priv->saver);
	_g_object_unref0 (self->priv->session);
	_g_object_unref0 (self->priv->logind_interface);
	_g_object_unref0 (self->priv->lock_btn);
	_g_object_unref0 (self->priv->power_btn);
	G_OBJECT_CLASS (app_menu_power_strip_parent_class)->finalize (obj);
}

GType
app_menu_power_strip_get_type (void)
{
	return app_menu_power_strip_type_id;
}

GType
app_menu_power_strip_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (AppMenuPowerStripClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) app_menu_power_strip_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AppMenuPowerStrip), 0, (GInstanceInitFunc) app_menu_power_strip_instance_init, NULL };
	app_menu_power_strip_type_id = g_type_module_register_type (module, gtk_box_get_type (), "AppMenuPowerStrip", &g_define_type_info, 0);
	AppMenuPowerStrip_private_offset = sizeof (AppMenuPowerStripPrivate);
	return app_menu_power_strip_type_id;
}

static void
_vala_app_menu_power_strip_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	AppMenuPowerStrip * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStrip);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_app_menu_power_strip_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	AppMenuPowerStrip * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, APP_MENU_TYPE_POWER_STRIP, AppMenuPowerStrip);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

