/* system-management.c generated by valac 0.56.17, the Vala compiler
 * generated from system-management.vala, do not modify */

/*
 * Copyright (C) 2010 Michal Hruby <michal.mhr@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
 *
 * Authored by Michal Hruby <michal.mhr@gmail.com>
 *
 */

#include "plugins.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <stdlib.h>
#include <gee.h>
#include <glib-object.h>
#include <synapse-core.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 SynapseUPowerObjectProxy;
typedef GDBusProxyClass SynapseUPowerObjectProxyClass;
typedef struct _SynapseUpowerObjectHibernateReadyData SynapseUpowerObjectHibernateReadyData;
typedef struct _SynapseUpowerObjectSuspendReadyData SynapseUpowerObjectSuspendReadyData;
typedef struct _SynapseUpowerObjectHibernateAllowedReadyData SynapseUpowerObjectHibernateAllowedReadyData;
typedef struct _SynapseUpowerObjectSuspendAllowedReadyData SynapseUpowerObjectSuspendAllowedReadyData;
typedef struct _SynapseUpowerObjectAboutToSleepReadyData SynapseUpowerObjectAboutToSleepReadyData;
typedef GDBusProxy SynapseConsoleKitObjectProxy;
typedef GDBusProxyClass SynapseConsoleKitObjectProxyClass;
typedef struct _SynapseConsoleKitObjectCanRestartReadyData SynapseConsoleKitObjectCanRestartReadyData;
typedef struct _SynapseConsoleKitObjectCanStopReadyData SynapseConsoleKitObjectCanStopReadyData;
typedef GDBusProxy SynapseSystemdObjectProxy;
typedef GDBusProxyClass SynapseSystemdObjectProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION (synapse_system_management_plugin_system_action_get_type ())
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, SynapseSystemManagementPluginSystemAction))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, SynapseSystemManagementPluginSystemActionClass))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SYSTEM_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SYSTEM_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, SynapseSystemManagementPluginSystemActionClass))

typedef struct _SynapseSystemManagementPluginSystemAction SynapseSystemManagementPluginSystemAction;
typedef struct _SynapseSystemManagementPluginSystemActionClass SynapseSystemManagementPluginSystemActionClass;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _SynapseSystemManagementPluginSearchData SynapseSystemManagementPluginSearchData;
typedef struct _SynapseSystemManagementPluginSystemActionPrivate SynapseSystemManagementPluginSystemActionPrivate;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_system_action_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_NUM_PROPERTIES];

#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION (synapse_system_management_plugin_suspend_action_get_type ())
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION, SynapseSystemManagementPluginSuspendAction))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION, SynapseSystemManagementPluginSuspendActionClass))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SUSPEND_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SUSPEND_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION, SynapseSystemManagementPluginSuspendActionClass))

typedef struct _SynapseSystemManagementPluginSuspendAction SynapseSystemManagementPluginSuspendAction;
typedef struct _SynapseSystemManagementPluginSuspendActionClass SynapseSystemManagementPluginSuspendActionClass;
typedef struct _SynapseSystemManagementPluginSuspendActionPrivate SynapseSystemManagementPluginSuspendActionPrivate;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_suspend_action_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SUSPEND_ACTION_NUM_PROPERTIES];
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SynapseSystemManagementPluginSuspendActionCheckAllowedData SynapseSystemManagementPluginSuspendActionCheckAllowedData;
typedef struct _SynapseSystemManagementPluginSuspendActionDoSuspendData SynapseSystemManagementPluginSuspendActionDoSuspendData;

#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION (synapse_system_management_plugin_hibernate_action_get_type ())
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION, SynapseSystemManagementPluginHibernateAction))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION, SynapseSystemManagementPluginHibernateActionClass))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_HIBERNATE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_HIBERNATE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION, SynapseSystemManagementPluginHibernateActionClass))

typedef struct _SynapseSystemManagementPluginHibernateAction SynapseSystemManagementPluginHibernateAction;
typedef struct _SynapseSystemManagementPluginHibernateActionClass SynapseSystemManagementPluginHibernateActionClass;
typedef struct _SynapseSystemManagementPluginHibernateActionPrivate SynapseSystemManagementPluginHibernateActionPrivate;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_hibernate_action_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_HIBERNATE_ACTION_NUM_PROPERTIES];
typedef struct _SynapseSystemManagementPluginHibernateActionCheckAllowedData SynapseSystemManagementPluginHibernateActionCheckAllowedData;
typedef struct _SynapseSystemManagementPluginHibernateActionDoHibernateData SynapseSystemManagementPluginHibernateActionDoHibernateData;

#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION (synapse_system_management_plugin_shutdown_action_get_type ())
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION, SynapseSystemManagementPluginShutdownAction))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION, SynapseSystemManagementPluginShutdownActionClass))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SHUTDOWN_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_SHUTDOWN_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION, SynapseSystemManagementPluginShutdownActionClass))

typedef struct _SynapseSystemManagementPluginShutdownAction SynapseSystemManagementPluginShutdownAction;
typedef struct _SynapseSystemManagementPluginShutdownActionClass SynapseSystemManagementPluginShutdownActionClass;
typedef struct _SynapseSystemManagementPluginShutdownActionPrivate SynapseSystemManagementPluginShutdownActionPrivate;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_shutdown_action_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SHUTDOWN_ACTION_NUM_PROPERTIES];
typedef struct _SynapseSystemManagementPluginShutdownActionCheckAllowedData SynapseSystemManagementPluginShutdownActionCheckAllowedData;

#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION (synapse_system_management_plugin_restart_action_get_type ())
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION, SynapseSystemManagementPluginRestartAction))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION, SynapseSystemManagementPluginRestartActionClass))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_RESTART_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_IS_RESTART_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION))
#define SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION, SynapseSystemManagementPluginRestartActionClass))

typedef struct _SynapseSystemManagementPluginRestartAction SynapseSystemManagementPluginRestartAction;
typedef struct _SynapseSystemManagementPluginRestartActionClass SynapseSystemManagementPluginRestartActionClass;
typedef struct _SynapseSystemManagementPluginRestartActionPrivate SynapseSystemManagementPluginRestartActionPrivate;
enum  {
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION_0_PROPERTY,
	SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION_NUM_PROPERTIES
};
static GParamSpec* synapse_system_management_plugin_restart_action_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_RESTART_ACTION_NUM_PROPERTIES];
typedef struct _SynapseSystemManagementPluginRestartActionCheckAllowedData SynapseSystemManagementPluginRestartActionCheckAllowedData;

struct _SynapseUpowerObjectHibernateReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseUpowerObjectSuspendReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseUpowerObjectHibernateAllowedReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseUpowerObjectSuspendAllowedReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseUpowerObjectAboutToSleepReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseConsoleKitObjectCanRestartReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseConsoleKitObjectCanStopReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _SynapseSystemManagementPluginPrivate {
	gboolean _enabled;
	GeeList* actions;
};

struct _SynapseSystemManagementPluginSearchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPlugin* self;
	SynapseQuery q;
	SynapseResultSet* result;
	SynapseQuery _tmp0_;
	SynapseResultSet* _result_;
	SynapseResultSet* _tmp1_;
	GeeList* matchers;
	SynapseQuery _tmp2_;
	const gchar* _tmp3_;
	GeeList* _tmp4_;
	GeeList* _action_list;
	GeeList* _tmp5_;
	gint _action_size;
	GeeList* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gint _action_index;
	gint _tmp9_;
	gint _tmp10_;
	SynapseSystemManagementPluginSystemAction* action;
	GeeList* _tmp11_;
	gpointer _tmp12_;
	SynapseSystemManagementPluginSystemAction* _tmp13_;
	GeeList* _matcher_list;
	GeeList* _tmp14_;
	gint _matcher_size;
	GeeList* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	gint _matcher_index;
	gint _tmp18_;
	gint _tmp19_;
	GeeMapEntry* matcher;
	GeeList* _tmp20_;
	gpointer _tmp21_;
	GeeMapEntry* _tmp22_;
	gconstpointer _tmp23_;
	gconstpointer _tmp24_;
	SynapseSystemManagementPluginSystemAction* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	SynapseResultSet* _tmp28_;
	SynapseSystemManagementPluginSystemAction* _tmp29_;
	GeeMapEntry* _tmp30_;
	gconstpointer _tmp31_;
	gconstpointer _tmp32_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginSystemAction {
	SynapseActionMatch parent_instance;
	SynapseSystemManagementPluginSystemActionPrivate * priv;
};

struct _SynapseSystemManagementPluginSystemActionClass {
	SynapseActionMatchClass parent_class;
	gboolean (*action_allowed) (SynapseSystemManagementPluginSystemAction* self);
};

struct _SynapseSystemManagementPluginSuspendAction {
	SynapseSystemManagementPluginSystemAction parent_instance;
	SynapseSystemManagementPluginSuspendActionPrivate * priv;
};

struct _SynapseSystemManagementPluginSuspendActionClass {
	SynapseSystemManagementPluginSystemActionClass parent_class;
};

struct _SynapseSystemManagementPluginSuspendActionPrivate {
	gboolean allowed;
};

struct _SynapseSystemManagementPluginSuspendActionCheckAllowedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginSuspendAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	gchar* _tmp1_;
	SynapseSystemdObject* _tmp2_;
	gchar* _tmp3_;
	GError* err;
	GError* _tmp4_;
	const gchar* _tmp5_;
	SynapseUPowerObject* _vala1_dbus_interface;
	SynapseUPowerObject* _tmp6_;
	gboolean _tmp7_;
	SynapseUPowerObject* _tmp8_;
	GError* _vala1_err;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginSuspendActionDoSuspendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginSuspendAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	SynapseSystemdObject* _tmp1_;
	GError* err;
	GError* _tmp2_;
	const gchar* _tmp3_;
	SynapseUPowerObject* _vala1_dbus_interface;
	SynapseUPowerObject* _tmp4_;
	SynapseUPowerObject* _tmp5_;
	SynapseUPowerObject* _tmp6_;
	GError* _vala1_err;
	GError* _tmp7_;
	const gchar* _tmp8_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginHibernateAction {
	SynapseSystemManagementPluginSystemAction parent_instance;
	SynapseSystemManagementPluginHibernateActionPrivate * priv;
};

struct _SynapseSystemManagementPluginHibernateActionClass {
	SynapseSystemManagementPluginSystemActionClass parent_class;
};

struct _SynapseSystemManagementPluginHibernateActionPrivate {
	gboolean allowed;
};

struct _SynapseSystemManagementPluginHibernateActionCheckAllowedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginHibernateAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	gchar* _tmp1_;
	SynapseSystemdObject* _tmp2_;
	gchar* _tmp3_;
	GError* err;
	GError* _tmp4_;
	const gchar* _tmp5_;
	SynapseUPowerObject* _vala1_dbus_interface;
	SynapseUPowerObject* _tmp6_;
	gboolean _tmp7_;
	SynapseUPowerObject* _tmp8_;
	GError* _vala1_err;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginHibernateActionDoHibernateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginHibernateAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	SynapseSystemdObject* _tmp1_;
	GError* err;
	GError* _tmp2_;
	const gchar* _tmp3_;
	SynapseUPowerObject* _vala1_dbus_interface;
	SynapseUPowerObject* _tmp4_;
	SynapseUPowerObject* _tmp5_;
	SynapseUPowerObject* _tmp6_;
	GError* _vala1_err;
	GError* _tmp7_;
	const gchar* _tmp8_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginShutdownAction {
	SynapseSystemManagementPluginSystemAction parent_instance;
	SynapseSystemManagementPluginShutdownActionPrivate * priv;
};

struct _SynapseSystemManagementPluginShutdownActionClass {
	SynapseSystemManagementPluginSystemActionClass parent_class;
};

struct _SynapseSystemManagementPluginShutdownActionPrivate {
	gboolean allowed;
};

struct _SynapseSystemManagementPluginShutdownActionCheckAllowedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginShutdownAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	gchar* _tmp1_;
	SynapseSystemdObject* _tmp2_;
	gchar* _tmp3_;
	GError* err;
	GError* _tmp4_;
	const gchar* _tmp5_;
	SynapseConsoleKitObject* _vala1_dbus_interface;
	SynapseConsoleKitObject* _tmp6_;
	gboolean _tmp7_;
	SynapseConsoleKitObject* _tmp8_;
	GError* _vala1_err;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError* _inner_error0_;
};

struct _SynapseSystemManagementPluginRestartAction {
	SynapseSystemManagementPluginSystemAction parent_instance;
	SynapseSystemManagementPluginRestartActionPrivate * priv;
};

struct _SynapseSystemManagementPluginRestartActionClass {
	SynapseSystemManagementPluginSystemActionClass parent_class;
};

struct _SynapseSystemManagementPluginRestartActionPrivate {
	gboolean allowed;
};

struct _SynapseSystemManagementPluginRestartActionCheckAllowedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SynapseSystemManagementPluginRestartAction* self;
	SynapseSystemdObject* dbus_interface;
	SynapseSystemdObject* _tmp0_;
	gchar* _tmp1_;
	SynapseSystemdObject* _tmp2_;
	gchar* _tmp3_;
	GError* err;
	GError* _tmp4_;
	const gchar* _tmp5_;
	SynapseConsoleKitObject* _vala1_dbus_interface;
	SynapseConsoleKitObject* _tmp6_;
	gboolean _tmp7_;
	SynapseConsoleKitObject* _tmp8_;
	GError* _vala1_err;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError* _inner_error0_;
};

static gint SynapseSystemManagementPlugin_private_offset;
static gpointer synapse_system_management_plugin_parent_class = NULL;
static gpointer synapse_system_management_plugin_system_action_parent_class = NULL;
static gint SynapseSystemManagementPluginSuspendAction_private_offset;
static gpointer synapse_system_management_plugin_suspend_action_parent_class = NULL;
static gint SynapseSystemManagementPluginHibernateAction_private_offset;
static gpointer synapse_system_management_plugin_hibernate_action_parent_class = NULL;
static gint SynapseSystemManagementPluginShutdownAction_private_offset;
static gpointer synapse_system_management_plugin_shutdown_action_parent_class = NULL;
static gint SynapseSystemManagementPluginRestartAction_private_offset;
static gpointer synapse_system_management_plugin_restart_action_parent_class = NULL;
static SynapseActivatableIface * synapse_system_management_plugin_synapse_activatable_parent_iface = NULL;
static SynapseItemProviderIface * synapse_system_management_plugin_synapse_item_provider_parent_iface = NULL;

static GType synapse_upower_object_get_type_once (void);
static void synapse_upower_object_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 synapse_upower_object_proxy_hibernate_async (SynapseUPowerObject* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void synapse_upower_object_proxy_hibernate_finish (SynapseUPowerObject* self,
                                                   GAsyncResult* _res_,
                                                   GError** error);
static void synapse_upower_object_proxy_suspend_async (SynapseUPowerObject* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void synapse_upower_object_proxy_suspend_finish (SynapseUPowerObject* self,
                                                 GAsyncResult* _res_,
                                                 GError** error);
static void synapse_upower_object_proxy_hibernate_allowed_async (SynapseUPowerObject* self,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static gboolean synapse_upower_object_proxy_hibernate_allowed_finish (SynapseUPowerObject* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
static void synapse_upower_object_proxy_suspend_allowed_async (SynapseUPowerObject* self,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static gboolean synapse_upower_object_proxy_suspend_allowed_finish (SynapseUPowerObject* self,
                                                             GAsyncResult* _res_,
                                                             GError** error);
static void synapse_upower_object_proxy_about_to_sleep_async (SynapseUPowerObject* self,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static void synapse_upower_object_proxy_about_to_sleep_finish (SynapseUPowerObject* self,
                                                        GAsyncResult* _res_,
                                                        GError** error);
static void synapse_upower_object_proxy_synapse_upower_object_interface_init (SynapseUPowerObjectIface* iface);
static void _dbus_synapse_upower_object_hibernate (SynapseUPowerObject* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_synapse_upower_object_hibernate_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_);
static void _dbus_synapse_upower_object_suspend (SynapseUPowerObject* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation);
static void _dbus_synapse_upower_object_suspend_ready (GObject * source_object,
                                                GAsyncResult * _res_,
                                                gpointer _user_data_);
static void _dbus_synapse_upower_object_hibernate_allowed (SynapseUPowerObject* self,
                                                    GVariant* _parameters_,
                                                    GDBusMethodInvocation* invocation);
static void _dbus_synapse_upower_object_hibernate_allowed_ready (GObject * source_object,
                                                          GAsyncResult * _res_,
                                                          gpointer _user_data_);
static void _dbus_synapse_upower_object_suspend_allowed (SynapseUPowerObject* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation);
static void _dbus_synapse_upower_object_suspend_allowed_ready (GObject * source_object,
                                                        GAsyncResult * _res_,
                                                        gpointer _user_data_);
static void _dbus_synapse_upower_object_about_to_sleep (SynapseUPowerObject* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_synapse_upower_object_about_to_sleep_ready (GObject * source_object,
                                                       GAsyncResult * _res_,
                                                       gpointer _user_data_);
static void synapse_upower_object_dbus_interface_method_call (GDBusConnection* connection,
                                                       const gchar* sender,
                                                       const gchar* object_path,
                                                       const gchar* interface_name,
                                                       const gchar* method_name,
                                                       GVariant* parameters,
                                                       GDBusMethodInvocation* invocation,
                                                       gpointer user_data);
static GVariant* synapse_upower_object_dbus_interface_get_property (GDBusConnection* connection,
                                                             const gchar* sender,
                                                             const gchar* object_path,
                                                             const gchar* interface_name,
                                                             const gchar* property_name,
                                                             GError** error,
                                                             gpointer user_data);
static gboolean synapse_upower_object_dbus_interface_set_property (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* property_name,
                                                            GVariant* value,
                                                            GError** error,
                                                            gpointer user_data);
static void _synapse_upower_object_unregister_object (gpointer user_data);
static GType synapse_console_kit_object_get_type_once (void);
static void synapse_console_kit_object_proxy_g_signal (GDBusProxy* proxy,
                                                const gchar* sender_name,
                                                const gchar* signal_name,
                                                GVariant* parameters);
static void synapse_console_kit_object_proxy_restart (SynapseConsoleKitObject* self,
                                               GError** error);
static void synapse_console_kit_object_proxy_stop (SynapseConsoleKitObject* self,
                                            GError** error);
static void synapse_console_kit_object_proxy_can_restart_async (SynapseConsoleKitObject* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static gboolean synapse_console_kit_object_proxy_can_restart_finish (SynapseConsoleKitObject* self,
                                                              GAsyncResult* _res_,
                                                              GError** error);
static void synapse_console_kit_object_proxy_can_stop_async (SynapseConsoleKitObject* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static gboolean synapse_console_kit_object_proxy_can_stop_finish (SynapseConsoleKitObject* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static void synapse_console_kit_object_proxy_synapse_console_kit_object_interface_init (SynapseConsoleKitObjectIface* iface);
static void _dbus_synapse_console_kit_object_restart (SynapseConsoleKitObject* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation);
static void _dbus_synapse_console_kit_object_stop (SynapseConsoleKitObject* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_synapse_console_kit_object_can_restart (SynapseConsoleKitObject* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_synapse_console_kit_object_can_restart_ready (GObject * source_object,
                                                         GAsyncResult * _res_,
                                                         gpointer _user_data_);
static void _dbus_synapse_console_kit_object_can_stop (SynapseConsoleKitObject* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void _dbus_synapse_console_kit_object_can_stop_ready (GObject * source_object,
                                                      GAsyncResult * _res_,
                                                      gpointer _user_data_);
static void synapse_console_kit_object_dbus_interface_method_call (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* method_name,
                                                            GVariant* parameters,
                                                            GDBusMethodInvocation* invocation,
                                                            gpointer user_data);
static GVariant* synapse_console_kit_object_dbus_interface_get_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GError** error,
                                                                  gpointer user_data);
static gboolean synapse_console_kit_object_dbus_interface_set_property (GDBusConnection* connection,
                                                                 const gchar* sender,
                                                                 const gchar* object_path,
                                                                 const gchar* interface_name,
                                                                 const gchar* property_name,
                                                                 GVariant* value,
                                                                 GError** error,
                                                                 gpointer user_data);
static void _synapse_console_kit_object_unregister_object (gpointer user_data);
static GType synapse_systemd_object_get_type_once (void);
static void synapse_systemd_object_proxy_g_signal (GDBusProxy* proxy,
                                            const gchar* sender_name,
                                            const gchar* signal_name,
                                            GVariant* parameters);
static void synapse_systemd_object_proxy_reboot (SynapseSystemdObject* self,
                                          gboolean interactive,
                                          GError** error);
static void synapse_systemd_object_proxy_suspend (SynapseSystemdObject* self,
                                           gboolean interactive,
                                           GError** error);
static void synapse_systemd_object_proxy_hibernate (SynapseSystemdObject* self,
                                             gboolean interactive,
                                             GError** error);
static void synapse_systemd_object_proxy_power_off (SynapseSystemdObject* self,
                                             gboolean interactive,
                                             GError** error);
static gchar* synapse_systemd_object_proxy_can_suspend (SynapseSystemdObject* self,
                                                 GError** error);
static gchar* synapse_systemd_object_proxy_can_hibernate (SynapseSystemdObject* self,
                                                   GError** error);
static gchar* synapse_systemd_object_proxy_can_reboot (SynapseSystemdObject* self,
                                                GError** error);
static gchar* synapse_systemd_object_proxy_can_power_off (SynapseSystemdObject* self,
                                                   GError** error);
static void synapse_systemd_object_proxy_synapse_systemd_object_interface_init (SynapseSystemdObjectIface* iface);
static void _dbus_synapse_systemd_object_reboot (SynapseSystemdObject* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_suspend (SynapseSystemdObject* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_hibernate (SynapseSystemdObject* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_power_off (SynapseSystemdObject* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_can_suspend (SynapseSystemdObject* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_can_hibernate (SynapseSystemdObject* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_can_reboot (SynapseSystemdObject* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_synapse_systemd_object_can_power_off (SynapseSystemdObject* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void synapse_systemd_object_dbus_interface_method_call (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* method_name,
                                                        GVariant* parameters,
                                                        GDBusMethodInvocation* invocation,
                                                        gpointer user_data);
static GVariant* synapse_systemd_object_dbus_interface_get_property (GDBusConnection* connection,
                                                              const gchar* sender,
                                                              const gchar* object_path,
                                                              const gchar* interface_name,
                                                              const gchar* property_name,
                                                              GError** error,
                                                              gpointer user_data);
static gboolean synapse_systemd_object_dbus_interface_set_property (GDBusConnection* connection,
                                                             const gchar* sender,
                                                             const gchar* object_path,
                                                             const gchar* interface_name,
                                                             const gchar* property_name,
                                                             GVariant* value,
                                                             GError** error,
                                                             gpointer user_data);
static void _synapse_systemd_object_unregister_object (gpointer user_data);
static GType synapse_system_management_plugin_system_action_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void synapse_system_management_plugin_real_activate (SynapseActivatable* base);
static void synapse_system_management_plugin_real_deactivate (SynapseActivatable* base);
static void synapse_system_management_plugin_register_plugin (void);
static void _synapse_system_management_plugin_register_plugin_synapse_plugin_register_func (void);
static void synapse_system_management_plugin_real_search_data_free (gpointer _data);
static void synapse_system_management_plugin_real_search (SynapseItemProvider* base,
                                                   SynapseQuery* q,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gboolean synapse_system_management_plugin_real_search_co (SynapseSystemManagementPluginSearchData* _data_);
static gboolean synapse_system_management_plugin_system_action_action_allowed (SynapseSystemManagementPluginSystemAction* self);
static gboolean synapse_system_management_plugin_system_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* self);
static SynapseSystemManagementPluginSystemAction* synapse_system_management_plugin_system_action_construct (GType object_type);
static GType synapse_system_management_plugin_system_action_get_type_once (void);
static GType synapse_system_management_plugin_suspend_action_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseSystemManagementPluginSuspendAction* synapse_system_management_plugin_suspend_action_new (void);
static SynapseSystemManagementPluginSuspendAction* synapse_system_management_plugin_suspend_action_construct (GType object_type);
static void synapse_system_management_plugin_suspend_action_check_allowed_data_free (gpointer _data);
static void synapse_system_management_plugin_suspend_action_check_allowed (SynapseSystemManagementPluginSuspendAction* self,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static void synapse_system_management_plugin_suspend_action_check_allowed_finish (SynapseSystemManagementPluginSuspendAction* self,
                                                                           GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_suspend_action_check_allowed_co (SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_);
static void synapse_system_management_plugin_suspend_action_check_allowed_ready (GObject* source_object,
                                                                          GAsyncResult* _res_,
                                                                          gpointer _user_data_);
static gboolean synapse_system_management_plugin_suspend_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base);
static void synapse_system_management_plugin_suspend_action_do_suspend_data_free (gpointer _data);
static void synapse_system_management_plugin_suspend_action_do_suspend (SynapseSystemManagementPluginSuspendAction* self,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static void synapse_system_management_plugin_suspend_action_do_suspend_finish (SynapseSystemManagementPluginSuspendAction* self,
                                                                        GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_suspend_action_do_suspend_co (SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_);
static void synapse_system_management_plugin_suspend_action_do_suspend_ready (GObject* source_object,
                                                                       GAsyncResult* _res_,
                                                                       gpointer _user_data_);
static gboolean _synapse_system_management_plugin_suspend_action_do_suspend_co_gsource_func (gpointer self);
static void synapse_system_management_plugin_suspend_action_real_do_action (SynapseActionMatch* base);
static GObject * synapse_system_management_plugin_suspend_action_constructor (GType type,
                                                                       guint n_construct_properties,
                                                                       GObjectConstructParam * construct_properties);
static void synapse_system_management_plugin_suspend_action_finalize (GObject * obj);
static GType synapse_system_management_plugin_suspend_action_get_type_once (void);
static GType synapse_system_management_plugin_hibernate_action_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseSystemManagementPluginHibernateAction* synapse_system_management_plugin_hibernate_action_new (void);
static SynapseSystemManagementPluginHibernateAction* synapse_system_management_plugin_hibernate_action_construct (GType object_type);
static void synapse_system_management_plugin_hibernate_action_check_allowed_data_free (gpointer _data);
static void synapse_system_management_plugin_hibernate_action_check_allowed (SynapseSystemManagementPluginHibernateAction* self,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_);
static void synapse_system_management_plugin_hibernate_action_check_allowed_finish (SynapseSystemManagementPluginHibernateAction* self,
                                                                             GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_hibernate_action_check_allowed_co (SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_);
static void synapse_system_management_plugin_hibernate_action_check_allowed_ready (GObject* source_object,
                                                                            GAsyncResult* _res_,
                                                                            gpointer _user_data_);
static gboolean synapse_system_management_plugin_hibernate_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base);
static void synapse_system_management_plugin_hibernate_action_do_hibernate_data_free (gpointer _data);
static void synapse_system_management_plugin_hibernate_action_do_hibernate (SynapseSystemManagementPluginHibernateAction* self,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static void synapse_system_management_plugin_hibernate_action_do_hibernate_finish (SynapseSystemManagementPluginHibernateAction* self,
                                                                            GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_hibernate_action_do_hibernate_co (SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_);
static void synapse_system_management_plugin_hibernate_action_do_hibernate_ready (GObject* source_object,
                                                                           GAsyncResult* _res_,
                                                                           gpointer _user_data_);
static gboolean _synapse_system_management_plugin_hibernate_action_do_hibernate_co_gsource_func (gpointer self);
static void synapse_system_management_plugin_hibernate_action_real_do_action (SynapseActionMatch* base);
static GObject * synapse_system_management_plugin_hibernate_action_constructor (GType type,
                                                                         guint n_construct_properties,
                                                                         GObjectConstructParam * construct_properties);
static void synapse_system_management_plugin_hibernate_action_finalize (GObject * obj);
static GType synapse_system_management_plugin_hibernate_action_get_type_once (void);
static GType synapse_system_management_plugin_shutdown_action_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseSystemManagementPluginShutdownAction* synapse_system_management_plugin_shutdown_action_new (void);
static SynapseSystemManagementPluginShutdownAction* synapse_system_management_plugin_shutdown_action_construct (GType object_type);
static void synapse_system_management_plugin_shutdown_action_check_allowed_data_free (gpointer _data);
static void synapse_system_management_plugin_shutdown_action_check_allowed (SynapseSystemManagementPluginShutdownAction* self,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static void synapse_system_management_plugin_shutdown_action_check_allowed_finish (SynapseSystemManagementPluginShutdownAction* self,
                                                                            GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_shutdown_action_check_allowed_co (SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_);
static void synapse_system_management_plugin_shutdown_action_check_allowed_ready (GObject* source_object,
                                                                           GAsyncResult* _res_,
                                                                           gpointer _user_data_);
static gboolean synapse_system_management_plugin_shutdown_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base);
static void synapse_system_management_plugin_shutdown_action_real_do_action (SynapseActionMatch* base);
static GObject * synapse_system_management_plugin_shutdown_action_constructor (GType type,
                                                                        guint n_construct_properties,
                                                                        GObjectConstructParam * construct_properties);
static void synapse_system_management_plugin_shutdown_action_finalize (GObject * obj);
static GType synapse_system_management_plugin_shutdown_action_get_type_once (void);
static GType synapse_system_management_plugin_restart_action_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static SynapseSystemManagementPluginRestartAction* synapse_system_management_plugin_restart_action_new (void);
static SynapseSystemManagementPluginRestartAction* synapse_system_management_plugin_restart_action_construct (GType object_type);
static void synapse_system_management_plugin_restart_action_check_allowed_data_free (gpointer _data);
static void synapse_system_management_plugin_restart_action_check_allowed (SynapseSystemManagementPluginRestartAction* self,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static void synapse_system_management_plugin_restart_action_check_allowed_finish (SynapseSystemManagementPluginRestartAction* self,
                                                                           GAsyncResult* _res_);
static gboolean synapse_system_management_plugin_restart_action_check_allowed_co (SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_);
static void synapse_system_management_plugin_restart_action_check_allowed_ready (GObject* source_object,
                                                                          GAsyncResult* _res_,
                                                                          gpointer _user_data_);
static gboolean synapse_system_management_plugin_restart_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base);
static void synapse_system_management_plugin_restart_action_real_do_action (SynapseActionMatch* base);
static GObject * synapse_system_management_plugin_restart_action_constructor (GType type,
                                                                       guint n_construct_properties,
                                                                       GObjectConstructParam * construct_properties);
static void synapse_system_management_plugin_restart_action_finalize (GObject * obj);
static GType synapse_system_management_plugin_restart_action_get_type_once (void);
static GObject * synapse_system_management_plugin_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static void synapse_system_management_plugin_finalize (GObject * obj);
static GType synapse_system_management_plugin_get_type_once (void);
static void _vala_synapse_system_management_plugin_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_synapse_system_management_plugin_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);

static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_hibernate_in[] = {NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_hibernate_out[] = {NULL};
static const GDBusMethodInfo _synapse_upower_object_dbus_method_info_hibernate = {-1, "Hibernate", (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_hibernate_in), (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_hibernate_out), NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_suspend_in[] = {NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_suspend_out[] = {NULL};
static const GDBusMethodInfo _synapse_upower_object_dbus_method_info_suspend = {-1, "Suspend", (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_suspend_in), (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_suspend_out), NULL};
static const GDBusArgInfo _synapse_upower_object_dbus_arg_info_hibernate_allowed_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_hibernate_allowed_in[] = {NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_hibernate_allowed_out[] = {&_synapse_upower_object_dbus_arg_info_hibernate_allowed_result, NULL};
static const GDBusMethodInfo _synapse_upower_object_dbus_method_info_hibernate_allowed = {-1, "HibernateAllowed", (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_hibernate_allowed_in), (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_hibernate_allowed_out), NULL};
static const GDBusArgInfo _synapse_upower_object_dbus_arg_info_suspend_allowed_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_suspend_allowed_in[] = {NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_suspend_allowed_out[] = {&_synapse_upower_object_dbus_arg_info_suspend_allowed_result, NULL};
static const GDBusMethodInfo _synapse_upower_object_dbus_method_info_suspend_allowed = {-1, "SuspendAllowed", (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_suspend_allowed_in), (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_suspend_allowed_out), NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_about_to_sleep_in[] = {NULL};
static const GDBusArgInfo * const _synapse_upower_object_dbus_arg_info_about_to_sleep_out[] = {NULL};
static const GDBusMethodInfo _synapse_upower_object_dbus_method_info_about_to_sleep = {-1, "AboutToSleep", (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_about_to_sleep_in), (GDBusArgInfo **) (&_synapse_upower_object_dbus_arg_info_about_to_sleep_out), NULL};
static const GDBusMethodInfo * const _synapse_upower_object_dbus_method_info[] = {&_synapse_upower_object_dbus_method_info_hibernate, &_synapse_upower_object_dbus_method_info_suspend, &_synapse_upower_object_dbus_method_info_hibernate_allowed, &_synapse_upower_object_dbus_method_info_suspend_allowed, &_synapse_upower_object_dbus_method_info_about_to_sleep, NULL};
static const GDBusSignalInfo * const _synapse_upower_object_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _synapse_upower_object_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _synapse_upower_object_dbus_interface_info = {-1, "org.freedesktop.UPower", (GDBusMethodInfo **) (&_synapse_upower_object_dbus_method_info), (GDBusSignalInfo **) (&_synapse_upower_object_dbus_signal_info), (GDBusPropertyInfo **) (&_synapse_upower_object_dbus_property_info), NULL};
static const GDBusInterfaceVTable _synapse_upower_object_dbus_interface_vtable = {synapse_upower_object_dbus_interface_method_call, synapse_upower_object_dbus_interface_get_property, synapse_upower_object_dbus_interface_set_property};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_restart_in[] = {NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_restart_out[] = {NULL};
static const GDBusMethodInfo _synapse_console_kit_object_dbus_method_info_restart = {-1, "Restart", (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_restart_in), (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_restart_out), NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_stop_in[] = {NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_stop_out[] = {NULL};
static const GDBusMethodInfo _synapse_console_kit_object_dbus_method_info_stop = {-1, "Stop", (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_stop_in), (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_stop_out), NULL};
static const GDBusArgInfo _synapse_console_kit_object_dbus_arg_info_can_restart_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_can_restart_in[] = {NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_can_restart_out[] = {&_synapse_console_kit_object_dbus_arg_info_can_restart_result, NULL};
static const GDBusMethodInfo _synapse_console_kit_object_dbus_method_info_can_restart = {-1, "CanRestart", (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_can_restart_in), (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_can_restart_out), NULL};
static const GDBusArgInfo _synapse_console_kit_object_dbus_arg_info_can_stop_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_can_stop_in[] = {NULL};
static const GDBusArgInfo * const _synapse_console_kit_object_dbus_arg_info_can_stop_out[] = {&_synapse_console_kit_object_dbus_arg_info_can_stop_result, NULL};
static const GDBusMethodInfo _synapse_console_kit_object_dbus_method_info_can_stop = {-1, "CanStop", (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_can_stop_in), (GDBusArgInfo **) (&_synapse_console_kit_object_dbus_arg_info_can_stop_out), NULL};
static const GDBusMethodInfo * const _synapse_console_kit_object_dbus_method_info[] = {&_synapse_console_kit_object_dbus_method_info_restart, &_synapse_console_kit_object_dbus_method_info_stop, &_synapse_console_kit_object_dbus_method_info_can_restart, &_synapse_console_kit_object_dbus_method_info_can_stop, NULL};
static const GDBusSignalInfo * const _synapse_console_kit_object_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _synapse_console_kit_object_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _synapse_console_kit_object_dbus_interface_info = {-1, "org.freedesktop.ConsoleKit.Manager", (GDBusMethodInfo **) (&_synapse_console_kit_object_dbus_method_info), (GDBusSignalInfo **) (&_synapse_console_kit_object_dbus_signal_info), (GDBusPropertyInfo **) (&_synapse_console_kit_object_dbus_property_info), NULL};
static const GDBusInterfaceVTable _synapse_console_kit_object_dbus_interface_vtable = {synapse_console_kit_object_dbus_interface_method_call, synapse_console_kit_object_dbus_interface_get_property, synapse_console_kit_object_dbus_interface_set_property};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_reboot_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_reboot_in[] = {&_synapse_systemd_object_dbus_arg_info_reboot_interactive, NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_reboot_out[] = {NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_reboot = {-1, "Reboot", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_reboot_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_reboot_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_suspend_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_suspend_in[] = {&_synapse_systemd_object_dbus_arg_info_suspend_interactive, NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_suspend_out[] = {NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_suspend = {-1, "Suspend", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_suspend_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_suspend_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_hibernate_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_hibernate_in[] = {&_synapse_systemd_object_dbus_arg_info_hibernate_interactive, NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_hibernate_out[] = {NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_hibernate = {-1, "Hibernate", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_hibernate_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_hibernate_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_power_off_interactive = {-1, "interactive", "b", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_power_off_in[] = {&_synapse_systemd_object_dbus_arg_info_power_off_interactive, NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_power_off_out[] = {NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_power_off = {-1, "PowerOff", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_power_off_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_power_off_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_can_suspend_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_suspend_in[] = {NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_suspend_out[] = {&_synapse_systemd_object_dbus_arg_info_can_suspend_result, NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_can_suspend = {-1, "CanSuspend", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_suspend_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_suspend_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_can_hibernate_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_hibernate_in[] = {NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_hibernate_out[] = {&_synapse_systemd_object_dbus_arg_info_can_hibernate_result, NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_can_hibernate = {-1, "CanHibernate", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_hibernate_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_hibernate_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_can_reboot_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_reboot_in[] = {NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_reboot_out[] = {&_synapse_systemd_object_dbus_arg_info_can_reboot_result, NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_can_reboot = {-1, "CanReboot", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_reboot_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_reboot_out), NULL};
static const GDBusArgInfo _synapse_systemd_object_dbus_arg_info_can_power_off_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_power_off_in[] = {NULL};
static const GDBusArgInfo * const _synapse_systemd_object_dbus_arg_info_can_power_off_out[] = {&_synapse_systemd_object_dbus_arg_info_can_power_off_result, NULL};
static const GDBusMethodInfo _synapse_systemd_object_dbus_method_info_can_power_off = {-1, "CanPowerOff", (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_power_off_in), (GDBusArgInfo **) (&_synapse_systemd_object_dbus_arg_info_can_power_off_out), NULL};
static const GDBusMethodInfo * const _synapse_systemd_object_dbus_method_info[] = {&_synapse_systemd_object_dbus_method_info_reboot, &_synapse_systemd_object_dbus_method_info_suspend, &_synapse_systemd_object_dbus_method_info_hibernate, &_synapse_systemd_object_dbus_method_info_power_off, &_synapse_systemd_object_dbus_method_info_can_suspend, &_synapse_systemd_object_dbus_method_info_can_hibernate, &_synapse_systemd_object_dbus_method_info_can_reboot, &_synapse_systemd_object_dbus_method_info_can_power_off, NULL};
static const GDBusSignalInfo * const _synapse_systemd_object_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _synapse_systemd_object_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _synapse_systemd_object_dbus_interface_info = {-1, "org.freedesktop.login1.Manager", (GDBusMethodInfo **) (&_synapse_systemd_object_dbus_method_info), (GDBusSignalInfo **) (&_synapse_systemd_object_dbus_signal_info), (GDBusPropertyInfo **) (&_synapse_systemd_object_dbus_property_info), NULL};
static const GDBusInterfaceVTable _synapse_systemd_object_dbus_interface_vtable = {synapse_systemd_object_dbus_interface_method_call, synapse_systemd_object_dbus_interface_get_property, synapse_systemd_object_dbus_interface_set_property};

void
synapse_upower_object_hibernate (SynapseUPowerObject* self,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->hibernate) {
#line 25 "system-management.vala"
		_iface_->hibernate (self, _callback_, _user_data_);
#line 911 "system-management.c"
	}
}

void
synapse_upower_object_hibernate_finish (SynapseUPowerObject* self,
                                        GAsyncResult* _res_,
                                        GError** error)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->hibernate_finish) {
#line 25 "system-management.vala"
		_iface_->hibernate_finish (self, _res_, error);
#line 927 "system-management.c"
	}
}

void
synapse_upower_object_suspend (SynapseUPowerObject* self,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->suspend) {
#line 25 "system-management.vala"
		_iface_->suspend (self, _callback_, _user_data_);
#line 943 "system-management.c"
	}
}

void
synapse_upower_object_suspend_finish (SynapseUPowerObject* self,
                                      GAsyncResult* _res_,
                                      GError** error)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->suspend_finish) {
#line 25 "system-management.vala"
		_iface_->suspend_finish (self, _res_, error);
#line 959 "system-management.c"
	}
}

void
synapse_upower_object_hibernate_allowed (SynapseUPowerObject* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->hibernate_allowed) {
#line 25 "system-management.vala"
		_iface_->hibernate_allowed (self, _callback_, _user_data_);
#line 975 "system-management.c"
	}
}

gboolean
synapse_upower_object_hibernate_allowed_finish (SynapseUPowerObject* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->hibernate_allowed_finish) {
#line 25 "system-management.vala"
		return _iface_->hibernate_allowed_finish (self, _res_, error);
#line 991 "system-management.c"
	}
#line 25 "system-management.vala"
	return FALSE;
#line 995 "system-management.c"
}

void
synapse_upower_object_suspend_allowed (SynapseUPowerObject* self,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->suspend_allowed) {
#line 25 "system-management.vala"
		_iface_->suspend_allowed (self, _callback_, _user_data_);
#line 1010 "system-management.c"
	}
}

gboolean
synapse_upower_object_suspend_allowed_finish (SynapseUPowerObject* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->suspend_allowed_finish) {
#line 25 "system-management.vala"
		return _iface_->suspend_allowed_finish (self, _res_, error);
#line 1026 "system-management.c"
	}
#line 25 "system-management.vala"
	return FALSE;
#line 1030 "system-management.c"
}

void
synapse_upower_object_about_to_sleep (SynapseUPowerObject* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->about_to_sleep) {
#line 25 "system-management.vala"
		_iface_->about_to_sleep (self, _callback_, _user_data_);
#line 1045 "system-management.c"
	}
}

void
synapse_upower_object_about_to_sleep_finish (SynapseUPowerObject* self,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	SynapseUPowerObjectIface* _iface_;
#line 25 "system-management.vala"
	_iface_ = SYNAPSE_UPOWER_OBJECT_GET_INTERFACE (self);
#line 25 "system-management.vala"
	if (_iface_->about_to_sleep_finish) {
#line 25 "system-management.vala"
		_iface_->about_to_sleep_finish (self, _res_, error);
#line 1061 "system-management.c"
	}
}

static void
synapse_upower_object_default_init (SynapseUPowerObjectIface * iface,
                                    gpointer iface_data)
{
}

static GType
synapse_upower_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseUPowerObjectIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_upower_object_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType synapse_upower_object_type_id;
	synapse_upower_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "SynapseUPowerObject", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (synapse_upower_object_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (synapse_upower_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) synapse_upower_object_proxy_get_type);
	g_type_set_qdata (synapse_upower_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.UPower");
	g_type_set_qdata (synapse_upower_object_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_synapse_upower_object_dbus_interface_info));
	g_type_set_qdata (synapse_upower_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) synapse_upower_object_register_object);
	return synapse_upower_object_type_id;
}

GType
synapse_upower_object_get_type (void)
{
	static volatile gsize synapse_upower_object_type_id__once = 0;
	if (g_once_init_enter (&synapse_upower_object_type_id__once)) {
		GType synapse_upower_object_type_id;
		synapse_upower_object_type_id = synapse_upower_object_get_type_once ();
		g_once_init_leave (&synapse_upower_object_type_id__once, synapse_upower_object_type_id);
	}
	return synapse_upower_object_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SynapseUPowerObjectProxy, synapse_upower_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SYNAPSE_TYPE_UPOWER_OBJECT, synapse_upower_object_proxy_synapse_upower_object_interface_init) )
static void
synapse_upower_object_proxy_class_init (SynapseUPowerObjectProxyClass* klass)
{
#line 24 "pastebin-plugin.vala"
	G_DBUS_PROXY_CLASS (klass)->g_signal = synapse_upower_object_proxy_g_signal;
#line 1103 "system-management.c"
}

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

static void
synapse_upower_object_proxy_init (SynapseUPowerObjectProxy* self)
{
#line 24 "pastebin-plugin.vala"
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_synapse_upower_object_dbus_interface_info));
#line 1119 "system-management.c"
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
#line 24 "pastebin-plugin.vala"
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
#line 24 "pastebin-plugin.vala"
	g_object_unref (user_data);
#line 1131 "system-management.c"
}

static void
synapse_upower_object_proxy_hibernate_async (SynapseUPowerObject* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.UPower", "Hibernate");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 1154 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 1160 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 1164 "system-management.c"
}

static void
synapse_upower_object_proxy_hibernate_finish (SynapseUPowerObject* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 1184 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 1192 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1196 "system-management.c"
}

static void
synapse_upower_object_proxy_suspend_async (SynapseUPowerObject* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.UPower", "Suspend");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 1219 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 1225 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 1229 "system-management.c"
}

static void
synapse_upower_object_proxy_suspend_finish (SynapseUPowerObject* self,
                                            GAsyncResult* _res_,
                                            GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 1249 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 1257 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1261 "system-management.c"
}

static void
synapse_upower_object_proxy_hibernate_allowed_async (SynapseUPowerObject* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.UPower", "HibernateAllowed");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 1284 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 1290 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 1294 "system-management.c"
}

static gboolean
synapse_upower_object_proxy_hibernate_allowed_finish (SynapseUPowerObject* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp77_;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 1316 "system-management.c"
		gboolean _tmp75_ = FALSE;
#line 24 "pastebin-plugin.vala"
		return _tmp75_;
#line 1320 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 1324 "system-management.c"
		gboolean _tmp76_ = FALSE;
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return _tmp76_;
#line 1330 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp77_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_get_boolean (_tmp77_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp77_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 1346 "system-management.c"
}

static void
synapse_upower_object_proxy_suspend_allowed_async (SynapseUPowerObject* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.UPower", "SuspendAllowed");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 1369 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 1375 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 1379 "system-management.c"
}

static gboolean
synapse_upower_object_proxy_suspend_allowed_finish (SynapseUPowerObject* self,
                                                    GAsyncResult* _res_,
                                                    GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp80_;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 1401 "system-management.c"
		gboolean _tmp78_ = FALSE;
#line 24 "pastebin-plugin.vala"
		return _tmp78_;
#line 1405 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 1409 "system-management.c"
		gboolean _tmp79_ = FALSE;
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return _tmp79_;
#line 1415 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp80_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_get_boolean (_tmp80_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp80_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 1431 "system-management.c"
}

static void
synapse_upower_object_proxy_about_to_sleep_async (SynapseUPowerObject* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.UPower", "AboutToSleep");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 1454 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 1460 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 1464 "system-management.c"
}

static void
synapse_upower_object_proxy_about_to_sleep_finish (SynapseUPowerObject* self,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 1484 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 1492 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1496 "system-management.c"
}

static void
synapse_upower_object_proxy_synapse_upower_object_interface_init (SynapseUPowerObjectIface* iface)
{
#line 24 "pastebin-plugin.vala"
	iface->hibernate = synapse_upower_object_proxy_hibernate_async;
#line 24 "pastebin-plugin.vala"
	iface->hibernate_finish = synapse_upower_object_proxy_hibernate_finish;
#line 24 "pastebin-plugin.vala"
	iface->suspend = synapse_upower_object_proxy_suspend_async;
#line 24 "pastebin-plugin.vala"
	iface->suspend_finish = synapse_upower_object_proxy_suspend_finish;
#line 24 "pastebin-plugin.vala"
	iface->hibernate_allowed = synapse_upower_object_proxy_hibernate_allowed_async;
#line 24 "pastebin-plugin.vala"
	iface->hibernate_allowed_finish = synapse_upower_object_proxy_hibernate_allowed_finish;
#line 24 "pastebin-plugin.vala"
	iface->suspend_allowed = synapse_upower_object_proxy_suspend_allowed_async;
#line 24 "pastebin-plugin.vala"
	iface->suspend_allowed_finish = synapse_upower_object_proxy_suspend_allowed_finish;
#line 24 "pastebin-plugin.vala"
	iface->about_to_sleep = synapse_upower_object_proxy_about_to_sleep_async;
#line 24 "pastebin-plugin.vala"
	iface->about_to_sleep_finish = synapse_upower_object_proxy_about_to_sleep_finish;
#line 1522 "system-management.c"
}

static void
_dbus_synapse_upower_object_hibernate (SynapseUPowerObject* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseUpowerObjectHibernateReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseUpowerObjectHibernateReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_hibernate (self, (GAsyncReadyCallback) _dbus_synapse_upower_object_hibernate_ready, _ready_data);
#line 1540 "system-management.c"
}

static void
_dbus_synapse_upower_object_hibernate_ready (GObject * source_object,
                                             GAsyncResult * _res_,
                                             gpointer _user_data_)
{
	SynapseUpowerObjectHibernateReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_hibernate_finish ((SynapseUPowerObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 1562 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1579 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseUpowerObjectHibernateReadyData, _ready_data);
#line 1583 "system-management.c"
}

static void
_dbus_synapse_upower_object_suspend (SynapseUPowerObject* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseUpowerObjectSuspendReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseUpowerObjectSuspendReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_suspend (self, (GAsyncReadyCallback) _dbus_synapse_upower_object_suspend_ready, _ready_data);
#line 1601 "system-management.c"
}

static void
_dbus_synapse_upower_object_suspend_ready (GObject * source_object,
                                           GAsyncResult * _res_,
                                           gpointer _user_data_)
{
	SynapseUpowerObjectSuspendReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_suspend_finish ((SynapseUPowerObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 1623 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1640 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseUpowerObjectSuspendReadyData, _ready_data);
#line 1644 "system-management.c"
}

static void
_dbus_synapse_upower_object_hibernate_allowed (SynapseUPowerObject* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseUpowerObjectHibernateAllowedReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseUpowerObjectHibernateAllowedReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_hibernate_allowed (self, (GAsyncReadyCallback) _dbus_synapse_upower_object_hibernate_allowed_ready, _ready_data);
#line 1662 "system-management.c"
}

static void
_dbus_synapse_upower_object_hibernate_allowed_ready (GObject * source_object,
                                                     GAsyncResult * _res_,
                                                     gpointer _user_data_)
{
	SynapseUpowerObjectHibernateAllowedReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	result = synapse_upower_object_hibernate_allowed_finish ((SynapseUPowerObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 1685 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1704 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseUpowerObjectHibernateAllowedReadyData, _ready_data);
#line 1708 "system-management.c"
}

static void
_dbus_synapse_upower_object_suspend_allowed (SynapseUPowerObject* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseUpowerObjectSuspendAllowedReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseUpowerObjectSuspendAllowedReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_suspend_allowed (self, (GAsyncReadyCallback) _dbus_synapse_upower_object_suspend_allowed_ready, _ready_data);
#line 1726 "system-management.c"
}

static void
_dbus_synapse_upower_object_suspend_allowed_ready (GObject * source_object,
                                                   GAsyncResult * _res_,
                                                   gpointer _user_data_)
{
	SynapseUpowerObjectSuspendAllowedReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	result = synapse_upower_object_suspend_allowed_finish ((SynapseUPowerObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 1749 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1768 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseUpowerObjectSuspendAllowedReadyData, _ready_data);
#line 1772 "system-management.c"
}

static void
_dbus_synapse_upower_object_about_to_sleep (SynapseUPowerObject* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseUpowerObjectAboutToSleepReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseUpowerObjectAboutToSleepReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_about_to_sleep (self, (GAsyncReadyCallback) _dbus_synapse_upower_object_about_to_sleep_ready, _ready_data);
#line 1790 "system-management.c"
}

static void
_dbus_synapse_upower_object_about_to_sleep_ready (GObject * source_object,
                                                  GAsyncResult * _res_,
                                                  gpointer _user_data_)
{
	SynapseUpowerObjectAboutToSleepReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	synapse_upower_object_about_to_sleep_finish ((SynapseUPowerObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 1812 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 1829 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseUpowerObjectAboutToSleepReadyData, _ready_data);
#line 1833 "system-management.c"
}

static void
synapse_upower_object_dbus_interface_method_call (GDBusConnection* connection,
                                                  const gchar* sender,
                                                  const gchar* object_path,
                                                  const gchar* interface_name,
                                                  const gchar* method_name,
                                                  GVariant* parameters,
                                                  GDBusMethodInvocation* invocation,
                                                  gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	if (strcmp (method_name, "Hibernate") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_upower_object_hibernate (object, parameters, invocation);
#line 1854 "system-management.c"
	} else if (strcmp (method_name, "Suspend") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_upower_object_suspend (object, parameters, invocation);
#line 1858 "system-management.c"
	} else if (strcmp (method_name, "HibernateAllowed") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_upower_object_hibernate_allowed (object, parameters, invocation);
#line 1862 "system-management.c"
	} else if (strcmp (method_name, "SuspendAllowed") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_upower_object_suspend_allowed (object, parameters, invocation);
#line 1866 "system-management.c"
	} else if (strcmp (method_name, "AboutToSleep") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_upower_object_about_to_sleep (object, parameters, invocation);
#line 1870 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_object_unref (invocation);
#line 1874 "system-management.c"
	}
}

static GVariant*
synapse_upower_object_dbus_interface_get_property (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* property_name,
                                                   GError** error,
                                                   gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return NULL;
#line 1893 "system-management.c"
}

static gboolean
synapse_upower_object_dbus_interface_set_property (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* property_name,
                                                   GVariant* value,
                                                   GError** error,
                                                   gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return FALSE;
#line 1912 "system-management.c"
}

guint
synapse_upower_object_register_object (gpointer object,
                                       GDBusConnection* connection,
                                       const gchar* path,
                                       GError** error)
{
	guint result;
	gpointer *data;
#line 24 "pastebin-plugin.vala"
	data = g_new (gpointer, 3);
#line 24 "pastebin-plugin.vala"
	data[0] = g_object_ref (object);
#line 24 "pastebin-plugin.vala"
	data[1] = g_object_ref (connection);
#line 24 "pastebin-plugin.vala"
	data[2] = g_strdup (path);
#line 24 "pastebin-plugin.vala"
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_synapse_upower_object_dbus_interface_info), &_synapse_upower_object_dbus_interface_vtable, data, _synapse_upower_object_unregister_object, error);
#line 24 "pastebin-plugin.vala"
	if (!result) {
#line 24 "pastebin-plugin.vala"
		return 0;
#line 1937 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	return result;
#line 1941 "system-management.c"
}

static void
_synapse_upower_object_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[0]);
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[1]);
#line 24 "pastebin-plugin.vala"
	g_free (data[2]);
#line 24 "pastebin-plugin.vala"
	g_free (data);
#line 1957 "system-management.c"
}

void
synapse_console_kit_object_restart (SynapseConsoleKitObject* self,
                                    GError** error)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 44 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 44 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 44 "system-management.vala"
	if (_iface_->restart) {
#line 44 "system-management.vala"
		_iface_->restart (self, error);
#line 1973 "system-management.c"
	}
}

void
synapse_console_kit_object_stop (SynapseConsoleKitObject* self,
                                 GError** error)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 45 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 45 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 45 "system-management.vala"
	if (_iface_->stop) {
#line 45 "system-management.vala"
		_iface_->stop (self, error);
#line 1990 "system-management.c"
	}
}

void
synapse_console_kit_object_can_restart (SynapseConsoleKitObject* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 39 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 39 "system-management.vala"
	if (_iface_->can_restart) {
#line 39 "system-management.vala"
		_iface_->can_restart (self, _callback_, _user_data_);
#line 2006 "system-management.c"
	}
}

gboolean
synapse_console_kit_object_can_restart_finish (SynapseConsoleKitObject* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 39 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 39 "system-management.vala"
	if (_iface_->can_restart_finish) {
#line 39 "system-management.vala"
		return _iface_->can_restart_finish (self, _res_, error);
#line 2022 "system-management.c"
	}
#line 39 "system-management.vala"
	return FALSE;
#line 2026 "system-management.c"
}

void
synapse_console_kit_object_can_stop (SynapseConsoleKitObject* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 39 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 39 "system-management.vala"
	if (_iface_->can_stop) {
#line 39 "system-management.vala"
		_iface_->can_stop (self, _callback_, _user_data_);
#line 2041 "system-management.c"
	}
}

gboolean
synapse_console_kit_object_can_stop_finish (SynapseConsoleKitObject* self,
                                            GAsyncResult* _res_,
                                            GError** error)
{
	SynapseConsoleKitObjectIface* _iface_;
#line 39 "system-management.vala"
	_iface_ = SYNAPSE_CONSOLE_KIT_OBJECT_GET_INTERFACE (self);
#line 39 "system-management.vala"
	if (_iface_->can_stop_finish) {
#line 39 "system-management.vala"
		return _iface_->can_stop_finish (self, _res_, error);
#line 2057 "system-management.c"
	}
#line 39 "system-management.vala"
	return FALSE;
#line 2061 "system-management.c"
}

static void
synapse_console_kit_object_default_init (SynapseConsoleKitObjectIface * iface,
                                         gpointer iface_data)
{
}

static GType
synapse_console_kit_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseConsoleKitObjectIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_console_kit_object_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType synapse_console_kit_object_type_id;
	synapse_console_kit_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "SynapseConsoleKitObject", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (synapse_console_kit_object_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (synapse_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) synapse_console_kit_object_proxy_get_type);
	g_type_set_qdata (synapse_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.ConsoleKit.Manager");
	g_type_set_qdata (synapse_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_synapse_console_kit_object_dbus_interface_info));
	g_type_set_qdata (synapse_console_kit_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) synapse_console_kit_object_register_object);
	return synapse_console_kit_object_type_id;
}

GType
synapse_console_kit_object_get_type (void)
{
	static volatile gsize synapse_console_kit_object_type_id__once = 0;
	if (g_once_init_enter (&synapse_console_kit_object_type_id__once)) {
		GType synapse_console_kit_object_type_id;
		synapse_console_kit_object_type_id = synapse_console_kit_object_get_type_once ();
		g_once_init_leave (&synapse_console_kit_object_type_id__once, synapse_console_kit_object_type_id);
	}
	return synapse_console_kit_object_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SynapseConsoleKitObjectProxy, synapse_console_kit_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SYNAPSE_TYPE_CONSOLE_KIT_OBJECT, synapse_console_kit_object_proxy_synapse_console_kit_object_interface_init) )
static void
synapse_console_kit_object_proxy_class_init (SynapseConsoleKitObjectProxyClass* klass)
{
#line 24 "pastebin-plugin.vala"
	G_DBUS_PROXY_CLASS (klass)->g_signal = synapse_console_kit_object_proxy_g_signal;
#line 2102 "system-management.c"
}

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

static void
synapse_console_kit_object_proxy_init (SynapseConsoleKitObjectProxy* self)
{
#line 24 "pastebin-plugin.vala"
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_synapse_console_kit_object_dbus_interface_info));
#line 2118 "system-management.c"
}

static void
synapse_console_kit_object_proxy_restart (SynapseConsoleKitObject* self,
                                          GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Restart");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 2145 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 2153 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2157 "system-management.c"
}

static void
synapse_console_kit_object_proxy_stop (SynapseConsoleKitObject* self,
                                       GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Stop");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 2184 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 2192 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2196 "system-management.c"
}

static void
synapse_console_kit_object_proxy_can_restart_async (SynapseConsoleKitObject* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanRestart");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 2219 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 2225 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 2229 "system-management.c"
}

static gboolean
synapse_console_kit_object_proxy_can_restart_finish (SynapseConsoleKitObject* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp83_;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 2251 "system-management.c"
		gboolean _tmp81_ = FALSE;
#line 24 "pastebin-plugin.vala"
		return _tmp81_;
#line 2255 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 2259 "system-management.c"
		gboolean _tmp82_ = FALSE;
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return _tmp82_;
#line 2265 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp83_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_get_boolean (_tmp83_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp83_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 2281 "system-management.c"
}

static void
synapse_console_kit_object_proxy_can_stop_async (SynapseConsoleKitObject* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
#line 24 "pastebin-plugin.vala"
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanStop");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	if (_callback_ != NULL) {
#line 24 "pastebin-plugin.vala"
		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_));
#line 2304 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
#line 24 "pastebin-plugin.vala"
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 2310 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 2314 "system-management.c"
}

static gboolean
synapse_console_kit_object_proxy_can_stop_finish (SynapseConsoleKitObject* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp86_;
#line 24 "pastebin-plugin.vala"
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_inner_res);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 2336 "system-management.c"
		gboolean _tmp84_ = FALSE;
#line 24 "pastebin-plugin.vala"
		return _tmp84_;
#line 2340 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 2344 "system-management.c"
		gboolean _tmp85_ = FALSE;
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return _tmp85_;
#line 2350 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp86_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_get_boolean (_tmp86_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp86_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 2366 "system-management.c"
}

static void
synapse_console_kit_object_proxy_synapse_console_kit_object_interface_init (SynapseConsoleKitObjectIface* iface)
{
#line 24 "pastebin-plugin.vala"
	iface->restart = synapse_console_kit_object_proxy_restart;
#line 24 "pastebin-plugin.vala"
	iface->stop = synapse_console_kit_object_proxy_stop;
#line 24 "pastebin-plugin.vala"
	iface->can_restart = synapse_console_kit_object_proxy_can_restart_async;
#line 24 "pastebin-plugin.vala"
	iface->can_restart_finish = synapse_console_kit_object_proxy_can_restart_finish;
#line 24 "pastebin-plugin.vala"
	iface->can_stop = synapse_console_kit_object_proxy_can_stop_async;
#line 24 "pastebin-plugin.vala"
	iface->can_stop_finish = synapse_console_kit_object_proxy_can_stop_finish;
#line 2384 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_restart (SynapseConsoleKitObject* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	synapse_console_kit_object_restart (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 2407 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2423 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_stop (SynapseConsoleKitObject* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	synapse_console_kit_object_stop (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 2446 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2462 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_can_restart (SynapseConsoleKitObject* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseConsoleKitObjectCanRestartReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseConsoleKitObjectCanRestartReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_console_kit_object_can_restart (self, (GAsyncReadyCallback) _dbus_synapse_console_kit_object_can_restart_ready, _ready_data);
#line 2480 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_can_restart_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_)
{
	SynapseConsoleKitObjectCanRestartReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	result = synapse_console_kit_object_can_restart_finish ((SynapseConsoleKitObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 2503 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2522 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseConsoleKitObjectCanRestartReadyData, _ready_data);
#line 2526 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_can_stop (SynapseConsoleKitObject* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SynapseConsoleKitObjectCanStopReadyData* _ready_data;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_ready_data = g_slice_new0 (SynapseConsoleKitObjectCanStopReadyData);
#line 24 "pastebin-plugin.vala"
	_ready_data->_invocation_ = invocation;
#line 24 "pastebin-plugin.vala"
	synapse_console_kit_object_can_stop (self, (GAsyncReadyCallback) _dbus_synapse_console_kit_object_can_stop_ready, _ready_data);
#line 2544 "system-management.c"
}

static void
_dbus_synapse_console_kit_object_can_stop_ready (GObject * source_object,
                                                 GAsyncResult * _res_,
                                                 gpointer _user_data_)
{
	SynapseConsoleKitObjectCanStopReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
#line 24 "pastebin-plugin.vala"
	result = synapse_console_kit_object_can_stop_finish ((SynapseConsoleKitObject*) source_object, _res_, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 2567 "system-management.c"
		goto _error;
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2586 "system-management.c"
	_error:
#line 24 "pastebin-plugin.vala"
	g_slice_free (SynapseConsoleKitObjectCanStopReadyData, _ready_data);
#line 2590 "system-management.c"
}

static void
synapse_console_kit_object_dbus_interface_method_call (GDBusConnection* connection,
                                                       const gchar* sender,
                                                       const gchar* object_path,
                                                       const gchar* interface_name,
                                                       const gchar* method_name,
                                                       GVariant* parameters,
                                                       GDBusMethodInvocation* invocation,
                                                       gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	if (strcmp (method_name, "Restart") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_console_kit_object_restart (object, parameters, invocation);
#line 2611 "system-management.c"
	} else if (strcmp (method_name, "Stop") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_console_kit_object_stop (object, parameters, invocation);
#line 2615 "system-management.c"
	} else if (strcmp (method_name, "CanRestart") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_console_kit_object_can_restart (object, parameters, invocation);
#line 2619 "system-management.c"
	} else if (strcmp (method_name, "CanStop") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_console_kit_object_can_stop (object, parameters, invocation);
#line 2623 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_object_unref (invocation);
#line 2627 "system-management.c"
	}
}

static GVariant*
synapse_console_kit_object_dbus_interface_get_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GError** error,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return NULL;
#line 2646 "system-management.c"
}

static gboolean
synapse_console_kit_object_dbus_interface_set_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GVariant* value,
                                                        GError** error,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return FALSE;
#line 2665 "system-management.c"
}

guint
synapse_console_kit_object_register_object (gpointer object,
                                            GDBusConnection* connection,
                                            const gchar* path,
                                            GError** error)
{
	guint result;
	gpointer *data;
#line 24 "pastebin-plugin.vala"
	data = g_new (gpointer, 3);
#line 24 "pastebin-plugin.vala"
	data[0] = g_object_ref (object);
#line 24 "pastebin-plugin.vala"
	data[1] = g_object_ref (connection);
#line 24 "pastebin-plugin.vala"
	data[2] = g_strdup (path);
#line 24 "pastebin-plugin.vala"
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_synapse_console_kit_object_dbus_interface_info), &_synapse_console_kit_object_dbus_interface_vtable, data, _synapse_console_kit_object_unregister_object, error);
#line 24 "pastebin-plugin.vala"
	if (!result) {
#line 24 "pastebin-plugin.vala"
		return 0;
#line 2690 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	return result;
#line 2694 "system-management.c"
}

static void
_synapse_console_kit_object_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[0]);
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[1]);
#line 24 "pastebin-plugin.vala"
	g_free (data[2]);
#line 24 "pastebin-plugin.vala"
	g_free (data);
#line 2710 "system-management.c"
}

void
synapse_systemd_object_reboot (SynapseSystemdObject* self,
                               gboolean interactive,
                               GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 56 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 56 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 56 "system-management.vala"
	if (_iface_->reboot) {
#line 56 "system-management.vala"
		_iface_->reboot (self, interactive, error);
#line 2727 "system-management.c"
	}
}

void
synapse_systemd_object_suspend (SynapseSystemdObject* self,
                                gboolean interactive,
                                GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 57 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 57 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 57 "system-management.vala"
	if (_iface_->suspend) {
#line 57 "system-management.vala"
		_iface_->suspend (self, interactive, error);
#line 2745 "system-management.c"
	}
}

void
synapse_systemd_object_hibernate (SynapseSystemdObject* self,
                                  gboolean interactive,
                                  GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 58 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 58 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 58 "system-management.vala"
	if (_iface_->hibernate) {
#line 58 "system-management.vala"
		_iface_->hibernate (self, interactive, error);
#line 2763 "system-management.c"
	}
}

void
synapse_systemd_object_power_off (SynapseSystemdObject* self,
                                  gboolean interactive,
                                  GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 59 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 59 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 59 "system-management.vala"
	if (_iface_->power_off) {
#line 59 "system-management.vala"
		_iface_->power_off (self, interactive, error);
#line 2781 "system-management.c"
	}
}

gchar*
synapse_systemd_object_can_suspend (SynapseSystemdObject* self,
                                    GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 60 "system-management.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 60 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 60 "system-management.vala"
	if (_iface_->can_suspend) {
#line 60 "system-management.vala"
		return _iface_->can_suspend (self, error);
#line 2798 "system-management.c"
	}
#line 60 "system-management.vala"
	return NULL;
#line 2802 "system-management.c"
}

gchar*
synapse_systemd_object_can_hibernate (SynapseSystemdObject* self,
                                      GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 61 "system-management.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 61 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 61 "system-management.vala"
	if (_iface_->can_hibernate) {
#line 61 "system-management.vala"
		return _iface_->can_hibernate (self, error);
#line 2818 "system-management.c"
	}
#line 61 "system-management.vala"
	return NULL;
#line 2822 "system-management.c"
}

gchar*
synapse_systemd_object_can_reboot (SynapseSystemdObject* self,
                                   GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 62 "system-management.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 62 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 62 "system-management.vala"
	if (_iface_->can_reboot) {
#line 62 "system-management.vala"
		return _iface_->can_reboot (self, error);
#line 2838 "system-management.c"
	}
#line 62 "system-management.vala"
	return NULL;
#line 2842 "system-management.c"
}

gchar*
synapse_systemd_object_can_power_off (SynapseSystemdObject* self,
                                      GError** error)
{
	SynapseSystemdObjectIface* _iface_;
#line 63 "system-management.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 63 "system-management.vala"
	_iface_ = SYNAPSE_SYSTEMD_OBJECT_GET_INTERFACE (self);
#line 63 "system-management.vala"
	if (_iface_->can_power_off) {
#line 63 "system-management.vala"
		return _iface_->can_power_off (self, error);
#line 2858 "system-management.c"
	}
#line 63 "system-management.vala"
	return NULL;
#line 2862 "system-management.c"
}

static void
synapse_systemd_object_default_init (SynapseSystemdObjectIface * iface,
                                     gpointer iface_data)
{
}

static GType
synapse_systemd_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemdObjectIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_systemd_object_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType synapse_systemd_object_type_id;
	synapse_systemd_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "SynapseSystemdObject", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (synapse_systemd_object_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (synapse_systemd_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) synapse_systemd_object_proxy_get_type);
	g_type_set_qdata (synapse_systemd_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.login1.Manager");
	g_type_set_qdata (synapse_systemd_object_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_synapse_systemd_object_dbus_interface_info));
	g_type_set_qdata (synapse_systemd_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) synapse_systemd_object_register_object);
	return synapse_systemd_object_type_id;
}

GType
synapse_systemd_object_get_type (void)
{
	static volatile gsize synapse_systemd_object_type_id__once = 0;
	if (g_once_init_enter (&synapse_systemd_object_type_id__once)) {
		GType synapse_systemd_object_type_id;
		synapse_systemd_object_type_id = synapse_systemd_object_get_type_once ();
		g_once_init_leave (&synapse_systemd_object_type_id__once, synapse_systemd_object_type_id);
	}
	return synapse_systemd_object_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SynapseSystemdObjectProxy, synapse_systemd_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SYNAPSE_TYPE_SYSTEMD_OBJECT, synapse_systemd_object_proxy_synapse_systemd_object_interface_init) )
static void
synapse_systemd_object_proxy_class_init (SynapseSystemdObjectProxyClass* klass)
{
#line 24 "pastebin-plugin.vala"
	G_DBUS_PROXY_CLASS (klass)->g_signal = synapse_systemd_object_proxy_g_signal;
#line 2903 "system-management.c"
}

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

static void
synapse_systemd_object_proxy_init (SynapseSystemdObjectProxy* self)
{
#line 24 "pastebin-plugin.vala"
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_synapse_systemd_object_dbus_interface_info));
#line 2919 "system-management.c"
}

static void
synapse_systemd_object_proxy_reboot (SynapseSystemdObject* self,
                                     gboolean interactive,
                                     GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_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", "Reboot");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 2949 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 2957 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 2961 "system-management.c"
}

static void
synapse_systemd_object_proxy_suspend (SynapseSystemdObject* self,
                                      gboolean interactive,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_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");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 2991 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 2999 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3003 "system-management.c"
}

static void
synapse_systemd_object_proxy_hibernate (SynapseSystemdObject* self,
                                        gboolean interactive,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_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");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 3033 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 3041 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3045 "system-management.c"
}

static void
synapse_systemd_object_proxy_power_off (SynapseSystemdObject* self,
                                        gboolean interactive,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
#line 24 "pastebin-plugin.vala"
	_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", "PowerOff");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (interactive));
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return;
#line 3075 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return;
#line 3083 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3087 "system-management.c"
}

static gchar*
synapse_systemd_object_proxy_can_suspend (SynapseSystemdObject* self,
                                          GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp87_;
#line 24 "pastebin-plugin.vala"
	_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", "CanSuspend");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3118 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3126 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp87_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_dup_string (_tmp87_, NULL);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp87_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 3142 "system-management.c"
}

static gchar*
synapse_systemd_object_proxy_can_hibernate (SynapseSystemdObject* self,
                                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp88_;
#line 24 "pastebin-plugin.vala"
	_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", "CanHibernate");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3173 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3181 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp88_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_dup_string (_tmp88_, NULL);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp88_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 3197 "system-management.c"
}

static gchar*
synapse_systemd_object_proxy_can_reboot (SynapseSystemdObject* self,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp89_;
#line 24 "pastebin-plugin.vala"
	_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", "CanReboot");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3228 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3236 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp89_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_dup_string (_tmp89_, NULL);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp89_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 3252 "system-management.c"
}

static gchar*
synapse_systemd_object_proxy_can_power_off (SynapseSystemdObject* self,
                                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp90_;
#line 24 "pastebin-plugin.vala"
	_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", "CanPowerOff");
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_arguments = g_variant_builder_end (&_arguments_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_message, _arguments);
#line 24 "pastebin-plugin.vala"
	_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);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_message);
#line 24 "pastebin-plugin.vala"
	if (!_reply_message) {
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3283 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	if (g_dbus_message_to_gerror (_reply_message, error)) {
#line 24 "pastebin-plugin.vala"
		g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
		return NULL;
#line 3291 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply = g_dbus_message_get_body (_reply_message);
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_reply_iter, _reply);
#line 24 "pastebin-plugin.vala"
	_tmp90_ = g_variant_iter_next_value (&_reply_iter);
#line 24 "pastebin-plugin.vala"
	_result = g_variant_dup_string (_tmp90_, NULL);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp90_);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 24 "pastebin-plugin.vala"
	return _result;
#line 3307 "system-management.c"
}

static void
synapse_systemd_object_proxy_synapse_systemd_object_interface_init (SynapseSystemdObjectIface* iface)
{
#line 24 "pastebin-plugin.vala"
	iface->reboot = synapse_systemd_object_proxy_reboot;
#line 24 "pastebin-plugin.vala"
	iface->suspend = synapse_systemd_object_proxy_suspend;
#line 24 "pastebin-plugin.vala"
	iface->hibernate = synapse_systemd_object_proxy_hibernate;
#line 24 "pastebin-plugin.vala"
	iface->power_off = synapse_systemd_object_proxy_power_off;
#line 24 "pastebin-plugin.vala"
	iface->can_suspend = synapse_systemd_object_proxy_can_suspend;
#line 24 "pastebin-plugin.vala"
	iface->can_hibernate = synapse_systemd_object_proxy_can_hibernate;
#line 24 "pastebin-plugin.vala"
	iface->can_reboot = synapse_systemd_object_proxy_can_reboot;
#line 24 "pastebin-plugin.vala"
	iface->can_power_off = synapse_systemd_object_proxy_can_power_off;
#line 3329 "system-management.c"
}

static void
_dbus_synapse_systemd_object_reboot (SynapseSystemdObject* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp91_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_tmp91_ = g_variant_iter_next_value (&_arguments_iter);
#line 24 "pastebin-plugin.vala"
	interactive = g_variant_get_boolean (_tmp91_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp91_);
#line 24 "pastebin-plugin.vala"
	synapse_systemd_object_reboot (self, interactive, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3360 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3376 "system-management.c"
}

static void
_dbus_synapse_systemd_object_suspend (SynapseSystemdObject* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp92_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_tmp92_ = g_variant_iter_next_value (&_arguments_iter);
#line 24 "pastebin-plugin.vala"
	interactive = g_variant_get_boolean (_tmp92_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp92_);
#line 24 "pastebin-plugin.vala"
	synapse_systemd_object_suspend (self, interactive, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3407 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3423 "system-management.c"
}

static void
_dbus_synapse_systemd_object_hibernate (SynapseSystemdObject* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp93_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_tmp93_ = g_variant_iter_next_value (&_arguments_iter);
#line 24 "pastebin-plugin.vala"
	interactive = g_variant_get_boolean (_tmp93_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp93_);
#line 24 "pastebin-plugin.vala"
	synapse_systemd_object_hibernate (self, interactive, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3454 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3470 "system-management.c"
}

static void
_dbus_synapse_systemd_object_power_off (SynapseSystemdObject* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean interactive = FALSE;
	GVariant* _tmp94_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	_tmp94_ = g_variant_iter_next_value (&_arguments_iter);
#line 24 "pastebin-plugin.vala"
	interactive = g_variant_get_boolean (_tmp94_);
#line 24 "pastebin-plugin.vala"
	g_variant_unref (_tmp94_);
#line 24 "pastebin-plugin.vala"
	synapse_systemd_object_power_off (self, interactive, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3501 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3517 "system-management.c"
}

static void
_dbus_synapse_systemd_object_can_suspend (SynapseSystemdObject* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	result = synapse_systemd_object_can_suspend (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3541 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
#line 24 "pastebin-plugin.vala"
	_g_free0 (result);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3561 "system-management.c"
}

static void
_dbus_synapse_systemd_object_can_hibernate (SynapseSystemdObject* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	result = synapse_systemd_object_can_hibernate (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3585 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
#line 24 "pastebin-plugin.vala"
	_g_free0 (result);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3605 "system-management.c"
}

static void
_dbus_synapse_systemd_object_can_reboot (SynapseSystemdObject* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	result = synapse_systemd_object_can_reboot (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3629 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
#line 24 "pastebin-plugin.vala"
	_g_free0 (result);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3649 "system-management.c"
}

static void
_dbus_synapse_systemd_object_can_power_off (SynapseSystemdObject* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
#line 24 "pastebin-plugin.vala"
	g_variant_iter_init (&_arguments_iter, _parameters_);
#line 24 "pastebin-plugin.vala"
	result = synapse_systemd_object_can_power_off (self, &error);
#line 24 "pastebin-plugin.vala"
	if (error) {
#line 24 "pastebin-plugin.vala"
		g_dbus_method_invocation_take_error (invocation, error);
#line 24 "pastebin-plugin.vala"
		return;
#line 3673 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
#line 24 "pastebin-plugin.vala"
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
#line 24 "pastebin-plugin.vala"
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
#line 24 "pastebin-plugin.vala"
	_g_free0 (result);
#line 24 "pastebin-plugin.vala"
	_reply = g_variant_builder_end (&_reply_builder);
#line 24 "pastebin-plugin.vala"
	g_dbus_message_set_body (_reply_message, _reply);
#line 24 "pastebin-plugin.vala"
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
#line 24 "pastebin-plugin.vala"
	g_object_unref (invocation);
#line 24 "pastebin-plugin.vala"
	g_object_unref (_reply_message);
#line 3693 "system-management.c"
}

static void
synapse_systemd_object_dbus_interface_method_call (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* method_name,
                                                   GVariant* parameters,
                                                   GDBusMethodInvocation* invocation,
                                                   gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	if (strcmp (method_name, "Reboot") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_reboot (object, parameters, invocation);
#line 3714 "system-management.c"
	} else if (strcmp (method_name, "Suspend") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_suspend (object, parameters, invocation);
#line 3718 "system-management.c"
	} else if (strcmp (method_name, "Hibernate") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_hibernate (object, parameters, invocation);
#line 3722 "system-management.c"
	} else if (strcmp (method_name, "PowerOff") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_power_off (object, parameters, invocation);
#line 3726 "system-management.c"
	} else if (strcmp (method_name, "CanSuspend") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_can_suspend (object, parameters, invocation);
#line 3730 "system-management.c"
	} else if (strcmp (method_name, "CanHibernate") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_can_hibernate (object, parameters, invocation);
#line 3734 "system-management.c"
	} else if (strcmp (method_name, "CanReboot") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_can_reboot (object, parameters, invocation);
#line 3738 "system-management.c"
	} else if (strcmp (method_name, "CanPowerOff") == 0) {
#line 24 "pastebin-plugin.vala"
		_dbus_synapse_systemd_object_can_power_off (object, parameters, invocation);
#line 3742 "system-management.c"
	} else {
#line 24 "pastebin-plugin.vala"
		g_object_unref (invocation);
#line 3746 "system-management.c"
	}
}

static GVariant*
synapse_systemd_object_dbus_interface_get_property (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* property_name,
                                                    GError** error,
                                                    gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return NULL;
#line 3765 "system-management.c"
}

static gboolean
synapse_systemd_object_dbus_interface_set_property (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* property_name,
                                                    GVariant* value,
                                                    GError** error,
                                                    gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
#line 24 "pastebin-plugin.vala"
	return FALSE;
#line 3784 "system-management.c"
}

guint
synapse_systemd_object_register_object (gpointer object,
                                        GDBusConnection* connection,
                                        const gchar* path,
                                        GError** error)
{
	guint result;
	gpointer *data;
#line 24 "pastebin-plugin.vala"
	data = g_new (gpointer, 3);
#line 24 "pastebin-plugin.vala"
	data[0] = g_object_ref (object);
#line 24 "pastebin-plugin.vala"
	data[1] = g_object_ref (connection);
#line 24 "pastebin-plugin.vala"
	data[2] = g_strdup (path);
#line 24 "pastebin-plugin.vala"
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_synapse_systemd_object_dbus_interface_info), &_synapse_systemd_object_dbus_interface_vtable, data, _synapse_systemd_object_unregister_object, error);
#line 24 "pastebin-plugin.vala"
	if (!result) {
#line 24 "pastebin-plugin.vala"
		return 0;
#line 3809 "system-management.c"
	}
#line 24 "pastebin-plugin.vala"
	return result;
#line 3813 "system-management.c"
}

static void
_synapse_systemd_object_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[0]);
#line 24 "pastebin-plugin.vala"
	g_object_unref (data[1]);
#line 24 "pastebin-plugin.vala"
	g_free (data[2]);
#line 24 "pastebin-plugin.vala"
	g_free (data);
#line 3829 "system-management.c"
}

static inline gpointer
synapse_system_management_plugin_get_instance_private (SynapseSystemManagementPlugin* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseSystemManagementPlugin_private_offset);
}

static void
synapse_system_management_plugin_real_activate (SynapseActivatable* base)
{
	SynapseSystemManagementPlugin * self;
#line 70 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) base;
#line 3844 "system-management.c"
}

static void
synapse_system_management_plugin_real_deactivate (SynapseActivatable* base)
{
	SynapseSystemManagementPlugin * self;
#line 75 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) base;
#line 3853 "system-management.c"
}

static void
_synapse_system_management_plugin_register_plugin_synapse_plugin_register_func (void)
{
#line 454 "system-management.vala"
	synapse_system_management_plugin_register_plugin ();
#line 3861 "system-management.c"
}

static void
synapse_system_management_plugin_register_plugin (void)
{
	gboolean _tmp0_ = FALSE;
	SynapseDBusService* _tmp1_;
	SynapseDBusService* _tmp2_;
	gboolean _tmp3_;
	SynapsePluginRegistry* _tmp6_;
	SynapsePluginRegistry* _tmp7_;
#line 460 "system-management.vala"
	_tmp1_ = synapse_dbus_service_get_default ();
#line 460 "system-management.vala"
	_tmp2_ = _tmp1_;
#line 460 "system-management.vala"
	_tmp3_ = synapse_dbus_service_service_is_available (_tmp2_, SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME);
#line 460 "system-management.vala"
	_g_object_unref0 (_tmp2_);
#line 460 "system-management.vala"
	if (_tmp3_) {
#line 460 "system-management.vala"
		_tmp0_ = TRUE;
#line 3885 "system-management.c"
	} else {
		SynapseDBusService* _tmp4_;
		SynapseDBusService* _tmp5_;
#line 461 "system-management.vala"
		_tmp4_ = synapse_dbus_service_get_default ();
#line 461 "system-management.vala"
		_tmp5_ = _tmp4_;
#line 461 "system-management.vala"
		_tmp0_ = synapse_dbus_service_service_is_available (_tmp5_, SYNAPSE_CONSOLE_KIT_OBJECT_UNIQUE_NAME);
#line 461 "system-management.vala"
		_g_object_unref0 (_tmp5_);
#line 3897 "system-management.c"
	}
#line 454 "system-management.vala"
	_tmp6_ = synapse_plugin_registry_get_default ();
#line 454 "system-management.vala"
	_tmp7_ = _tmp6_;
#line 454 "system-management.vala"
	synapse_plugin_registry_register_plugin (_tmp7_, SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN, "System Management", _ ("Suspend, hibernate, restart or shutdown your computer."), "system-restart", _synapse_system_management_plugin_register_plugin_synapse_plugin_register_func, _tmp0_, _ ("ConsoleKit wasn't found"));
#line 454 "system-management.vala"
	_g_object_unref0 (_tmp7_);
#line 3907 "system-management.c"
}

static void
synapse_system_management_plugin_real_search_data_free (gpointer _data)
{
	SynapseSystemManagementPluginSearchData* _data_;
	_data_ = _data;
#line 66 "system-management.vala"
	synapse_query_destroy (&_data_->q);
#line 66 "system-management.vala"
	_g_object_unref0 (_data_->result);
#line 66 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 66 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginSearchData, _data_);
#line 3923 "system-management.c"
}

static gpointer
_g_object_ref0 (gpointer self)
{
#line 66 "system-management.vala"
	return self ? g_object_ref (self) : NULL;
#line 3931 "system-management.c"
}

static void
synapse_system_management_plugin_real_search (SynapseItemProvider* base,
                                              SynapseQuery* q,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	SynapseSystemManagementPlugin * self;
	SynapseSystemManagementPluginSearchData* _data_;
	SynapseSystemManagementPlugin* _tmp0_;
	SynapseQuery _tmp1_;
	SynapseQuery _tmp2_;
	SynapseQuery _tmp3_ = {0};
#line 66 "system-management.vala"
	g_return_if_fail (q != NULL);
#line 66 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) base;
#line 66 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginSearchData);
#line 66 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 66 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_real_search_data_free);
#line 66 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 66 "system-management.vala"
	_data_->self = _tmp0_;
#line 66 "system-management.vala"
	_tmp1_ = *q;
#line 66 "system-management.vala"
	_tmp2_ = _tmp1_;
#line 66 "system-management.vala"
	synapse_query_copy (&_tmp2_, &_tmp3_);
#line 66 "system-management.vala"
	synapse_query_destroy (&_data_->q);
#line 66 "system-management.vala"
	_data_->q = _tmp3_;
#line 66 "system-management.vala"
	synapse_system_management_plugin_real_search_co (_data_);
#line 3972 "system-management.c"
}

static SynapseResultSet*
synapse_system_management_plugin_search_finish (SynapseItemProvider* base,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	SynapseResultSet* result;
	SynapseSystemManagementPluginSearchData* _data_;
#line 66 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 66 "system-management.vala"
	if (NULL == _data_) {
#line 66 "system-management.vala"
		return NULL;
#line 3988 "system-management.c"
	}
#line 66 "system-management.vala"
	result = _data_->result;
#line 66 "system-management.vala"
	_data_->result = NULL;
#line 66 "system-management.vala"
	return result;
#line 3996 "system-management.c"
}

static gboolean
synapse_system_management_plugin_real_search_co (SynapseSystemManagementPluginSearchData* _data_)
{
#line 482 "system-management.vala"
	switch (_data_->_state_) {
#line 482 "system-management.vala"
		case 0:
#line 4006 "system-management.c"
		goto _state_0;
		default:
#line 482 "system-management.vala"
		g_assert_not_reached ();
#line 4011 "system-management.c"
	}
	_state_0:
#line 485 "system-management.vala"
	_data_->_tmp0_ = _data_->q;
#line 485 "system-management.vala"
	if (!((_data_->_tmp0_.query_type & SYNAPSE_QUERY_FLAGS_ACTIONS) == SYNAPSE_QUERY_FLAGS_ACTIONS)) {
#line 485 "system-management.vala"
		_data_->result = NULL;
#line 485 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 485 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 485 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 485 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4028 "system-management.c"
			}
		}
#line 485 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 485 "system-management.vala"
		return FALSE;
#line 4035 "system-management.c"
	}
#line 487 "system-management.vala"
	_data_->_tmp1_ = synapse_result_set_new ();
#line 487 "system-management.vala"
	_data_->_result_ = _data_->_tmp1_;
#line 489 "system-management.vala"
	_data_->_tmp2_ = _data_->q;
#line 489 "system-management.vala"
	_data_->_tmp3_ = _data_->_tmp2_.query_string;
#line 489 "system-management.vala"
	_data_->_tmp4_ = synapse_query_get_matchers_for_query (_data_->_tmp3_, 0, G_REGEX_OPTIMIZE | G_REGEX_CASELESS);
#line 489 "system-management.vala"
	_data_->matchers = _data_->_tmp4_;
#line 4049 "system-management.c"
	{
#line 492 "system-management.vala"
		_data_->_tmp5_ = _data_->self->priv->actions;
#line 492 "system-management.vala"
		_data_->_action_list = _data_->_tmp5_;
#line 492 "system-management.vala"
		_data_->_tmp6_ = _data_->_action_list;
#line 492 "system-management.vala"
		_data_->_tmp7_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp6_);
#line 492 "system-management.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 492 "system-management.vala"
		_data_->_action_size = _data_->_tmp8_;
#line 492 "system-management.vala"
		_data_->_action_index = -1;
#line 492 "system-management.vala"
		while (TRUE) {
#line 492 "system-management.vala"
			_data_->_action_index = _data_->_action_index + 1;
#line 492 "system-management.vala"
			_data_->_tmp9_ = _data_->_action_index;
#line 492 "system-management.vala"
			_data_->_tmp10_ = _data_->_action_size;
#line 492 "system-management.vala"
			if (!(_data_->_tmp9_ < _data_->_tmp10_)) {
#line 492 "system-management.vala"
				break;
#line 4077 "system-management.c"
			}
#line 492 "system-management.vala"
			_data_->_tmp11_ = _data_->_action_list;
#line 492 "system-management.vala"
			_data_->_tmp12_ = gee_list_get (_data_->_tmp11_, _data_->_action_index);
#line 492 "system-management.vala"
			_data_->action = (SynapseSystemManagementPluginSystemAction*) _data_->_tmp12_;
#line 494 "system-management.vala"
			_data_->_tmp13_ = _data_->action;
#line 494 "system-management.vala"
			if (!synapse_system_management_plugin_system_action_action_allowed (_data_->_tmp13_)) {
#line 494 "system-management.vala"
				_g_object_unref0 (_data_->action);
#line 494 "system-management.vala"
				continue;
#line 4093 "system-management.c"
			}
			{
#line 495 "system-management.vala"
				_data_->_tmp14_ = _data_->matchers;
#line 495 "system-management.vala"
				_data_->_matcher_list = _data_->_tmp14_;
#line 495 "system-management.vala"
				_data_->_tmp15_ = _data_->_matcher_list;
#line 495 "system-management.vala"
				_data_->_tmp16_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp15_);
#line 495 "system-management.vala"
				_data_->_tmp17_ = _data_->_tmp16_;
#line 495 "system-management.vala"
				_data_->_matcher_size = _data_->_tmp17_;
#line 495 "system-management.vala"
				_data_->_matcher_index = -1;
#line 495 "system-management.vala"
				while (TRUE) {
#line 495 "system-management.vala"
					_data_->_matcher_index = _data_->_matcher_index + 1;
#line 495 "system-management.vala"
					_data_->_tmp18_ = _data_->_matcher_index;
#line 495 "system-management.vala"
					_data_->_tmp19_ = _data_->_matcher_size;
#line 495 "system-management.vala"
					if (!(_data_->_tmp18_ < _data_->_tmp19_)) {
#line 495 "system-management.vala"
						break;
#line 4122 "system-management.c"
					}
#line 495 "system-management.vala"
					_data_->_tmp20_ = _data_->_matcher_list;
#line 495 "system-management.vala"
					_data_->_tmp21_ = gee_list_get (_data_->_tmp20_, _data_->_matcher_index);
#line 495 "system-management.vala"
					_data_->matcher = (GeeMapEntry*) _data_->_tmp21_;
#line 497 "system-management.vala"
					_data_->_tmp22_ = _data_->matcher;
#line 497 "system-management.vala"
					_data_->_tmp23_ = gee_map_entry_get_key (_data_->_tmp22_);
#line 497 "system-management.vala"
					_data_->_tmp24_ = _data_->_tmp23_;
#line 497 "system-management.vala"
					_data_->_tmp25_ = _data_->action;
#line 497 "system-management.vala"
					_data_->_tmp26_ = synapse_match_get_title ((SynapseMatch*) _data_->_tmp25_);
#line 497 "system-management.vala"
					_data_->_tmp27_ = _data_->_tmp26_;
#line 497 "system-management.vala"
					if (g_regex_match ((GRegex*) _data_->_tmp24_, _data_->_tmp27_, 0, NULL)) {
#line 499 "system-management.vala"
						_data_->_tmp28_ = _data_->_result_;
#line 499 "system-management.vala"
						_data_->_tmp29_ = _data_->action;
#line 499 "system-management.vala"
						_data_->_tmp30_ = _data_->matcher;
#line 499 "system-management.vala"
						_data_->_tmp31_ = gee_map_entry_get_value (_data_->_tmp30_);
#line 499 "system-management.vala"
						_data_->_tmp32_ = _data_->_tmp31_;
#line 499 "system-management.vala"
						synapse_result_set_add (_data_->_tmp28_, (SynapseMatch*) _data_->_tmp29_, ((gint) ((gintptr) _data_->_tmp32_)) - SYNAPSE_MATCH_SCORE_INCREMENT_SMALL);
#line 500 "system-management.vala"
						_g_object_unref0 (_data_->matcher);
#line 500 "system-management.vala"
						break;
#line 4160 "system-management.c"
					}
#line 495 "system-management.vala"
					_g_object_unref0 (_data_->matcher);
#line 4164 "system-management.c"
				}
			}
#line 492 "system-management.vala"
			_g_object_unref0 (_data_->action);
#line 4169 "system-management.c"
		}
	}
#line 505 "system-management.vala"
	synapse_query_check_cancellable (&_data_->q, &_data_->_inner_error0_);
#line 505 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 505 "system-management.vala"
		if (_data_->_inner_error0_->domain == SYNAPSE_SEARCH_ERROR) {
#line 505 "system-management.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
#line 505 "system-management.vala"
			_g_object_unref0 (_data_->matchers);
#line 505 "system-management.vala"
			_g_object_unref0 (_data_->_result_);
#line 505 "system-management.vala"
			g_object_unref (_data_->_async_result);
#line 505 "system-management.vala"
			return FALSE;
#line 4188 "system-management.c"
		} else {
#line 505 "system-management.vala"
			_g_object_unref0 (_data_->matchers);
#line 505 "system-management.vala"
			_g_object_unref0 (_data_->_result_);
#line 505 "system-management.vala"
			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);
#line 505 "system-management.vala"
			g_clear_error (&_data_->_inner_error0_);
#line 505 "system-management.vala"
			g_object_unref (_data_->_async_result);
#line 505 "system-management.vala"
			return FALSE;
#line 4202 "system-management.c"
		}
	}
#line 507 "system-management.vala"
	_data_->result = _data_->_result_;
#line 507 "system-management.vala"
	_g_object_unref0 (_data_->matchers);
#line 507 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 507 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 507 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 507 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4217 "system-management.c"
		}
	}
#line 507 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 507 "system-management.vala"
	return FALSE;
#line 4224 "system-management.c"
}

SynapseSystemManagementPlugin*
synapse_system_management_plugin_construct (GType object_type)
{
	SynapseSystemManagementPlugin * self = NULL;
#line 66 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) g_object_new (object_type, NULL);
#line 66 "system-management.vala"
	return self;
#line 4235 "system-management.c"
}

SynapseSystemManagementPlugin*
synapse_system_management_plugin_new (void)
{
#line 66 "system-management.vala"
	return synapse_system_management_plugin_construct (SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN);
#line 4243 "system-management.c"
}

static gboolean
synapse_system_management_plugin_real_get_enabled (SynapseActivatable* base)
{
	gboolean result;
	SynapseSystemManagementPlugin* self;
#line 68 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) base;
#line 68 "system-management.vala"
	result = self->priv->_enabled;
#line 68 "system-management.vala"
	return result;
#line 4257 "system-management.c"
}

static void
synapse_system_management_plugin_real_set_enabled (SynapseActivatable* base,
                                                   gboolean value)
{
	SynapseSystemManagementPlugin* self;
	gboolean old_value;
#line 68 "system-management.vala"
	self = (SynapseSystemManagementPlugin*) base;
#line 68 "system-management.vala"
	old_value = synapse_system_management_plugin_real_get_enabled (base);
#line 68 "system-management.vala"
	if (old_value != value) {
#line 68 "system-management.vala"
		self->priv->_enabled = value;
#line 68 "system-management.vala"
		g_object_notify_by_pspec ((GObject *) self, synapse_system_management_plugin_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY]);
#line 4276 "system-management.c"
	}
}

static gboolean
synapse_system_management_plugin_system_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* self)
{
	gboolean _tmp0_ = FALSE;
#line 82 "system-management.vala"
	g_critical ("Type `%s' does not implement abstract method `synapse_system_management_plugin_system_action_action_allowed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 82 "system-management.vala"
	return _tmp0_;
#line 4288 "system-management.c"
}

gboolean
synapse_system_management_plugin_system_action_action_allowed (SynapseSystemManagementPluginSystemAction* self)
{
	SynapseSystemManagementPluginSystemActionClass* _klass_;
#line 82 "system-management.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 82 "system-management.vala"
	_klass_ = SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_SYSTEM_ACTION_GET_CLASS (self);
#line 82 "system-management.vala"
	if (_klass_->action_allowed) {
#line 82 "system-management.vala"
		return _klass_->action_allowed (self);
#line 4303 "system-management.c"
	}
#line 82 "system-management.vala"
	return FALSE;
#line 4307 "system-management.c"
}

static SynapseSystemManagementPluginSystemAction*
synapse_system_management_plugin_system_action_construct (GType object_type)
{
	SynapseSystemManagementPluginSystemAction * self = NULL;
#line 80 "system-management.vala"
	self = (SynapseSystemManagementPluginSystemAction*) synapse_action_match_construct (object_type);
#line 80 "system-management.vala"
	return self;
#line 4318 "system-management.c"
}

static void
synapse_system_management_plugin_system_action_class_init (SynapseSystemManagementPluginSystemActionClass * klass,
                                                           gpointer klass_data)
{
#line 80 "system-management.vala"
	synapse_system_management_plugin_system_action_parent_class = g_type_class_peek_parent (klass);
#line 80 "system-management.vala"
	((SynapseSystemManagementPluginSystemActionClass *) klass)->action_allowed = (gboolean (*) (SynapseSystemManagementPluginSystemAction*)) synapse_system_management_plugin_system_action_real_action_allowed;
#line 4329 "system-management.c"
}

static void
synapse_system_management_plugin_system_action_instance_init (SynapseSystemManagementPluginSystemAction * self,
                                                              gpointer klass)
{
}

static GType
synapse_system_management_plugin_system_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginSystemActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_system_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPluginSystemAction), 0, (GInstanceInitFunc) synapse_system_management_plugin_system_action_instance_init, NULL };
	GType synapse_system_management_plugin_system_action_type_id;
	synapse_system_management_plugin_system_action_type_id = g_type_register_static (SYNAPSE_TYPE_ACTION_MATCH, "SynapseSystemManagementPluginSystemAction", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return synapse_system_management_plugin_system_action_type_id;
}

static GType
synapse_system_management_plugin_system_action_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_system_action_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_system_action_type_id__once)) {
		GType synapse_system_management_plugin_system_action_type_id;
		synapse_system_management_plugin_system_action_type_id = synapse_system_management_plugin_system_action_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_system_action_type_id__once, synapse_system_management_plugin_system_action_type_id);
	}
	return synapse_system_management_plugin_system_action_type_id__once;
}

static inline gpointer
synapse_system_management_plugin_suspend_action_get_instance_private (SynapseSystemManagementPluginSuspendAction* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseSystemManagementPluginSuspendAction_private_offset);
}

static SynapseSystemManagementPluginSuspendAction*
synapse_system_management_plugin_suspend_action_construct (GType object_type)
{
	SynapseSystemManagementPluginSuspendAction * self = NULL;
#line 89 "system-management.vala"
	self = (SynapseSystemManagementPluginSuspendAction*) g_object_new (object_type, "title", _ ("Suspend"), "description", _ ("Put your computer into suspend mode"), "icon-name", "system-suspend", "has-thumbnail", FALSE, NULL);
#line 87 "system-management.vala"
	return self;
#line 4373 "system-management.c"
}

static SynapseSystemManagementPluginSuspendAction*
synapse_system_management_plugin_suspend_action_new (void)
{
#line 87 "system-management.vala"
	return synapse_system_management_plugin_suspend_action_construct (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION);
#line 4381 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_check_allowed_data_free (gpointer _data)
{
	SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_;
	_data_ = _data;
#line 85 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 85 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginSuspendActionCheckAllowedData, _data_);
#line 4393 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_check_allowed (SynapseSystemManagementPluginSuspendAction* self,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_;
	SynapseSystemManagementPluginSuspendAction* _tmp0_;
#line 85 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 85 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginSuspendActionCheckAllowedData);
#line 85 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 85 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_suspend_action_check_allowed_data_free);
#line 85 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 85 "system-management.vala"
	_data_->self = _tmp0_;
#line 85 "system-management.vala"
	synapse_system_management_plugin_suspend_action_check_allowed_co (_data_);
#line 4417 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_check_allowed_finish (SynapseSystemManagementPluginSuspendAction* self,
                                                                      GAsyncResult* _res_)
{
	SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_;
#line 85 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 4427 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_check_allowed_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_)
{
	SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_;
#line 122 "system-management.vala"
	_data_ = _user_data_;
#line 122 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 122 "system-management.vala"
	_data_->_res_ = _res_;
#line 122 "system-management.vala"
	synapse_system_management_plugin_suspend_action_check_allowed_co (_data_);
#line 4444 "system-management.c"
}

static gboolean
synapse_system_management_plugin_suspend_action_check_allowed_co (SynapseSystemManagementPluginSuspendActionCheckAllowedData* _data_)
{
#line 99 "system-management.vala"
	switch (_data_->_state_) {
#line 99 "system-management.vala"
		case 0:
#line 4454 "system-management.c"
		goto _state_0;
#line 99 "system-management.vala"
		case 1:
#line 4458 "system-management.c"
		goto _state_1;
		default:
#line 99 "system-management.vala"
		g_assert_not_reached ();
#line 4463 "system-management.c"
	}
	_state_0:
	{
#line 103 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 103 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 103 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 4473 "system-management.c"
			goto __catch0_g_error;
		}
#line 107 "system-management.vala"
		_data_->_tmp2_ = _data_->dbus_interface;
#line 107 "system-management.vala"
		_data_->_tmp3_ = synapse_systemd_object_can_suspend (_data_->_tmp2_, &_data_->_inner_error0_);
#line 107 "system-management.vala"
		_data_->_tmp1_ = _data_->_tmp3_;
#line 107 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 107 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 4486 "system-management.c"
			goto __catch0_g_error;
		}
#line 107 "system-management.vala"
		_data_->self->priv->allowed = g_strcmp0 (_data_->_tmp1_, "yes") == 0;
#line 108 "system-management.vala"
		_g_free0 (_data_->_tmp1_);
#line 108 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 108 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 108 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 108 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 108 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4503 "system-management.c"
			}
		}
#line 108 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 108 "system-management.vala"
		return FALSE;
#line 4510 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 101 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 101 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 112 "system-management.vala"
		_data_->_tmp4_ = _data_->err;
#line 112 "system-management.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 112 "system-management.vala"
		g_warning ("system-management.vala:112: %s", _data_->_tmp5_);
#line 113 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 101 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 4529 "system-management.c"
	}
	__finally0:
#line 101 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 101 "system-management.vala"
		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);
#line 101 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 101 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 101 "system-management.vala"
		return FALSE;
#line 4542 "system-management.c"
	}
	{
#line 118 "system-management.vala"
		_data_->_tmp6_ = (SynapseUPowerObject*) g_initable_new (SYNAPSE_TYPE_UPOWER_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_UPOWER_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_UPOWER_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.UPower", NULL);
#line 118 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseUPowerObject*) _data_->_tmp6_;
#line 118 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 4551 "system-management.c"
			goto __catch1_g_error;
		}
#line 122 "system-management.vala"
		_data_->_tmp8_ = _data_->_vala1_dbus_interface;
#line 122 "system-management.vala"
		_data_->_state_ = 1;
#line 122 "system-management.vala"
		synapse_upower_object_suspend_allowed (_data_->_tmp8_, synapse_system_management_plugin_suspend_action_check_allowed_ready, _data_);
#line 122 "system-management.vala"
		return FALSE;
#line 4562 "system-management.c"
		_state_1:
#line 122 "system-management.vala"
		_data_->_tmp7_ = synapse_upower_object_suspend_allowed_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
#line 122 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 122 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 4570 "system-management.c"
			goto __catch1_g_error;
		}
#line 122 "system-management.vala"
		_data_->self->priv->allowed = _data_->_tmp7_;
#line 116 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 4577 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 116 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 116 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 126 "system-management.vala"
		_data_->_tmp9_ = _data_->_vala1_err;
#line 126 "system-management.vala"
		_data_->_tmp10_ = _data_->_tmp9_->message;
#line 126 "system-management.vala"
		g_warning ("system-management.vala:126: %s", _data_->_tmp10_);
#line 127 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 116 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 4596 "system-management.c"
	}
	__finally1:
#line 116 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 116 "system-management.vala"
		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);
#line 116 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 116 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 116 "system-management.vala"
		return FALSE;
#line 4609 "system-management.c"
	}
#line 99 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 99 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 99 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 99 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4619 "system-management.c"
		}
	}
#line 99 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 99 "system-management.vala"
	return FALSE;
#line 4626 "system-management.c"
}

static gboolean
synapse_system_management_plugin_suspend_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base)
{
	SynapseSystemManagementPluginSuspendAction * self;
	gboolean result;
#line 133 "system-management.vala"
	self = (SynapseSystemManagementPluginSuspendAction*) base;
#line 135 "system-management.vala"
	result = self->priv->allowed;
#line 135 "system-management.vala"
	return result;
#line 4640 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_do_suspend_data_free (gpointer _data)
{
	SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_;
	_data_ = _data;
#line 85 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 85 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginSuspendActionDoSuspendData, _data_);
#line 4652 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_do_suspend (SynapseSystemManagementPluginSuspendAction* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_;
	SynapseSystemManagementPluginSuspendAction* _tmp0_;
#line 85 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 85 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginSuspendActionDoSuspendData);
#line 85 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 85 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_suspend_action_do_suspend_data_free);
#line 85 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 85 "system-management.vala"
	_data_->self = _tmp0_;
#line 85 "system-management.vala"
	synapse_system_management_plugin_suspend_action_do_suspend_co (_data_);
#line 4676 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_do_suspend_finish (SynapseSystemManagementPluginSuspendAction* self,
                                                                   GAsyncResult* _res_)
{
	SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_;
#line 85 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 4686 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_do_suspend_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_)
{
	SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_;
#line 162 "system-management.vala"
	_data_ = _user_data_;
#line 162 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 162 "system-management.vala"
	_data_->_res_ = _res_;
#line 162 "system-management.vala"
	synapse_system_management_plugin_suspend_action_do_suspend_co (_data_);
#line 4703 "system-management.c"
}

static gboolean
_synapse_system_management_plugin_suspend_action_do_suspend_co_gsource_func (gpointer self)
{
	gboolean result;
	result = synapse_system_management_plugin_suspend_action_do_suspend_co (self);
#line 168 "system-management.vala"
	return result;
#line 4713 "system-management.c"
}

static gboolean
synapse_system_management_plugin_suspend_action_do_suspend_co (SynapseSystemManagementPluginSuspendActionDoSuspendData* _data_)
{
#line 138 "system-management.vala"
	switch (_data_->_state_) {
#line 138 "system-management.vala"
		case 0:
#line 4723 "system-management.c"
		goto _state_0;
#line 138 "system-management.vala"
		case 1:
#line 4727 "system-management.c"
		goto _state_1;
#line 138 "system-management.vala"
		case 2:
#line 4731 "system-management.c"
		goto _state_2;
#line 138 "system-management.vala"
		case 3:
#line 4735 "system-management.c"
		goto _state_3;
		default:
#line 138 "system-management.vala"
		g_assert_not_reached ();
#line 4740 "system-management.c"
	}
	_state_0:
	{
#line 142 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 142 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 142 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 4750 "system-management.c"
			goto __catch0_g_error;
		}
#line 146 "system-management.vala"
		_data_->_tmp1_ = _data_->dbus_interface;
#line 146 "system-management.vala"
		synapse_systemd_object_suspend (_data_->_tmp1_, TRUE, &_data_->_inner_error0_);
#line 146 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 146 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 4761 "system-management.c"
			goto __catch0_g_error;
		}
#line 147 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 147 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 147 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 147 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 147 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4774 "system-management.c"
			}
		}
#line 147 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 147 "system-management.vala"
		return FALSE;
#line 4781 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 140 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 140 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 151 "system-management.vala"
		_data_->_tmp2_ = _data_->err;
#line 151 "system-management.vala"
		_data_->_tmp3_ = _data_->_tmp2_->message;
#line 151 "system-management.vala"
		g_warning ("system-management.vala:151: %s", _data_->_tmp3_);
#line 140 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 4798 "system-management.c"
	}
	__finally0:
#line 140 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 140 "system-management.vala"
		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);
#line 140 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 140 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 140 "system-management.vala"
		return FALSE;
#line 4811 "system-management.c"
	}
	{
#line 156 "system-management.vala"
		_data_->_tmp4_ = (SynapseUPowerObject*) g_initable_new (SYNAPSE_TYPE_UPOWER_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_UPOWER_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_UPOWER_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.UPower", NULL);
#line 156 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseUPowerObject*) _data_->_tmp4_;
#line 156 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 4820 "system-management.c"
			goto __catch1_g_error;
		}
		{
#line 162 "system-management.vala"
			_data_->_tmp5_ = _data_->_vala1_dbus_interface;
#line 162 "system-management.vala"
			_data_->_state_ = 1;
#line 162 "system-management.vala"
			synapse_upower_object_about_to_sleep (_data_->_tmp5_, synapse_system_management_plugin_suspend_action_do_suspend_ready, _data_);
#line 162 "system-management.vala"
			return FALSE;
#line 4832 "system-management.c"
			_state_1:
#line 162 "system-management.vala"
			synapse_upower_object_about_to_sleep_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error0_);
#line 162 "system-management.vala"
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 4838 "system-management.c"
				goto __catch2_g_error;
			}
		}
		goto __finally2;
		__catch2_g_error:
		{
#line 160 "system-management.vala"
			g_clear_error (&_data_->_inner_error0_);
#line 4847 "system-management.c"
		}
		__finally2:
#line 160 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 160 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 4854 "system-management.c"
			goto __catch1_g_error;
		}
#line 166 "system-management.vala"
		synapse_screen_saver_plugin_lock_screen ();
#line 168 "system-management.vala"
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 2000, _synapse_system_management_plugin_suspend_action_do_suspend_co_gsource_func, _data_, NULL);
#line 169 "system-management.vala"
		_data_->_state_ = 2;
#line 169 "system-management.vala"
		return FALSE;
#line 4865 "system-management.c"
		_state_2:
		;
#line 171 "system-management.vala"
		_data_->_tmp6_ = _data_->_vala1_dbus_interface;
#line 171 "system-management.vala"
		_data_->_state_ = 3;
#line 171 "system-management.vala"
		synapse_upower_object_suspend (_data_->_tmp6_, synapse_system_management_plugin_suspend_action_do_suspend_ready, _data_);
#line 171 "system-management.vala"
		return FALSE;
#line 4876 "system-management.c"
		_state_3:
#line 171 "system-management.vala"
		synapse_upower_object_suspend_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error0_);
#line 171 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 171 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 4884 "system-management.c"
			goto __catch1_g_error;
		}
#line 154 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 4889 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 154 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 154 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 175 "system-management.vala"
		_data_->_tmp7_ = _data_->_vala1_err;
#line 175 "system-management.vala"
		_data_->_tmp8_ = _data_->_tmp7_->message;
#line 175 "system-management.vala"
		g_warning ("system-management.vala:175: %s", _data_->_tmp8_);
#line 154 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 4906 "system-management.c"
	}
	__finally1:
#line 154 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 154 "system-management.vala"
		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);
#line 154 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 154 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 154 "system-management.vala"
		return FALSE;
#line 4919 "system-management.c"
	}
#line 138 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 138 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 138 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 138 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 4929 "system-management.c"
		}
	}
#line 138 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 138 "system-management.vala"
	return FALSE;
#line 4936 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_real_do_action (SynapseActionMatch* base)
{
	SynapseSystemManagementPluginSuspendAction * self;
#line 179 "system-management.vala"
	self = (SynapseSystemManagementPluginSuspendAction*) base;
#line 181 "system-management.vala"
	synapse_system_management_plugin_suspend_action_do_suspend (self, NULL, NULL);
#line 4947 "system-management.c"
}

static GObject *
synapse_system_management_plugin_suspend_action_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseSystemManagementPluginSuspendAction * self;
#line 94 "system-management.vala"
	parent_class = G_OBJECT_CLASS (synapse_system_management_plugin_suspend_action_parent_class);
#line 94 "system-management.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 94 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION, SynapseSystemManagementPluginSuspendAction);
#line 96 "system-management.vala"
	synapse_system_management_plugin_suspend_action_check_allowed (self, NULL, NULL);
#line 94 "system-management.vala"
	return obj;
#line 4968 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_class_init (SynapseSystemManagementPluginSuspendActionClass * klass,
                                                            gpointer klass_data)
{
#line 85 "system-management.vala"
	synapse_system_management_plugin_suspend_action_parent_class = g_type_class_peek_parent (klass);
#line 85 "system-management.vala"
	g_type_class_adjust_private_offset (klass, &SynapseSystemManagementPluginSuspendAction_private_offset);
#line 85 "system-management.vala"
	((SynapseSystemManagementPluginSystemActionClass *) klass)->action_allowed = (gboolean (*) (SynapseSystemManagementPluginSystemAction*)) synapse_system_management_plugin_suspend_action_real_action_allowed;
#line 85 "system-management.vala"
	((SynapseActionMatchClass *) klass)->do_action = (void (*) (SynapseActionMatch*)) synapse_system_management_plugin_suspend_action_real_do_action;
#line 85 "system-management.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_system_management_plugin_suspend_action_constructor;
#line 85 "system-management.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_system_management_plugin_suspend_action_finalize;
#line 4987 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_instance_init (SynapseSystemManagementPluginSuspendAction * self,
                                                               gpointer klass)
{
#line 85 "system-management.vala"
	self->priv = synapse_system_management_plugin_suspend_action_get_instance_private (self);
#line 131 "system-management.vala"
	self->priv->allowed = FALSE;
#line 4998 "system-management.c"
}

static void
synapse_system_management_plugin_suspend_action_finalize (GObject * obj)
{
	SynapseSystemManagementPluginSuspendAction * self;
#line 85 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SUSPEND_ACTION, SynapseSystemManagementPluginSuspendAction);
#line 85 "system-management.vala"
	G_OBJECT_CLASS (synapse_system_management_plugin_suspend_action_parent_class)->finalize (obj);
#line 5009 "system-management.c"
}

static GType
synapse_system_management_plugin_suspend_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginSuspendActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_suspend_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPluginSuspendAction), 0, (GInstanceInitFunc) synapse_system_management_plugin_suspend_action_instance_init, NULL };
	GType synapse_system_management_plugin_suspend_action_type_id;
	synapse_system_management_plugin_suspend_action_type_id = g_type_register_static (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, "SynapseSystemManagementPluginSuspendAction", &g_define_type_info, 0);
	SynapseSystemManagementPluginSuspendAction_private_offset = g_type_add_instance_private (synapse_system_management_plugin_suspend_action_type_id, sizeof (SynapseSystemManagementPluginSuspendActionPrivate));
	return synapse_system_management_plugin_suspend_action_type_id;
}

static GType
synapse_system_management_plugin_suspend_action_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_suspend_action_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_suspend_action_type_id__once)) {
		GType synapse_system_management_plugin_suspend_action_type_id;
		synapse_system_management_plugin_suspend_action_type_id = synapse_system_management_plugin_suspend_action_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_suspend_action_type_id__once, synapse_system_management_plugin_suspend_action_type_id);
	}
	return synapse_system_management_plugin_suspend_action_type_id__once;
}

static inline gpointer
synapse_system_management_plugin_hibernate_action_get_instance_private (SynapseSystemManagementPluginHibernateAction* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseSystemManagementPluginHibernateAction_private_offset);
}

static SynapseSystemManagementPluginHibernateAction*
synapse_system_management_plugin_hibernate_action_construct (GType object_type)
{
	SynapseSystemManagementPluginHibernateAction * self = NULL;
#line 189 "system-management.vala"
	self = (SynapseSystemManagementPluginHibernateAction*) g_object_new (object_type, "title", _ ("Hibernate"), "description", _ ("Put your computer into hibernation mode"), "icon-name", "system-hibernate", "has-thumbnail", FALSE, NULL);
#line 187 "system-management.vala"
	return self;
#line 5048 "system-management.c"
}

static SynapseSystemManagementPluginHibernateAction*
synapse_system_management_plugin_hibernate_action_new (void)
{
#line 187 "system-management.vala"
	return synapse_system_management_plugin_hibernate_action_construct (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION);
#line 5056 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_check_allowed_data_free (gpointer _data)
{
	SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_;
	_data_ = _data;
#line 185 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 185 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginHibernateActionCheckAllowedData, _data_);
#line 5068 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_check_allowed (SynapseSystemManagementPluginHibernateAction* self,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_)
{
	SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_;
	SynapseSystemManagementPluginHibernateAction* _tmp0_;
#line 185 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 185 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginHibernateActionCheckAllowedData);
#line 185 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 185 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_hibernate_action_check_allowed_data_free);
#line 185 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 185 "system-management.vala"
	_data_->self = _tmp0_;
#line 185 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_check_allowed_co (_data_);
#line 5092 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_check_allowed_finish (SynapseSystemManagementPluginHibernateAction* self,
                                                                        GAsyncResult* _res_)
{
	SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_;
#line 185 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 5102 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_check_allowed_ready (GObject* source_object,
                                                                       GAsyncResult* _res_,
                                                                       gpointer _user_data_)
{
	SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_;
#line 222 "system-management.vala"
	_data_ = _user_data_;
#line 222 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 222 "system-management.vala"
	_data_->_res_ = _res_;
#line 222 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_check_allowed_co (_data_);
#line 5119 "system-management.c"
}

static gboolean
synapse_system_management_plugin_hibernate_action_check_allowed_co (SynapseSystemManagementPluginHibernateActionCheckAllowedData* _data_)
{
#line 199 "system-management.vala"
	switch (_data_->_state_) {
#line 199 "system-management.vala"
		case 0:
#line 5129 "system-management.c"
		goto _state_0;
#line 199 "system-management.vala"
		case 1:
#line 5133 "system-management.c"
		goto _state_1;
		default:
#line 199 "system-management.vala"
		g_assert_not_reached ();
#line 5138 "system-management.c"
	}
	_state_0:
	{
#line 203 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 203 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 203 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5148 "system-management.c"
			goto __catch0_g_error;
		}
#line 207 "system-management.vala"
		_data_->_tmp2_ = _data_->dbus_interface;
#line 207 "system-management.vala"
		_data_->_tmp3_ = synapse_systemd_object_can_hibernate (_data_->_tmp2_, &_data_->_inner_error0_);
#line 207 "system-management.vala"
		_data_->_tmp1_ = _data_->_tmp3_;
#line 207 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 207 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 5161 "system-management.c"
			goto __catch0_g_error;
		}
#line 207 "system-management.vala"
		_data_->self->priv->allowed = g_strcmp0 (_data_->_tmp1_, "yes") == 0;
#line 208 "system-management.vala"
		_g_free0 (_data_->_tmp1_);
#line 208 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 208 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 208 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 208 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 208 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5178 "system-management.c"
			}
		}
#line 208 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 208 "system-management.vala"
		return FALSE;
#line 5185 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 201 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 201 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 212 "system-management.vala"
		_data_->_tmp4_ = _data_->err;
#line 212 "system-management.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 212 "system-management.vala"
		g_warning ("system-management.vala:212: %s", _data_->_tmp5_);
#line 213 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 201 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 5204 "system-management.c"
	}
	__finally0:
#line 201 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 201 "system-management.vala"
		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);
#line 201 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 201 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 201 "system-management.vala"
		return FALSE;
#line 5217 "system-management.c"
	}
	{
#line 218 "system-management.vala"
		_data_->_tmp6_ = (SynapseUPowerObject*) g_initable_new (SYNAPSE_TYPE_UPOWER_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_UPOWER_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_UPOWER_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.UPower", NULL);
#line 218 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseUPowerObject*) _data_->_tmp6_;
#line 218 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5226 "system-management.c"
			goto __catch1_g_error;
		}
#line 222 "system-management.vala"
		_data_->_tmp8_ = _data_->_vala1_dbus_interface;
#line 222 "system-management.vala"
		_data_->_state_ = 1;
#line 222 "system-management.vala"
		synapse_upower_object_hibernate_allowed (_data_->_tmp8_, synapse_system_management_plugin_hibernate_action_check_allowed_ready, _data_);
#line 222 "system-management.vala"
		return FALSE;
#line 5237 "system-management.c"
		_state_1:
#line 222 "system-management.vala"
		_data_->_tmp7_ = synapse_upower_object_hibernate_allowed_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
#line 222 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 222 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5245 "system-management.c"
			goto __catch1_g_error;
		}
#line 222 "system-management.vala"
		_data_->self->priv->allowed = _data_->_tmp7_;
#line 216 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5252 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 216 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 216 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 226 "system-management.vala"
		_data_->_tmp9_ = _data_->_vala1_err;
#line 226 "system-management.vala"
		_data_->_tmp10_ = _data_->_tmp9_->message;
#line 226 "system-management.vala"
		g_warning ("system-management.vala:226: %s", _data_->_tmp10_);
#line 227 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 216 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 5271 "system-management.c"
	}
	__finally1:
#line 216 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 216 "system-management.vala"
		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);
#line 216 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 216 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 216 "system-management.vala"
		return FALSE;
#line 5284 "system-management.c"
	}
#line 199 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 199 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 199 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 199 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5294 "system-management.c"
		}
	}
#line 199 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 199 "system-management.vala"
	return FALSE;
#line 5301 "system-management.c"
}

static gboolean
synapse_system_management_plugin_hibernate_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base)
{
	SynapseSystemManagementPluginHibernateAction * self;
	gboolean result;
#line 233 "system-management.vala"
	self = (SynapseSystemManagementPluginHibernateAction*) base;
#line 235 "system-management.vala"
	result = self->priv->allowed;
#line 235 "system-management.vala"
	return result;
#line 5315 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_do_hibernate_data_free (gpointer _data)
{
	SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_;
	_data_ = _data;
#line 185 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 185 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginHibernateActionDoHibernateData, _data_);
#line 5327 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_do_hibernate (SynapseSystemManagementPluginHibernateAction* self,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_;
	SynapseSystemManagementPluginHibernateAction* _tmp0_;
#line 185 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 185 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginHibernateActionDoHibernateData);
#line 185 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 185 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_hibernate_action_do_hibernate_data_free);
#line 185 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 185 "system-management.vala"
	_data_->self = _tmp0_;
#line 185 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_do_hibernate_co (_data_);
#line 5351 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_do_hibernate_finish (SynapseSystemManagementPluginHibernateAction* self,
                                                                       GAsyncResult* _res_)
{
	SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_;
#line 185 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 5361 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_do_hibernate_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_)
{
	SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_;
#line 262 "system-management.vala"
	_data_ = _user_data_;
#line 262 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 262 "system-management.vala"
	_data_->_res_ = _res_;
#line 262 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_do_hibernate_co (_data_);
#line 5378 "system-management.c"
}

static gboolean
_synapse_system_management_plugin_hibernate_action_do_hibernate_co_gsource_func (gpointer self)
{
	gboolean result;
	result = synapse_system_management_plugin_hibernate_action_do_hibernate_co (self);
#line 268 "system-management.vala"
	return result;
#line 5388 "system-management.c"
}

static gboolean
synapse_system_management_plugin_hibernate_action_do_hibernate_co (SynapseSystemManagementPluginHibernateActionDoHibernateData* _data_)
{
#line 238 "system-management.vala"
	switch (_data_->_state_) {
#line 238 "system-management.vala"
		case 0:
#line 5398 "system-management.c"
		goto _state_0;
#line 238 "system-management.vala"
		case 1:
#line 5402 "system-management.c"
		goto _state_1;
#line 238 "system-management.vala"
		case 2:
#line 5406 "system-management.c"
		goto _state_2;
		default:
#line 238 "system-management.vala"
		g_assert_not_reached ();
#line 5411 "system-management.c"
	}
	_state_0:
	{
#line 242 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 242 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 242 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5421 "system-management.c"
			goto __catch0_g_error;
		}
#line 246 "system-management.vala"
		_data_->_tmp1_ = _data_->dbus_interface;
#line 246 "system-management.vala"
		synapse_systemd_object_hibernate (_data_->_tmp1_, TRUE, &_data_->_inner_error0_);
#line 246 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 246 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 5432 "system-management.c"
			goto __catch0_g_error;
		}
#line 247 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 247 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 247 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 247 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 247 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5445 "system-management.c"
			}
		}
#line 247 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 247 "system-management.vala"
		return FALSE;
#line 5452 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 240 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 240 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 251 "system-management.vala"
		_data_->_tmp2_ = _data_->err;
#line 251 "system-management.vala"
		_data_->_tmp3_ = _data_->_tmp2_->message;
#line 251 "system-management.vala"
		g_warning ("system-management.vala:251: %s", _data_->_tmp3_);
#line 240 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 5469 "system-management.c"
	}
	__finally0:
#line 240 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 240 "system-management.vala"
		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);
#line 240 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 240 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 240 "system-management.vala"
		return FALSE;
#line 5482 "system-management.c"
	}
	{
#line 256 "system-management.vala"
		_data_->_tmp4_ = (SynapseUPowerObject*) g_initable_new (SYNAPSE_TYPE_UPOWER_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_UPOWER_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_UPOWER_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.UPower", NULL);
#line 256 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseUPowerObject*) _data_->_tmp4_;
#line 256 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5491 "system-management.c"
			goto __catch1_g_error;
		}
		{
#line 262 "system-management.vala"
			_data_->_tmp5_ = _data_->_vala1_dbus_interface;
#line 262 "system-management.vala"
			_data_->_state_ = 1;
#line 262 "system-management.vala"
			synapse_upower_object_about_to_sleep (_data_->_tmp5_, synapse_system_management_plugin_hibernate_action_do_hibernate_ready, _data_);
#line 262 "system-management.vala"
			return FALSE;
#line 5503 "system-management.c"
			_state_1:
#line 262 "system-management.vala"
			synapse_upower_object_about_to_sleep_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error0_);
#line 262 "system-management.vala"
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5509 "system-management.c"
				goto __catch2_g_error;
			}
		}
		goto __finally2;
		__catch2_g_error:
		{
#line 260 "system-management.vala"
			g_clear_error (&_data_->_inner_error0_);
#line 5518 "system-management.c"
		}
		__finally2:
#line 260 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 260 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5525 "system-management.c"
			goto __catch1_g_error;
		}
#line 266 "system-management.vala"
		synapse_screen_saver_plugin_lock_screen ();
#line 268 "system-management.vala"
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 2000, _synapse_system_management_plugin_hibernate_action_do_hibernate_co_gsource_func, _data_, NULL);
#line 269 "system-management.vala"
		_data_->_state_ = 2;
#line 269 "system-management.vala"
		return FALSE;
#line 5536 "system-management.c"
		_state_2:
		;
#line 270 "system-management.vala"
		_data_->_tmp6_ = _data_->_vala1_dbus_interface;
#line 270 "system-management.vala"
		synapse_upower_object_hibernate (_data_->_tmp6_, NULL, NULL);
#line 254 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5545 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 254 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 254 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 274 "system-management.vala"
		_data_->_tmp7_ = _data_->_vala1_err;
#line 274 "system-management.vala"
		_data_->_tmp8_ = _data_->_tmp7_->message;
#line 274 "system-management.vala"
		g_warning ("system-management.vala:274: %s", _data_->_tmp8_);
#line 254 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 5562 "system-management.c"
	}
	__finally1:
#line 254 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 254 "system-management.vala"
		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);
#line 254 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 254 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 254 "system-management.vala"
		return FALSE;
#line 5575 "system-management.c"
	}
#line 238 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 238 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 238 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 238 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5585 "system-management.c"
		}
	}
#line 238 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 238 "system-management.vala"
	return FALSE;
#line 5592 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_real_do_action (SynapseActionMatch* base)
{
	SynapseSystemManagementPluginHibernateAction * self;
#line 278 "system-management.vala"
	self = (SynapseSystemManagementPluginHibernateAction*) base;
#line 280 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_do_hibernate (self, NULL, NULL);
#line 5603 "system-management.c"
}

static GObject *
synapse_system_management_plugin_hibernate_action_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseSystemManagementPluginHibernateAction * self;
#line 194 "system-management.vala"
	parent_class = G_OBJECT_CLASS (synapse_system_management_plugin_hibernate_action_parent_class);
#line 194 "system-management.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 194 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION, SynapseSystemManagementPluginHibernateAction);
#line 196 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_check_allowed (self, NULL, NULL);
#line 194 "system-management.vala"
	return obj;
#line 5624 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_class_init (SynapseSystemManagementPluginHibernateActionClass * klass,
                                                              gpointer klass_data)
{
#line 185 "system-management.vala"
	synapse_system_management_plugin_hibernate_action_parent_class = g_type_class_peek_parent (klass);
#line 185 "system-management.vala"
	g_type_class_adjust_private_offset (klass, &SynapseSystemManagementPluginHibernateAction_private_offset);
#line 185 "system-management.vala"
	((SynapseSystemManagementPluginSystemActionClass *) klass)->action_allowed = (gboolean (*) (SynapseSystemManagementPluginSystemAction*)) synapse_system_management_plugin_hibernate_action_real_action_allowed;
#line 185 "system-management.vala"
	((SynapseActionMatchClass *) klass)->do_action = (void (*) (SynapseActionMatch*)) synapse_system_management_plugin_hibernate_action_real_do_action;
#line 185 "system-management.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_system_management_plugin_hibernate_action_constructor;
#line 185 "system-management.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_system_management_plugin_hibernate_action_finalize;
#line 5643 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_instance_init (SynapseSystemManagementPluginHibernateAction * self,
                                                                 gpointer klass)
{
#line 185 "system-management.vala"
	self->priv = synapse_system_management_plugin_hibernate_action_get_instance_private (self);
#line 231 "system-management.vala"
	self->priv->allowed = FALSE;
#line 5654 "system-management.c"
}

static void
synapse_system_management_plugin_hibernate_action_finalize (GObject * obj)
{
	SynapseSystemManagementPluginHibernateAction * self;
#line 185 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_HIBERNATE_ACTION, SynapseSystemManagementPluginHibernateAction);
#line 185 "system-management.vala"
	G_OBJECT_CLASS (synapse_system_management_plugin_hibernate_action_parent_class)->finalize (obj);
#line 5665 "system-management.c"
}

static GType
synapse_system_management_plugin_hibernate_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginHibernateActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_hibernate_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPluginHibernateAction), 0, (GInstanceInitFunc) synapse_system_management_plugin_hibernate_action_instance_init, NULL };
	GType synapse_system_management_plugin_hibernate_action_type_id;
	synapse_system_management_plugin_hibernate_action_type_id = g_type_register_static (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, "SynapseSystemManagementPluginHibernateAction", &g_define_type_info, 0);
	SynapseSystemManagementPluginHibernateAction_private_offset = g_type_add_instance_private (synapse_system_management_plugin_hibernate_action_type_id, sizeof (SynapseSystemManagementPluginHibernateActionPrivate));
	return synapse_system_management_plugin_hibernate_action_type_id;
}

static GType
synapse_system_management_plugin_hibernate_action_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_hibernate_action_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_hibernate_action_type_id__once)) {
		GType synapse_system_management_plugin_hibernate_action_type_id;
		synapse_system_management_plugin_hibernate_action_type_id = synapse_system_management_plugin_hibernate_action_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_hibernate_action_type_id__once, synapse_system_management_plugin_hibernate_action_type_id);
	}
	return synapse_system_management_plugin_hibernate_action_type_id__once;
}

static inline gpointer
synapse_system_management_plugin_shutdown_action_get_instance_private (SynapseSystemManagementPluginShutdownAction* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseSystemManagementPluginShutdownAction_private_offset);
}

static SynapseSystemManagementPluginShutdownAction*
synapse_system_management_plugin_shutdown_action_construct (GType object_type)
{
	SynapseSystemManagementPluginShutdownAction * self = NULL;
#line 288 "system-management.vala"
	self = (SynapseSystemManagementPluginShutdownAction*) g_object_new (object_type, "title", _ ("Shut Down"), "description", _ ("Turn your computer off"), "icon-name", "system-shutdown", "has-thumbnail", FALSE, NULL);
#line 286 "system-management.vala"
	return self;
#line 5704 "system-management.c"
}

static SynapseSystemManagementPluginShutdownAction*
synapse_system_management_plugin_shutdown_action_new (void)
{
#line 286 "system-management.vala"
	return synapse_system_management_plugin_shutdown_action_construct (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION);
#line 5712 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_check_allowed_data_free (gpointer _data)
{
	SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_;
	_data_ = _data;
#line 284 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 284 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginShutdownActionCheckAllowedData, _data_);
#line 5724 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_check_allowed (SynapseSystemManagementPluginShutdownAction* self,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_;
	SynapseSystemManagementPluginShutdownAction* _tmp0_;
#line 284 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 284 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginShutdownActionCheckAllowedData);
#line 284 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 284 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_shutdown_action_check_allowed_data_free);
#line 284 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 284 "system-management.vala"
	_data_->self = _tmp0_;
#line 284 "system-management.vala"
	synapse_system_management_plugin_shutdown_action_check_allowed_co (_data_);
#line 5748 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_check_allowed_finish (SynapseSystemManagementPluginShutdownAction* self,
                                                                       GAsyncResult* _res_)
{
	SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_;
#line 284 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 5758 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_check_allowed_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_)
{
	SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_;
#line 321 "system-management.vala"
	_data_ = _user_data_;
#line 321 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 321 "system-management.vala"
	_data_->_res_ = _res_;
#line 321 "system-management.vala"
	synapse_system_management_plugin_shutdown_action_check_allowed_co (_data_);
#line 5775 "system-management.c"
}

static gboolean
synapse_system_management_plugin_shutdown_action_check_allowed_co (SynapseSystemManagementPluginShutdownActionCheckAllowedData* _data_)
{
#line 298 "system-management.vala"
	switch (_data_->_state_) {
#line 298 "system-management.vala"
		case 0:
#line 5785 "system-management.c"
		goto _state_0;
#line 298 "system-management.vala"
		case 1:
#line 5789 "system-management.c"
		goto _state_1;
		default:
#line 298 "system-management.vala"
		g_assert_not_reached ();
#line 5794 "system-management.c"
	}
	_state_0:
	{
#line 302 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 302 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 302 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5804 "system-management.c"
			goto __catch0_g_error;
		}
#line 306 "system-management.vala"
		_data_->_tmp2_ = _data_->dbus_interface;
#line 306 "system-management.vala"
		_data_->_tmp3_ = synapse_systemd_object_can_power_off (_data_->_tmp2_, &_data_->_inner_error0_);
#line 306 "system-management.vala"
		_data_->_tmp1_ = _data_->_tmp3_;
#line 306 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 306 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 5817 "system-management.c"
			goto __catch0_g_error;
		}
#line 306 "system-management.vala"
		_data_->self->priv->allowed = g_strcmp0 (_data_->_tmp1_, "yes") == 0;
#line 307 "system-management.vala"
		_g_free0 (_data_->_tmp1_);
#line 307 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 307 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 307 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 307 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 307 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5834 "system-management.c"
			}
		}
#line 307 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 307 "system-management.vala"
		return FALSE;
#line 5841 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 300 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 300 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 311 "system-management.vala"
		_data_->_tmp4_ = _data_->err;
#line 311 "system-management.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 311 "system-management.vala"
		g_warning ("system-management.vala:311: %s", _data_->_tmp5_);
#line 312 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 300 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 5860 "system-management.c"
	}
	__finally0:
#line 300 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 300 "system-management.vala"
		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);
#line 300 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 300 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 300 "system-management.vala"
		return FALSE;
#line 5873 "system-management.c"
	}
	{
#line 317 "system-management.vala"
		_data_->_tmp6_ = (SynapseConsoleKitObject*) g_initable_new (SYNAPSE_TYPE_CONSOLE_KIT_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_CONSOLE_KIT_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_CONSOLE_KIT_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
#line 317 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseConsoleKitObject*) _data_->_tmp6_;
#line 317 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 5882 "system-management.c"
			goto __catch1_g_error;
		}
#line 321 "system-management.vala"
		_data_->_tmp8_ = _data_->_vala1_dbus_interface;
#line 321 "system-management.vala"
		_data_->_state_ = 1;
#line 321 "system-management.vala"
		synapse_console_kit_object_can_stop (_data_->_tmp8_, synapse_system_management_plugin_shutdown_action_check_allowed_ready, _data_);
#line 321 "system-management.vala"
		return FALSE;
#line 5893 "system-management.c"
		_state_1:
#line 321 "system-management.vala"
		_data_->_tmp7_ = synapse_console_kit_object_can_stop_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
#line 321 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 321 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5901 "system-management.c"
			goto __catch1_g_error;
		}
#line 321 "system-management.vala"
		_data_->self->priv->allowed = _data_->_tmp7_;
#line 315 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 5908 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 315 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 315 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 325 "system-management.vala"
		_data_->_tmp9_ = _data_->_vala1_err;
#line 325 "system-management.vala"
		_data_->_tmp10_ = _data_->_tmp9_->message;
#line 325 "system-management.vala"
		g_warning ("system-management.vala:325: %s", _data_->_tmp10_);
#line 326 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 315 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 5927 "system-management.c"
	}
	__finally1:
#line 315 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 315 "system-management.vala"
		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);
#line 315 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 315 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 315 "system-management.vala"
		return FALSE;
#line 5940 "system-management.c"
	}
#line 298 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 298 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 298 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 298 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 5950 "system-management.c"
		}
	}
#line 298 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 298 "system-management.vala"
	return FALSE;
#line 5957 "system-management.c"
}

static gboolean
synapse_system_management_plugin_shutdown_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base)
{
	SynapseSystemManagementPluginShutdownAction * self;
	gboolean result;
#line 332 "system-management.vala"
	self = (SynapseSystemManagementPluginShutdownAction*) base;
#line 334 "system-management.vala"
	result = self->priv->allowed;
#line 334 "system-management.vala"
	return result;
#line 5971 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_real_do_action (SynapseActionMatch* base)
{
	SynapseSystemManagementPluginShutdownAction * self;
	GError* _inner_error0_ = NULL;
#line 337 "system-management.vala"
	self = (SynapseSystemManagementPluginShutdownAction*) base;
#line 5981 "system-management.c"
	{
		SynapseSystemdObject* dbus_interface = NULL;
		SynapseSystemdObject* _tmp0_;
		SynapseSystemdObject* _tmp1_;
#line 341 "system-management.vala"
		_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 341 "system-management.vala"
		dbus_interface = (SynapseSystemdObject*) _tmp0_;
#line 341 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 5992 "system-management.c"
			goto __catch0_g_error;
		}
#line 345 "system-management.vala"
		_tmp1_ = dbus_interface;
#line 345 "system-management.vala"
		synapse_systemd_object_power_off (_tmp1_, TRUE, &_inner_error0_);
#line 345 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 345 "system-management.vala"
			_g_object_unref0 (dbus_interface);
#line 6003 "system-management.c"
			goto __catch0_g_error;
		}
#line 346 "system-management.vala"
		_g_object_unref0 (dbus_interface);
#line 346 "system-management.vala"
		return;
#line 6010 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
#line 339 "system-management.vala"
		err = _inner_error0_;
#line 339 "system-management.vala"
		_inner_error0_ = NULL;
#line 350 "system-management.vala"
		_tmp2_ = err;
#line 350 "system-management.vala"
		_tmp3_ = _tmp2_->message;
#line 350 "system-management.vala"
		g_warning ("system-management.vala:350: %s", _tmp3_);
#line 339 "system-management.vala"
		_g_error_free0 (err);
#line 6030 "system-management.c"
	}
	__finally0:
#line 339 "system-management.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 339 "system-management.vala"
		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);
#line 339 "system-management.vala"
		g_clear_error (&_inner_error0_);
#line 339 "system-management.vala"
		return;
#line 6041 "system-management.c"
	}
	{
		SynapseConsoleKitObject* dbus_interface = NULL;
		SynapseConsoleKitObject* _tmp4_;
		SynapseConsoleKitObject* _tmp5_;
#line 355 "system-management.vala"
		_tmp4_ = (SynapseConsoleKitObject*) g_initable_new (SYNAPSE_TYPE_CONSOLE_KIT_OBJECT_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_CONSOLE_KIT_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_CONSOLE_KIT_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
#line 355 "system-management.vala"
		dbus_interface = (SynapseConsoleKitObject*) _tmp4_;
#line 355 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 6053 "system-management.c"
			goto __catch1_g_error;
		}
#line 359 "system-management.vala"
		_tmp5_ = dbus_interface;
#line 359 "system-management.vala"
		synapse_console_kit_object_stop (_tmp5_, &_inner_error0_);
#line 359 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 359 "system-management.vala"
			_g_object_unref0 (dbus_interface);
#line 6064 "system-management.c"
			goto __catch1_g_error;
		}
#line 353 "system-management.vala"
		_g_object_unref0 (dbus_interface);
#line 6069 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* err = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
#line 353 "system-management.vala"
		err = _inner_error0_;
#line 353 "system-management.vala"
		_inner_error0_ = NULL;
#line 363 "system-management.vala"
		_tmp6_ = err;
#line 363 "system-management.vala"
		_tmp7_ = _tmp6_->message;
#line 363 "system-management.vala"
		g_warning ("system-management.vala:363: %s", _tmp7_);
#line 353 "system-management.vala"
		_g_error_free0 (err);
#line 6089 "system-management.c"
	}
	__finally1:
#line 353 "system-management.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 353 "system-management.vala"
		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);
#line 353 "system-management.vala"
		g_clear_error (&_inner_error0_);
#line 353 "system-management.vala"
		return;
#line 6100 "system-management.c"
	}
}

static GObject *
synapse_system_management_plugin_shutdown_action_constructor (GType type,
                                                              guint n_construct_properties,
                                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseSystemManagementPluginShutdownAction * self;
#line 293 "system-management.vala"
	parent_class = G_OBJECT_CLASS (synapse_system_management_plugin_shutdown_action_parent_class);
#line 293 "system-management.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 293 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION, SynapseSystemManagementPluginShutdownAction);
#line 295 "system-management.vala"
	synapse_system_management_plugin_shutdown_action_check_allowed (self, NULL, NULL);
#line 293 "system-management.vala"
	return obj;
#line 6122 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_class_init (SynapseSystemManagementPluginShutdownActionClass * klass,
                                                             gpointer klass_data)
{
#line 284 "system-management.vala"
	synapse_system_management_plugin_shutdown_action_parent_class = g_type_class_peek_parent (klass);
#line 284 "system-management.vala"
	g_type_class_adjust_private_offset (klass, &SynapseSystemManagementPluginShutdownAction_private_offset);
#line 284 "system-management.vala"
	((SynapseSystemManagementPluginSystemActionClass *) klass)->action_allowed = (gboolean (*) (SynapseSystemManagementPluginSystemAction*)) synapse_system_management_plugin_shutdown_action_real_action_allowed;
#line 284 "system-management.vala"
	((SynapseActionMatchClass *) klass)->do_action = (void (*) (SynapseActionMatch*)) synapse_system_management_plugin_shutdown_action_real_do_action;
#line 284 "system-management.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_system_management_plugin_shutdown_action_constructor;
#line 284 "system-management.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_system_management_plugin_shutdown_action_finalize;
#line 6141 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_instance_init (SynapseSystemManagementPluginShutdownAction * self,
                                                                gpointer klass)
{
#line 284 "system-management.vala"
	self->priv = synapse_system_management_plugin_shutdown_action_get_instance_private (self);
#line 330 "system-management.vala"
	self->priv->allowed = FALSE;
#line 6152 "system-management.c"
}

static void
synapse_system_management_plugin_shutdown_action_finalize (GObject * obj)
{
	SynapseSystemManagementPluginShutdownAction * self;
#line 284 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SHUTDOWN_ACTION, SynapseSystemManagementPluginShutdownAction);
#line 284 "system-management.vala"
	G_OBJECT_CLASS (synapse_system_management_plugin_shutdown_action_parent_class)->finalize (obj);
#line 6163 "system-management.c"
}

static GType
synapse_system_management_plugin_shutdown_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginShutdownActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_shutdown_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPluginShutdownAction), 0, (GInstanceInitFunc) synapse_system_management_plugin_shutdown_action_instance_init, NULL };
	GType synapse_system_management_plugin_shutdown_action_type_id;
	synapse_system_management_plugin_shutdown_action_type_id = g_type_register_static (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, "SynapseSystemManagementPluginShutdownAction", &g_define_type_info, 0);
	SynapseSystemManagementPluginShutdownAction_private_offset = g_type_add_instance_private (synapse_system_management_plugin_shutdown_action_type_id, sizeof (SynapseSystemManagementPluginShutdownActionPrivate));
	return synapse_system_management_plugin_shutdown_action_type_id;
}

static GType
synapse_system_management_plugin_shutdown_action_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_shutdown_action_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_shutdown_action_type_id__once)) {
		GType synapse_system_management_plugin_shutdown_action_type_id;
		synapse_system_management_plugin_shutdown_action_type_id = synapse_system_management_plugin_shutdown_action_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_shutdown_action_type_id__once, synapse_system_management_plugin_shutdown_action_type_id);
	}
	return synapse_system_management_plugin_shutdown_action_type_id__once;
}

static inline gpointer
synapse_system_management_plugin_restart_action_get_instance_private (SynapseSystemManagementPluginRestartAction* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseSystemManagementPluginRestartAction_private_offset);
}

static SynapseSystemManagementPluginRestartAction*
synapse_system_management_plugin_restart_action_construct (GType object_type)
{
	SynapseSystemManagementPluginRestartAction * self = NULL;
#line 372 "system-management.vala"
	self = (SynapseSystemManagementPluginRestartAction*) g_object_new (object_type, "title", _ ("Restart"), "description", _ ("Restart your computer"), "icon-name", "system-restart", "has-thumbnail", FALSE, NULL);
#line 370 "system-management.vala"
	return self;
#line 6202 "system-management.c"
}

static SynapseSystemManagementPluginRestartAction*
synapse_system_management_plugin_restart_action_new (void)
{
#line 370 "system-management.vala"
	return synapse_system_management_plugin_restart_action_construct (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION);
#line 6210 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_check_allowed_data_free (gpointer _data)
{
	SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_;
	_data_ = _data;
#line 368 "system-management.vala"
	_g_object_unref0 (_data_->self);
#line 368 "system-management.vala"
	g_slice_free (SynapseSystemManagementPluginRestartActionCheckAllowedData, _data_);
#line 6222 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_check_allowed (SynapseSystemManagementPluginRestartAction* self,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_;
	SynapseSystemManagementPluginRestartAction* _tmp0_;
#line 368 "system-management.vala"
	g_return_if_fail (self != NULL);
#line 368 "system-management.vala"
	_data_ = g_slice_new0 (SynapseSystemManagementPluginRestartActionCheckAllowedData);
#line 368 "system-management.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 368 "system-management.vala"
	g_task_set_task_data (_data_->_async_result, _data_, synapse_system_management_plugin_restart_action_check_allowed_data_free);
#line 368 "system-management.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 368 "system-management.vala"
	_data_->self = _tmp0_;
#line 368 "system-management.vala"
	synapse_system_management_plugin_restart_action_check_allowed_co (_data_);
#line 6246 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_check_allowed_finish (SynapseSystemManagementPluginRestartAction* self,
                                                                      GAsyncResult* _res_)
{
	SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_;
#line 368 "system-management.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 6256 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_check_allowed_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_)
{
	SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_;
#line 405 "system-management.vala"
	_data_ = _user_data_;
#line 405 "system-management.vala"
	_data_->_source_object_ = source_object;
#line 405 "system-management.vala"
	_data_->_res_ = _res_;
#line 405 "system-management.vala"
	synapse_system_management_plugin_restart_action_check_allowed_co (_data_);
#line 6273 "system-management.c"
}

static gboolean
synapse_system_management_plugin_restart_action_check_allowed_co (SynapseSystemManagementPluginRestartActionCheckAllowedData* _data_)
{
#line 382 "system-management.vala"
	switch (_data_->_state_) {
#line 382 "system-management.vala"
		case 0:
#line 6283 "system-management.c"
		goto _state_0;
#line 382 "system-management.vala"
		case 1:
#line 6287 "system-management.c"
		goto _state_1;
		default:
#line 382 "system-management.vala"
		g_assert_not_reached ();
#line 6292 "system-management.c"
	}
	_state_0:
	{
#line 386 "system-management.vala"
		_data_->_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 386 "system-management.vala"
		_data_->dbus_interface = (SynapseSystemdObject*) _data_->_tmp0_;
#line 386 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 6302 "system-management.c"
			goto __catch0_g_error;
		}
#line 390 "system-management.vala"
		_data_->_tmp2_ = _data_->dbus_interface;
#line 390 "system-management.vala"
		_data_->_tmp3_ = synapse_systemd_object_can_reboot (_data_->_tmp2_, &_data_->_inner_error0_);
#line 390 "system-management.vala"
		_data_->_tmp1_ = _data_->_tmp3_;
#line 390 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 390 "system-management.vala"
			_g_object_unref0 (_data_->dbus_interface);
#line 6315 "system-management.c"
			goto __catch0_g_error;
		}
#line 390 "system-management.vala"
		_data_->self->priv->allowed = g_strcmp0 (_data_->_tmp1_, "yes") == 0;
#line 391 "system-management.vala"
		_g_free0 (_data_->_tmp1_);
#line 391 "system-management.vala"
		_g_object_unref0 (_data_->dbus_interface);
#line 391 "system-management.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 391 "system-management.vala"
		if (_data_->_state_ != 0) {
#line 391 "system-management.vala"
			while (!g_task_get_completed (_data_->_async_result)) {
#line 391 "system-management.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 6332 "system-management.c"
			}
		}
#line 391 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 391 "system-management.vala"
		return FALSE;
#line 6339 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 384 "system-management.vala"
		_data_->err = _data_->_inner_error0_;
#line 384 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 395 "system-management.vala"
		_data_->_tmp4_ = _data_->err;
#line 395 "system-management.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 395 "system-management.vala"
		g_warning ("system-management.vala:395: %s", _data_->_tmp5_);
#line 396 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 384 "system-management.vala"
		_g_error_free0 (_data_->err);
#line 6358 "system-management.c"
	}
	__finally0:
#line 384 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 384 "system-management.vala"
		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);
#line 384 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 384 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 384 "system-management.vala"
		return FALSE;
#line 6371 "system-management.c"
	}
	{
#line 401 "system-management.vala"
		_data_->_tmp6_ = (SynapseConsoleKitObject*) g_initable_new (SYNAPSE_TYPE_CONSOLE_KIT_OBJECT_PROXY, NULL, &_data_->_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_CONSOLE_KIT_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_CONSOLE_KIT_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
#line 401 "system-management.vala"
		_data_->_vala1_dbus_interface = (SynapseConsoleKitObject*) _data_->_tmp6_;
#line 401 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 6380 "system-management.c"
			goto __catch1_g_error;
		}
#line 405 "system-management.vala"
		_data_->_tmp8_ = _data_->_vala1_dbus_interface;
#line 405 "system-management.vala"
		_data_->_state_ = 1;
#line 405 "system-management.vala"
		synapse_console_kit_object_can_restart (_data_->_tmp8_, synapse_system_management_plugin_restart_action_check_allowed_ready, _data_);
#line 405 "system-management.vala"
		return FALSE;
#line 6391 "system-management.c"
		_state_1:
#line 405 "system-management.vala"
		_data_->_tmp7_ = synapse_console_kit_object_can_restart_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error0_);
#line 405 "system-management.vala"
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 405 "system-management.vala"
			_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 6399 "system-management.c"
			goto __catch1_g_error;
		}
#line 405 "system-management.vala"
		_data_->self->priv->allowed = _data_->_tmp7_;
#line 399 "system-management.vala"
		_g_object_unref0 (_data_->_vala1_dbus_interface);
#line 6406 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 399 "system-management.vala"
		_data_->_vala1_err = _data_->_inner_error0_;
#line 399 "system-management.vala"
		_data_->_inner_error0_ = NULL;
#line 409 "system-management.vala"
		_data_->_tmp9_ = _data_->_vala1_err;
#line 409 "system-management.vala"
		_data_->_tmp10_ = _data_->_tmp9_->message;
#line 409 "system-management.vala"
		g_warning ("system-management.vala:409: %s", _data_->_tmp10_);
#line 410 "system-management.vala"
		_data_->self->priv->allowed = FALSE;
#line 399 "system-management.vala"
		_g_error_free0 (_data_->_vala1_err);
#line 6425 "system-management.c"
	}
	__finally1:
#line 399 "system-management.vala"
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
#line 399 "system-management.vala"
		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);
#line 399 "system-management.vala"
		g_clear_error (&_data_->_inner_error0_);
#line 399 "system-management.vala"
		g_object_unref (_data_->_async_result);
#line 399 "system-management.vala"
		return FALSE;
#line 6438 "system-management.c"
	}
#line 382 "system-management.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 382 "system-management.vala"
	if (_data_->_state_ != 0) {
#line 382 "system-management.vala"
		while (!g_task_get_completed (_data_->_async_result)) {
#line 382 "system-management.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 6448 "system-management.c"
		}
	}
#line 382 "system-management.vala"
	g_object_unref (_data_->_async_result);
#line 382 "system-management.vala"
	return FALSE;
#line 6455 "system-management.c"
}

static gboolean
synapse_system_management_plugin_restart_action_real_action_allowed (SynapseSystemManagementPluginSystemAction* base)
{
	SynapseSystemManagementPluginRestartAction * self;
	gboolean result;
#line 416 "system-management.vala"
	self = (SynapseSystemManagementPluginRestartAction*) base;
#line 418 "system-management.vala"
	result = self->priv->allowed;
#line 418 "system-management.vala"
	return result;
#line 6469 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_real_do_action (SynapseActionMatch* base)
{
	SynapseSystemManagementPluginRestartAction * self;
	GError* _inner_error0_ = NULL;
#line 421 "system-management.vala"
	self = (SynapseSystemManagementPluginRestartAction*) base;
#line 6479 "system-management.c"
	{
		SynapseSystemdObject* dbus_interface = NULL;
		SynapseSystemdObject* _tmp0_;
		SynapseSystemdObject* _tmp1_;
#line 425 "system-management.vala"
		_tmp0_ = (SynapseSystemdObject*) g_initable_new (SYNAPSE_TYPE_SYSTEMD_OBJECT_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_SYSTEMD_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_SYSTEMD_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.login1.Manager", NULL);
#line 425 "system-management.vala"
		dbus_interface = (SynapseSystemdObject*) _tmp0_;
#line 425 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 6490 "system-management.c"
			goto __catch0_g_error;
		}
#line 429 "system-management.vala"
		_tmp1_ = dbus_interface;
#line 429 "system-management.vala"
		synapse_systemd_object_reboot (_tmp1_, TRUE, &_inner_error0_);
#line 429 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 429 "system-management.vala"
			_g_object_unref0 (dbus_interface);
#line 6501 "system-management.c"
			goto __catch0_g_error;
		}
#line 430 "system-management.vala"
		_g_object_unref0 (dbus_interface);
#line 430 "system-management.vala"
		return;
#line 6508 "system-management.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
#line 423 "system-management.vala"
		err = _inner_error0_;
#line 423 "system-management.vala"
		_inner_error0_ = NULL;
#line 434 "system-management.vala"
		_tmp2_ = err;
#line 434 "system-management.vala"
		_tmp3_ = _tmp2_->message;
#line 434 "system-management.vala"
		g_warning ("system-management.vala:434: %s", _tmp3_);
#line 423 "system-management.vala"
		_g_error_free0 (err);
#line 6528 "system-management.c"
	}
	__finally0:
#line 423 "system-management.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 423 "system-management.vala"
		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);
#line 423 "system-management.vala"
		g_clear_error (&_inner_error0_);
#line 423 "system-management.vala"
		return;
#line 6539 "system-management.c"
	}
	{
		SynapseConsoleKitObject* dbus_interface = NULL;
		SynapseConsoleKitObject* _tmp4_;
		SynapseConsoleKitObject* _tmp5_;
#line 439 "system-management.vala"
		_tmp4_ = (SynapseConsoleKitObject*) g_initable_new (SYNAPSE_TYPE_CONSOLE_KIT_OBJECT_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", SYNAPSE_CONSOLE_KIT_OBJECT_UNIQUE_NAME, "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", SYNAPSE_CONSOLE_KIT_OBJECT_OBJECT_PATH, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
#line 439 "system-management.vala"
		dbus_interface = (SynapseConsoleKitObject*) _tmp4_;
#line 439 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 6551 "system-management.c"
			goto __catch1_g_error;
		}
#line 443 "system-management.vala"
		_tmp5_ = dbus_interface;
#line 443 "system-management.vala"
		synapse_console_kit_object_restart (_tmp5_, &_inner_error0_);
#line 443 "system-management.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 443 "system-management.vala"
			_g_object_unref0 (dbus_interface);
#line 6562 "system-management.c"
			goto __catch1_g_error;
		}
#line 437 "system-management.vala"
		_g_object_unref0 (dbus_interface);
#line 6567 "system-management.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* err = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
#line 437 "system-management.vala"
		err = _inner_error0_;
#line 437 "system-management.vala"
		_inner_error0_ = NULL;
#line 447 "system-management.vala"
		_tmp6_ = err;
#line 447 "system-management.vala"
		_tmp7_ = _tmp6_->message;
#line 447 "system-management.vala"
		g_warning ("system-management.vala:447: %s", _tmp7_);
#line 437 "system-management.vala"
		_g_error_free0 (err);
#line 6587 "system-management.c"
	}
	__finally1:
#line 437 "system-management.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 437 "system-management.vala"
		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);
#line 437 "system-management.vala"
		g_clear_error (&_inner_error0_);
#line 437 "system-management.vala"
		return;
#line 6598 "system-management.c"
	}
}

static GObject *
synapse_system_management_plugin_restart_action_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseSystemManagementPluginRestartAction * self;
#line 377 "system-management.vala"
	parent_class = G_OBJECT_CLASS (synapse_system_management_plugin_restart_action_parent_class);
#line 377 "system-management.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 377 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION, SynapseSystemManagementPluginRestartAction);
#line 379 "system-management.vala"
	synapse_system_management_plugin_restart_action_check_allowed (self, NULL, NULL);
#line 377 "system-management.vala"
	return obj;
#line 6620 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_class_init (SynapseSystemManagementPluginRestartActionClass * klass,
                                                            gpointer klass_data)
{
#line 368 "system-management.vala"
	synapse_system_management_plugin_restart_action_parent_class = g_type_class_peek_parent (klass);
#line 368 "system-management.vala"
	g_type_class_adjust_private_offset (klass, &SynapseSystemManagementPluginRestartAction_private_offset);
#line 368 "system-management.vala"
	((SynapseSystemManagementPluginSystemActionClass *) klass)->action_allowed = (gboolean (*) (SynapseSystemManagementPluginSystemAction*)) synapse_system_management_plugin_restart_action_real_action_allowed;
#line 368 "system-management.vala"
	((SynapseActionMatchClass *) klass)->do_action = (void (*) (SynapseActionMatch*)) synapse_system_management_plugin_restart_action_real_do_action;
#line 368 "system-management.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_system_management_plugin_restart_action_constructor;
#line 368 "system-management.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_system_management_plugin_restart_action_finalize;
#line 6639 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_instance_init (SynapseSystemManagementPluginRestartAction * self,
                                                               gpointer klass)
{
#line 368 "system-management.vala"
	self->priv = synapse_system_management_plugin_restart_action_get_instance_private (self);
#line 414 "system-management.vala"
	self->priv->allowed = FALSE;
#line 6650 "system-management.c"
}

static void
synapse_system_management_plugin_restart_action_finalize (GObject * obj)
{
	SynapseSystemManagementPluginRestartAction * self;
#line 368 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_RESTART_ACTION, SynapseSystemManagementPluginRestartAction);
#line 368 "system-management.vala"
	G_OBJECT_CLASS (synapse_system_management_plugin_restart_action_parent_class)->finalize (obj);
#line 6661 "system-management.c"
}

static GType
synapse_system_management_plugin_restart_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginRestartActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_restart_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPluginRestartAction), 0, (GInstanceInitFunc) synapse_system_management_plugin_restart_action_instance_init, NULL };
	GType synapse_system_management_plugin_restart_action_type_id;
	synapse_system_management_plugin_restart_action_type_id = g_type_register_static (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, "SynapseSystemManagementPluginRestartAction", &g_define_type_info, 0);
	SynapseSystemManagementPluginRestartAction_private_offset = g_type_add_instance_private (synapse_system_management_plugin_restart_action_type_id, sizeof (SynapseSystemManagementPluginRestartActionPrivate));
	return synapse_system_management_plugin_restart_action_type_id;
}

static GType
synapse_system_management_plugin_restart_action_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_restart_action_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_restart_action_type_id__once)) {
		GType synapse_system_management_plugin_restart_action_type_id;
		synapse_system_management_plugin_restart_action_type_id = synapse_system_management_plugin_restart_action_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_restart_action_type_id__once, synapse_system_management_plugin_restart_action_type_id);
	}
	return synapse_system_management_plugin_restart_action_type_id__once;
}

static GObject *
synapse_system_management_plugin_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseSystemManagementPlugin * self;
	GeeLinkedList* _tmp0_;
	GeeList* _tmp1_;
	SynapseSystemManagementPluginSuspendAction* _tmp2_;
	SynapseSystemManagementPluginSuspendAction* _tmp3_;
	GeeList* _tmp4_;
	SynapseSystemManagementPluginHibernateAction* _tmp5_;
	SynapseSystemManagementPluginHibernateAction* _tmp6_;
	GeeList* _tmp7_;
	SynapseSystemManagementPluginShutdownAction* _tmp8_;
	SynapseSystemManagementPluginShutdownAction* _tmp9_;
	GeeList* _tmp10_;
	SynapseSystemManagementPluginRestartAction* _tmp11_;
	SynapseSystemManagementPluginRestartAction* _tmp12_;
#line 473 "system-management.vala"
	parent_class = G_OBJECT_CLASS (synapse_system_management_plugin_parent_class);
#line 473 "system-management.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 473 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN, SynapseSystemManagementPlugin);
#line 475 "system-management.vala"
	_tmp0_ = gee_linked_list_new (SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_TYPE_SYSTEM_ACTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 475 "system-management.vala"
	_g_object_unref0 (self->priv->actions);
#line 475 "system-management.vala"
	self->priv->actions = (GeeList*) _tmp0_;
#line 476 "system-management.vala"
	_tmp1_ = self->priv->actions;
#line 476 "system-management.vala"
	_tmp2_ = synapse_system_management_plugin_suspend_action_new ();
#line 476 "system-management.vala"
	_tmp3_ = _tmp2_;
#line 476 "system-management.vala"
	gee_collection_add ((GeeCollection*) _tmp1_, (SynapseSystemManagementPluginSystemAction*) _tmp3_);
#line 476 "system-management.vala"
	_g_object_unref0 (_tmp3_);
#line 477 "system-management.vala"
	_tmp4_ = self->priv->actions;
#line 477 "system-management.vala"
	_tmp5_ = synapse_system_management_plugin_hibernate_action_new ();
#line 477 "system-management.vala"
	_tmp6_ = _tmp5_;
#line 477 "system-management.vala"
	gee_collection_add ((GeeCollection*) _tmp4_, (SynapseSystemManagementPluginSystemAction*) _tmp6_);
#line 477 "system-management.vala"
	_g_object_unref0 (_tmp6_);
#line 478 "system-management.vala"
	_tmp7_ = self->priv->actions;
#line 478 "system-management.vala"
	_tmp8_ = synapse_system_management_plugin_shutdown_action_new ();
#line 478 "system-management.vala"
	_tmp9_ = _tmp8_;
#line 478 "system-management.vala"
	gee_collection_add ((GeeCollection*) _tmp7_, (SynapseSystemManagementPluginSystemAction*) _tmp9_);
#line 478 "system-management.vala"
	_g_object_unref0 (_tmp9_);
#line 479 "system-management.vala"
	_tmp10_ = self->priv->actions;
#line 479 "system-management.vala"
	_tmp11_ = synapse_system_management_plugin_restart_action_new ();
#line 479 "system-management.vala"
	_tmp12_ = _tmp11_;
#line 479 "system-management.vala"
	gee_collection_add ((GeeCollection*) _tmp10_, (SynapseSystemManagementPluginSystemAction*) _tmp12_);
#line 479 "system-management.vala"
	_g_object_unref0 (_tmp12_);
#line 473 "system-management.vala"
	return obj;
#line 6761 "system-management.c"
}

static void
synapse_system_management_plugin_class_init (SynapseSystemManagementPluginClass * klass,
                                             gpointer klass_data)
{
#line 66 "system-management.vala"
	synapse_system_management_plugin_parent_class = g_type_class_peek_parent (klass);
#line 66 "system-management.vala"
	g_type_class_adjust_private_offset (klass, &SynapseSystemManagementPlugin_private_offset);
#line 66 "system-management.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_synapse_system_management_plugin_get_property;
#line 66 "system-management.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_synapse_system_management_plugin_set_property;
#line 66 "system-management.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_system_management_plugin_constructor;
#line 66 "system-management.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_system_management_plugin_finalize;
#line 66 "system-management.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY, synapse_system_management_plugin_properties[SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY] = g_param_spec_boolean ("enabled", "enabled", "enabled", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 468 "system-management.vala"
	synapse_system_management_plugin_register_plugin ();
#line 6784 "system-management.c"
}

static void
synapse_system_management_plugin_synapse_activatable_interface_init (SynapseActivatableIface * iface,
                                                                     gpointer iface_data)
{
#line 66 "system-management.vala"
	synapse_system_management_plugin_synapse_activatable_parent_iface = g_type_interface_peek_parent (iface);
#line 66 "system-management.vala"
	iface->activate = (void (*) (SynapseActivatable*)) synapse_system_management_plugin_real_activate;
#line 66 "system-management.vala"
	iface->deactivate = (void (*) (SynapseActivatable*)) synapse_system_management_plugin_real_deactivate;
#line 66 "system-management.vala"
	iface->get_enabled = synapse_system_management_plugin_real_get_enabled;
#line 66 "system-management.vala"
	iface->set_enabled = synapse_system_management_plugin_real_set_enabled;
#line 6801 "system-management.c"
}

static void
synapse_system_management_plugin_synapse_item_provider_interface_init (SynapseItemProviderIface * iface,
                                                                       gpointer iface_data)
{
#line 66 "system-management.vala"
	synapse_system_management_plugin_synapse_item_provider_parent_iface = g_type_interface_peek_parent (iface);
#line 66 "system-management.vala"
	iface->search = (void (*) (SynapseItemProvider*, SynapseQuery*, GAsyncReadyCallback, gpointer)) synapse_system_management_plugin_real_search;
#line 66 "system-management.vala"
	iface->search_finish = (SynapseResultSet* (*) (SynapseItemProvider*, GAsyncResult*, GError**)) synapse_system_management_plugin_search_finish;
#line 6814 "system-management.c"
}

static void
synapse_system_management_plugin_instance_init (SynapseSystemManagementPlugin * self,
                                                gpointer klass)
{
#line 66 "system-management.vala"
	self->priv = synapse_system_management_plugin_get_instance_private (self);
#line 68 "system-management.vala"
	self->priv->_enabled = TRUE;
#line 6825 "system-management.c"
}

static void
synapse_system_management_plugin_finalize (GObject * obj)
{
	SynapseSystemManagementPlugin * self;
#line 66 "system-management.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN, SynapseSystemManagementPlugin);
#line 471 "system-management.vala"
	_g_object_unref0 (self->priv->actions);
#line 66 "system-management.vala"
	G_OBJECT_CLASS (synapse_system_management_plugin_parent_class)->finalize (obj);
#line 6838 "system-management.c"
}

static GType
synapse_system_management_plugin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseSystemManagementPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_system_management_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseSystemManagementPlugin), 0, (GInstanceInitFunc) synapse_system_management_plugin_instance_init, NULL };
	static const GInterfaceInfo synapse_activatable_info = { (GInterfaceInitFunc) synapse_system_management_plugin_synapse_activatable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo synapse_item_provider_info = { (GInterfaceInitFunc) synapse_system_management_plugin_synapse_item_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType synapse_system_management_plugin_type_id;
	synapse_system_management_plugin_type_id = g_type_register_static (G_TYPE_OBJECT, "SynapseSystemManagementPlugin", &g_define_type_info, 0);
	g_type_add_interface_static (synapse_system_management_plugin_type_id, SYNAPSE_TYPE_ACTIVATABLE, &synapse_activatable_info);
	g_type_add_interface_static (synapse_system_management_plugin_type_id, SYNAPSE_TYPE_ITEM_PROVIDER, &synapse_item_provider_info);
	SynapseSystemManagementPlugin_private_offset = g_type_add_instance_private (synapse_system_management_plugin_type_id, sizeof (SynapseSystemManagementPluginPrivate));
	return synapse_system_management_plugin_type_id;
}

GType
synapse_system_management_plugin_get_type (void)
{
	static volatile gsize synapse_system_management_plugin_type_id__once = 0;
	if (g_once_init_enter (&synapse_system_management_plugin_type_id__once)) {
		GType synapse_system_management_plugin_type_id;
		synapse_system_management_plugin_type_id = synapse_system_management_plugin_get_type_once ();
		g_once_init_leave (&synapse_system_management_plugin_type_id__once, synapse_system_management_plugin_type_id);
	}
	return synapse_system_management_plugin_type_id__once;
}

static void
_vala_synapse_system_management_plugin_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	SynapseSystemManagementPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN, SynapseSystemManagementPlugin);
#line 66 "system-management.vala"
	switch (property_id) {
#line 66 "system-management.vala"
		case SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY:
#line 66 "system-management.vala"
		g_value_set_boolean (value, synapse_activatable_get_enabled ((SynapseActivatable*) self));
#line 66 "system-management.vala"
		break;
#line 6883 "system-management.c"
		default:
#line 66 "system-management.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 66 "system-management.vala"
		break;
#line 6889 "system-management.c"
	}
}

static void
_vala_synapse_system_management_plugin_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	SynapseSystemManagementPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_TYPE_SYSTEM_MANAGEMENT_PLUGIN, SynapseSystemManagementPlugin);
#line 66 "system-management.vala"
	switch (property_id) {
#line 66 "system-management.vala"
		case SYNAPSE_SYSTEM_MANAGEMENT_PLUGIN_ENABLED_PROPERTY:
#line 66 "system-management.vala"
		synapse_activatable_set_enabled ((SynapseActivatable*) self, g_value_get_boolean (value));
#line 66 "system-management.vala"
		break;
#line 6909 "system-management.c"
		default:
#line 66 "system-management.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 66 "system-management.vala"
		break;
#line 6915 "system-management.c"
	}
}

