/* ovirt-machine.c generated by valac 0.25.1.6-a1f05, the Vala compiler
 * generated from ovirt-machine.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <govirt/govirt.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>


#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;

#define BOXES_TYPE_IPROPERTIES_PROVIDER (boxes_iproperties_provider_get_type ())
#define BOXES_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProvider))
#define BOXES_IS_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER))
#define BOXES_IPROPERTIES_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProviderIface))

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

#define TYPE_PROPERTY_CREATION_FLAG (property_creation_flag_get_type ())

#define BOXES_TYPE_PROPERTY (boxes_property_get_type ())
#define BOXES_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTY, BoxesProperty))
#define BOXES_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTY, BoxesPropertyClass))
#define BOXES_IS_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTY))
#define BOXES_IS_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTY))
#define BOXES_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTY, BoxesPropertyClass))

typedef struct _BoxesProperty BoxesProperty;
typedef struct _BoxesPropertyClass BoxesPropertyClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_MACHINE_TYPE_CONNECT_FLAGS (boxes_machine_connect_flags_get_type ())

#define BOXES_TYPE_OVIRT_MACHINE (boxes_ovirt_machine_get_type ())
#define BOXES_OVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachine))
#define BOXES_OVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachineClass))
#define BOXES_IS_OVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_OVIRT_MACHINE))
#define BOXES_IS_OVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_OVIRT_MACHINE))
#define BOXES_OVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachineClass))

typedef struct _BoxesOvirtMachine BoxesOvirtMachine;
typedef struct _BoxesOvirtMachineClass BoxesOvirtMachineClass;
typedef struct _BoxesOvirtMachinePrivate BoxesOvirtMachinePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_DISPLAY (boxes_display_get_type ())
#define BOXES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY, BoxesDisplay))
#define BOXES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY, BoxesDisplayClass))
#define BOXES_IS_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY))
#define BOXES_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY))
#define BOXES_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY, BoxesDisplayClass))

typedef struct _BoxesDisplay BoxesDisplay;
typedef struct _BoxesDisplayClass BoxesDisplayClass;

#define BOXES_MACHINE_TYPE_MACHINE_STATE (boxes_machine_machine_state_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesOvirtMachineConnectDisplayData BoxesOvirtMachineConnectDisplayData;

#define BOXES_TYPE_STRING_PROPERTY (boxes_string_property_get_type ())
#define BOXES_STRING_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_STRING_PROPERTY, BoxesStringProperty))
#define BOXES_STRING_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_STRING_PROPERTY, BoxesStringPropertyClass))
#define BOXES_IS_STRING_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_STRING_PROPERTY))
#define BOXES_IS_STRING_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_STRING_PROPERTY))
#define BOXES_STRING_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_STRING_PROPERTY, BoxesStringPropertyClass))

typedef struct _BoxesStringProperty BoxesStringProperty;
typedef struct _BoxesStringPropertyClass BoxesStringPropertyClass;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define BOXES_TYPE_SPICE_DISPLAY (boxes_spice_display_get_type ())
#define BOXES_SPICE_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplay))
#define BOXES_SPICE_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplayClass))
#define BOXES_IS_SPICE_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SPICE_DISPLAY))
#define BOXES_IS_SPICE_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SPICE_DISPLAY))
#define BOXES_SPICE_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SPICE_DISPLAY, BoxesSpiceDisplayClass))

typedef struct _BoxesSpiceDisplay BoxesSpiceDisplay;
typedef struct _BoxesSpiceDisplayClass BoxesSpiceDisplayClass;
#define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL)))

#define BOXES_TYPE_VNC_DISPLAY (boxes_vnc_display_get_type ())
#define BOXES_VNC_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplay))
#define BOXES_VNC_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplayClass))
#define BOXES_IS_VNC_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VNC_DISPLAY))
#define BOXES_IS_VNC_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VNC_DISPLAY))
#define BOXES_VNC_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VNC_DISPLAY, BoxesVncDisplayClass))

typedef struct _BoxesVncDisplay BoxesVncDisplay;
typedef struct _BoxesVncDisplayClass BoxesVncDisplayClass;

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

struct _BoxesCollectionItem {
	GObject parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	GObjectClass parent_class;
	gint (*compare) (BoxesCollectionItem* self, BoxesCollectionItem* other);
};

typedef enum  {
	BOXES_PROPERTIES_PAGE_LOGIN,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DISPLAY,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

typedef enum  {
	PROPERTY_CREATION_FLAG_NONE = 1 << 0,
	PROPERTY_CREATION_FLAG_NO_USB = 1 << 1
} PropertyCreationFlag;

struct _BoxesIPropertiesProviderIface {
	GTypeInterface parent_iface;
	GList* (*get_properties) (BoxesIPropertiesProvider* self, BoxesPropertiesPage page, PropertyCreationFlag* flags);
};

typedef enum  {
	BOXES_MACHINE_CONNECT_FLAGS_NONE = 0,
	BOXES_MACHINE_CONNECT_FLAGS_IGNORE_SAVED_STATE = 1 << 0
} BoxesMachineConnectFlags;

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesCollectionSource* source;
	BoxesBoxConfig* config;
	gboolean stay_on_display;
	gboolean suspend_at_exit;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	void (*save_real) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*save_real_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GdkPixbuf* (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page, PropertyCreationFlag* flags);
	void (*connect_display) (BoxesMachine* self, BoxesMachineConnectFlags flags, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connect_display_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*restart) (BoxesMachine* self);
	void (*disconnect_display) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
};

struct _BoxesOvirtMachine {
	BoxesMachine parent_instance;
	BoxesOvirtMachinePrivate * priv;
};

struct _BoxesOvirtMachineClass {
	BoxesMachineClass parent_class;
};

struct _BoxesOvirtMachinePrivate {
	OvirtVm* vm;
	OvirtProxy* proxy;
};

typedef enum  {
	BOXES_MACHINE_MACHINE_STATE_UNKNOWN,
	BOXES_MACHINE_MACHINE_STATE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_FORCE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_RUNNING,
	BOXES_MACHINE_MACHINE_STATE_PAUSED,
	BOXES_MACHINE_MACHINE_STATE_SAVED,
	BOXES_MACHINE_MACHINE_STATE_SLEEPING
} BoxesMachineMachineState;

struct _BoxesOvirtMachineConnectDisplayData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesOvirtMachine* self;
	BoxesMachineConnectFlags flags;
	BoxesDisplay* _tmp0_;
	BoxesDisplay* _tmp1_;
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
	BoxesMachineMachineState _tmp4_;
	BoxesMachineMachineState _tmp5_;
	OvirtVm* _tmp6_;
	OvirtProxy* _tmp7_;
	GCancellable* _tmp8_;
	GCancellable* _tmp9_;
	GError* _error_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	GError* _vala1__error_;
	OvirtVm* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GError* _tmp16_;
	const gchar* _tmp17_;
	GError* _tmp18_;
	GError* _tmp19_;
	BoxesMachineMachineState _tmp20_;
	BoxesMachineMachineState _tmp21_;
	OvirtVm* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	BoxesDisplay* _tmp28_;
	BoxesDisplay* _tmp29_;
	OvirtVm* _tmp30_;
	OvirtVmDisplay* _tmp31_;
	OvirtVmDisplay* _tmp32_;
	OvirtVmDisplay* _tmp33_;
	OvirtVmDisplayType _tmp34_;
	OvirtVmDisplayType _tmp35_;
	gboolean _tmp36_;
	OvirtVm* _tmp37_;
	OvirtProxy* _tmp38_;
	GCancellable* _tmp39_;
	GCancellable* _tmp40_;
	BoxesDisplay* _tmp41_;
	BoxesDisplay* _tmp42_;
	OvirtVm* _tmp43_;
	OvirtVmDisplay* _tmp44_;
	OvirtVmDisplay* _tmp45_;
	OvirtVmDisplay* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	BoxesDisplay* _tmp50_;
	BoxesDisplay* _tmp51_;
	GError* _vala2__error_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	GError* e;
	GError* _tmp54_;
	const gchar* _tmp55_;
	GError* _tmp56_;
	GError * _inner_error_;
};


static gpointer boxes_ovirt_machine_parent_class = NULL;

GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
GType property_creation_flag_get_type (void) G_GNUC_CONST;
GType boxes_property_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_machine_connect_flags_get_type (void) G_GNUC_CONST;
GType boxes_ovirt_machine_get_type (void) G_GNUC_CONST;
#define BOXES_OVIRT_MACHINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachinePrivate))
enum  {
	BOXES_OVIRT_MACHINE_DUMMY_PROPERTY
};
BoxesOvirtMachine* boxes_ovirt_machine_new (BoxesCollectionSource* source, OvirtProxy* proxy, OvirtVm* vm, GError** error);
BoxesOvirtMachine* boxes_ovirt_machine_construct (GType object_type, BoxesCollectionSource* source, OvirtProxy* proxy, OvirtVm* vm, GError** error);
BoxesMachine* boxes_machine_construct (GType object_type, BoxesCollectionSource* source, const gchar* name);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
void boxes_machine_create_display_config (BoxesMachine* self, const gchar* uuid);
static void boxes_ovirt_machine_update_state (BoxesOvirtMachine* self);
void boxes_machine_load_screenshot (BoxesMachine* self);
void boxes_machine_set_screenshot_enable (BoxesMachine* self, gboolean enable);
static void boxes_ovirt_machine_real_connect_display_data_free (gpointer _data);
static void boxes_ovirt_machine_real_connect_display (BoxesMachine* base, BoxesMachineConnectFlags flags, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_ovirt_machine_real_connect_display_co (BoxesOvirtMachineConnectDisplayData* _data_);
GType boxes_display_get_type (void) G_GNUC_CONST;
BoxesDisplay* boxes_machine_get_display (BoxesMachine* self);
GCancellable* boxes_machine_get_connecting_cancellable (BoxesMachine* self);
GType boxes_machine_machine_state_get_type (void) G_GNUC_CONST;
BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self);
static void boxes_ovirt_machine_connect_display_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static BoxesDisplay* boxes_ovirt_machine_create_display_connection (BoxesOvirtMachine* self, GError** error);
void boxes_machine_set_display (BoxesMachine* self, BoxesDisplay* value);
void boxes_display_set_password (BoxesDisplay* self, const gchar* value);
void boxes_display_connect_it (BoxesDisplay* self, GError** error);
static GList* boxes_ovirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page, PropertyCreationFlag* flags);
GType boxes_string_property_get_type (void) G_GNUC_CONST;
BoxesStringProperty* boxes_iproperties_provider_add_string_property (BoxesIPropertiesProvider* self, GList** list, const gchar* name, const gchar* value);
gchar* boxes_display_get_uri (BoxesDisplay* self);
const gchar* boxes_display_get_protocol (BoxesDisplay* self);
GList* boxes_display_get_properties (BoxesDisplay* self, BoxesPropertiesPage page, PropertyCreationFlag* flags);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_ovirt_machine_real_restart (BoxesMachine* base);
GType boxes_spice_display_get_type (void) G_GNUC_CONST;
BoxesSpiceDisplay* boxes_spice_display_new (BoxesMachine* machine, BoxesBoxConfig* config, const gchar* host, gint port, gint tls_port, const gchar* host_subject);
BoxesSpiceDisplay* boxes_spice_display_construct (GType object_type, BoxesMachine* machine, BoxesBoxConfig* config, const gchar* host, gint port, gint tls_port, const gchar* host_subject);
void boxes_spice_display_set_ca_cert (BoxesSpiceDisplay* self, GByteArray* value);
BoxesVncDisplay* boxes_vnc_display_new (BoxesBoxConfig* config, const gchar* host, gint port);
BoxesVncDisplay* boxes_vnc_display_construct (GType object_type, BoxesBoxConfig* config, const gchar* host, gint port);
GType boxes_vnc_display_get_type (void) G_GNUC_CONST;
void boxes_machine_set_state (BoxesMachine* self, BoxesMachineMachineState value);
static void boxes_ovirt_machine_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	return self ? g_object_ref (self) : NULL;
#line 363 "ovirt-machine.c"
}


BoxesOvirtMachine* boxes_ovirt_machine_construct (GType object_type, BoxesCollectionSource* source, OvirtProxy* proxy, OvirtVm* vm, GError** error) {
	BoxesOvirtMachine * self = NULL;
	BoxesCollectionSource* _tmp0_ = NULL;
	OvirtVm* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	OvirtVm* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	OvirtProxy* _tmp13_ = NULL;
	OvirtProxy* _tmp14_ = NULL;
	OvirtVm* _tmp15_ = NULL;
	OvirtVm* _tmp16_ = NULL;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (proxy != NULL, NULL);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (vm != NULL, NULL);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = source;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = vm;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get ((OvirtResource*) _tmp1_, "name", &_tmp2_, NULL);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp3_ = _tmp2_;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp4_ = _tmp3_;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) boxes_machine_construct (object_type, _tmp0_, _tmp4_);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp4_);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp5_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp6_ = _tmp5_;
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp7_ = g_strconcat ("new ovirt machine: ", _tmp6_, NULL);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp8_ = _tmp7_;
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_debug ("ovirt-machine.vala:14: %s", _tmp8_);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp8_);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp9_ = vm;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get ((OvirtResource*) _tmp9_, "guid", &_tmp10_, NULL);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp11_ = _tmp10_;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp12_ = _tmp11_;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_create_display_config ((BoxesMachine*) self, _tmp12_);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp12_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp13_ = proxy;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp14_ = _g_object_ref0 (_tmp13_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->proxy);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self->priv->proxy = _tmp14_;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp15_ = vm;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp16_ = _g_object_ref0 (_tmp15_);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->vm);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self->priv->vm = _tmp16_;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_update_state (self);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_load_screenshot ((BoxesMachine*) self);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_set_screenshot_enable ((BoxesMachine*) self, TRUE);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	return self;
#line 454 "ovirt-machine.c"
}


BoxesOvirtMachine* boxes_ovirt_machine_new (BoxesCollectionSource* source, OvirtProxy* proxy, OvirtVm* vm, GError** error) {
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	return boxes_ovirt_machine_construct (BOXES_TYPE_OVIRT_MACHINE, source, proxy, vm, error);
#line 461 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_connect_display_data_free (gpointer _data) {
	BoxesOvirtMachineConnectDisplayData* _data_;
	_data_ = _data;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_slice_free (BoxesOvirtMachineConnectDisplayData, _data_);
#line 472 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_connect_display (BoxesMachine* base, BoxesMachineConnectFlags flags, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOvirtMachine * self;
	BoxesOvirtMachineConnectDisplayData* _data_;
	BoxesOvirtMachine* _tmp0_ = NULL;
	BoxesMachineConnectFlags _tmp1_ = 0;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_slice_new0 (BoxesOvirtMachineConnectDisplayData);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_ovirt_machine_real_connect_display);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_ovirt_machine_real_connect_display_data_free);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->self = _tmp0_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = flags;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->flags = _tmp1_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_real_connect_display_co (_data_);
#line 499 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_connect_display_finish (BoxesMachine* base, GAsyncResult* _res_, GError** error) {
	BoxesOvirtMachineConnectDisplayData* _data_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		return;
#line 509 "ovirt-machine.c"
	}
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 513 "ovirt-machine.c"
}


static void boxes_ovirt_machine_connect_display_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOvirtMachineConnectDisplayData* _data_;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_ = _user_data_;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_source_object_ = source_object;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_res_ = _res_;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_real_connect_display_co (_data_);
#line 527 "ovirt-machine.c"
}


static gboolean boxes_ovirt_machine_real_connect_display_co (BoxesOvirtMachineConnectDisplayData* _data_) {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	switch (_data_->_state_) {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case 0:
#line 536 "ovirt-machine.c"
		goto _state_0;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case 1:
#line 540 "ovirt-machine.c"
		goto _state_1;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case 2:
#line 544 "ovirt-machine.c"
		goto _state_2;
		default:
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_assert_not_reached ();
#line 549 "ovirt-machine.c"
	}
	_state_0:
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp0_ = NULL;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp0_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp1_ = NULL;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp1_ != NULL) {
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_state_ == 0) {
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 566 "ovirt-machine.c"
		} else {
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 570 "ovirt-machine.c"
		}
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 576 "ovirt-machine.c"
	}
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp2_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp2_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp3_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_cancellable_reset (_data_->_tmp3_);
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp4_ = 0;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp4_ = boxes_machine_get_state ((BoxesMachine*) _data_->self);
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp5_ = 0;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp5_ == BOXES_MACHINE_MACHINE_STATE_STOPPED) {
#line 598 "ovirt-machine.c"
		{
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp6_ = NULL;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp6_ = _data_->self->priv->vm;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp7_ = NULL;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp7_ = _data_->self->priv->proxy;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp8_ = NULL;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp8_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp9_ = NULL;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp9_ = _data_->_tmp8_;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_state_ = 1;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_start_async (_data_->_tmp6_, _data_->_tmp7_, _data_->_tmp9_, boxes_ovirt_machine_connect_display_ready, _data_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 622 "ovirt-machine.c"
			_state_1:
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_start_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
				if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 630 "ovirt-machine.c"
					goto __catch128_g_io_error_cancelled;
				}
				goto __catch128_g_error;
			}
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_ovirt_machine_update_state (_data_->self);
#line 637 "ovirt-machine.c"
		}
		goto __finally128;
		__catch128_g_io_error_cancelled:
		{
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_error_ = _data_->_inner_error_;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp10_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp10_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp11_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp11_ = _data_->_tmp10_;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_debug ("ovirt-machine.vala:36: connection to %s was cancelled", _data_->_tmp11_);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_error_free0 (_data_->_error_);
#line 658 "ovirt-machine.c"
		}
		goto __finally128;
		__catch128_g_error:
		{
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp12_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp12_ = _data_->self->priv->vm;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp13_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get ((OvirtResource*) _data_->_tmp12_, "name", &_data_->_tmp13_, NULL);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp14_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp14_ = _data_->_tmp13_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp15_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp15_ = _data_->_tmp14_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp16_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp16_ = _data_->_vala1__error_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp17_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp17_ = _data_->_tmp16_->message;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp18_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp18_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Couldn't start oVirt VM '%s': %s", _data_->_tmp15_, _data_->_tmp17_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp19_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp19_ = _data_->_tmp18_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_data_->_tmp15_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = _data_->_tmp19_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 705 "ovirt-machine.c"
			goto __finally128;
		}
		__finally128:
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_error_free (_data_->_inner_error_);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			if (_data_->_state_ == 0) {
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 719 "ovirt-machine.c"
			} else {
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 723 "ovirt-machine.c"
			}
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_unref (_data_->_async_result);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 729 "ovirt-machine.c"
		}
	}
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp20_ = 0;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp20_ = boxes_machine_get_state ((BoxesMachine*) _data_->self);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp21_ = 0;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp21_ = _data_->_tmp20_;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp21_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp22_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp22_ = _data_->self->priv->vm;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp23_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get ((OvirtResource*) _data_->_tmp22_, "name", &_data_->_tmp23_, NULL);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp24_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp24_ = _data_->_tmp23_;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp25_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp25_ = _data_->_tmp24_;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp26_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp26_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "oVirt VM '%s' is not RUNNING", _data_->_tmp25_);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp27_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp27_ = _data_->_tmp26_;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_free0 (_data_->_tmp25_);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = _data_->_tmp27_;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_error_free (_data_->_inner_error_);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_state_ == 0) {
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 778 "ovirt-machine.c"
		} else {
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 782 "ovirt-machine.c"
		}
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 788 "ovirt-machine.c"
	}
	{
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp29_ = NULL;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp29_ = boxes_ovirt_machine_create_display_connection (_data_->self, &_data_->_inner_error_);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp28_ = _data_->_tmp29_;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 801 "ovirt-machine.c"
				goto __catch129_g_io_error_cancelled;
			}
			goto __catch129_g_error;
		}
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		boxes_machine_set_display ((BoxesMachine*) _data_->self, _data_->_tmp28_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp30_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp30_ = _data_->self->priv->vm;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp31_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_data_->_tmp30_, "display", &_data_->_tmp31_, NULL);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp32_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp32_ = _data_->_tmp31_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp33_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp33_ = _data_->_tmp32_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp34_ = 0;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_data_->_tmp33_, "type", &_data_->_tmp34_, NULL);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp35_ = 0;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp35_ = _data_->_tmp34_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp36_ = FALSE;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp36_ = _data_->_tmp35_ == OVIRT_VM_DISPLAY_SPICE;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_object_unref0 (_data_->_tmp33_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_tmp36_) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp37_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp37_ = _data_->self->priv->vm;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp38_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp38_ = _data_->self->priv->proxy;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp39_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp39_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp40_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp40_ = _data_->_tmp39_;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_state_ = 2;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_get_ticket_async (_data_->_tmp37_, _data_->_tmp38_, _data_->_tmp40_, boxes_ovirt_machine_connect_display_ready, _data_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 862 "ovirt-machine.c"
			_state_2:
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_get_ticket_finish (_data_->_tmp37_, _data_->_res_, &_data_->_inner_error_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
				_g_object_unref0 (_data_->_tmp28_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
				if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 872 "ovirt-machine.c"
					goto __catch129_g_io_error_cancelled;
				}
				goto __catch129_g_error;
			}
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp41_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp41_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp42_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp42_ = _data_->_tmp41_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp43_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp43_ = _data_->self->priv->vm;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp44_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_data_->_tmp43_, "display", &_data_->_tmp44_, NULL);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp45_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp45_ = _data_->_tmp44_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp46_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp46_ = _data_->_tmp45_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp47_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_data_->_tmp46_, "ticket", &_data_->_tmp47_, NULL);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp48_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp48_ = _data_->_tmp47_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp49_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp49_ = _data_->_tmp48_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_display_set_password (_data_->_tmp42_, _data_->_tmp49_);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_data_->_tmp49_);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_data_->_tmp46_);
#line 919 "ovirt-machine.c"
		}
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp50_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp50_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp51_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp51_ = _data_->_tmp50_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		boxes_display_connect_it (_data_->_tmp51_, &_data_->_inner_error_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_data_->_tmp28_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 937 "ovirt-machine.c"
				goto __catch129_g_io_error_cancelled;
			}
			goto __catch129_g_error;
		}
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_object_unref0 (_data_->_tmp28_);
#line 944 "ovirt-machine.c"
	}
	goto __finally129;
	__catch129_g_io_error_cancelled:
	{
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_vala2__error_ = _data_->_inner_error_;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = NULL;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp52_ = NULL;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp52_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp53_ = NULL;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp53_ = _data_->_tmp52_;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_debug ("ovirt-machine.vala:53: connection to %s was cancelled", _data_->_tmp53_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_error_free0 (_data_->_vala2__error_);
#line 965 "ovirt-machine.c"
	}
	goto __finally129;
	__catch129_g_error:
	{
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->e = _data_->_inner_error_;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp54_ = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp54_ = _data_->e;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp55_ = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp55_ = _data_->_tmp54_->message;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp56_ = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp56_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Error opening display: %s", _data_->_tmp55_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = _data_->_tmp56_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_error_free0 (_data_->e);
#line 990 "ovirt-machine.c"
		goto __finally129;
	}
	__finally129:
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_error_free (_data_->_inner_error_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_state_ == 0) {
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1004 "ovirt-machine.c"
		} else {
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1008 "ovirt-machine.c"
		}
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 1014 "ovirt-machine.c"
	}
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_state_ == 0) {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1020 "ovirt-machine.c"
	} else {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1024 "ovirt-machine.c"
	}
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_unref (_data_->_async_result);
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	return FALSE;
#line 1030 "ovirt-machine.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1037 "ovirt-machine.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_list_free (self);
#line 1046 "ovirt-machine.c"
}


static GList* boxes_ovirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page, PropertyCreationFlag* flags) {
	BoxesOvirtMachine * self;
	GList* result = NULL;
	GList* list = NULL;
	BoxesPropertiesPage _tmp0_ = 0;
	BoxesDisplay* _tmp23_ = NULL;
	BoxesDisplay* _tmp24_ = NULL;
	BoxesPropertiesPage _tmp25_ = 0;
	GList* _tmp26_ = NULL;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	list = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = page;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	switch (_tmp0_) {
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case BOXES_PROPERTIES_PAGE_LOGIN:
#line 1069 "ovirt-machine.c"
		{
			const gchar* _tmp1_ = NULL;
			BoxesCollectionSource* _tmp2_ = NULL;
			gchar* _tmp3_ = NULL;
			gchar* _tmp4_ = NULL;
			gchar* _tmp5_ = NULL;
			BoxesStringProperty* _tmp6_ = NULL;
			BoxesStringProperty* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
			BoxesDisplay* _tmp9_ = NULL;
			BoxesDisplay* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			BoxesStringProperty* _tmp14_ = NULL;
			BoxesStringProperty* _tmp15_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp1_ = _ ("Virtualizer");
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp2_ = ((BoxesMachine*) self)->source;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp3_ = boxes_collection_source_get_uri (_tmp2_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp4_ = _tmp3_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp5_ = _tmp4_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp6_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp1_, _tmp5_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp7_ = _tmp6_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp7_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp5_);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp8_ = _ ("URI");
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp9_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp10_ = _tmp9_;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp11_ = boxes_display_get_uri (_tmp10_);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp12_ = _tmp11_;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp13_ = _tmp12_;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp14_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp8_, _tmp13_);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp15_ = _tmp14_;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp15_);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp13_);
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1126 "ovirt-machine.c"
		}
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case BOXES_PROPERTIES_PAGE_DISPLAY:
#line 1130 "ovirt-machine.c"
		{
			const gchar* _tmp16_ = NULL;
			BoxesDisplay* _tmp17_ = NULL;
			BoxesDisplay* _tmp18_ = NULL;
			const gchar* _tmp19_ = NULL;
			const gchar* _tmp20_ = NULL;
			BoxesStringProperty* _tmp21_ = NULL;
			BoxesStringProperty* _tmp22_ = NULL;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp16_ = _ ("Protocol");
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp17_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp18_ = _tmp17_;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp19_ = boxes_display_get_protocol (_tmp18_);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp20_ = _tmp19_;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp21_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _tmp16_, _tmp20_);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp22_ = _tmp21_;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp22_);
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1157 "ovirt-machine.c"
		}
		default:
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		break;
#line 1162 "ovirt-machine.c"
	}
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp23_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp24_ = _tmp23_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp25_ = page;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp26_ = boxes_display_get_properties (_tmp24_, _tmp25_, flags);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	list = g_list_concat (list, _tmp26_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	result = list;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	return result;
#line 1178 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_restart (BoxesMachine* base) {
	BoxesOvirtMachine * self;
#line 78 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 1186 "ovirt-machine.c"
}


static BoxesDisplay* boxes_ovirt_machine_create_display_connection (BoxesOvirtMachine* self, GError** error) {
	BoxesDisplay* result = NULL;
	gboolean _tmp0_ = FALSE;
	OvirtVm* _tmp1_ = NULL;
	OvirtVmDisplay* _tmp2_ = NULL;
	OvirtVmDisplay* _tmp3_ = NULL;
	OvirtVmDisplay* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	OvirtVm* _tmp22_ = NULL;
	OvirtVmDisplay* _tmp23_ = NULL;
	OvirtVmDisplay* _tmp24_ = NULL;
	OvirtVmDisplay* _tmp25_ = NULL;
	OvirtVmDisplayType _tmp26_ = 0;
	OvirtVmDisplayType _tmp27_ = 0;
	OvirtVmDisplayType _tmp28_ = 0;
	GError * _inner_error_ = NULL;
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = self->priv->vm;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp1_, "display", &_tmp2_, NULL);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp3_ = _tmp2_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp4_ = _tmp3_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp4_, "address", &_tmp5_, NULL);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp6_ = _tmp5_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp7_ = _tmp6_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp8_ = _tmp7_ == NULL;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp7_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (_tmp4_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_tmp8_) {
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp0_ = TRUE;
#line 1235 "ovirt-machine.c"
	} else {
		OvirtVm* _tmp9_ = NULL;
		OvirtVmDisplay* _tmp10_ = NULL;
		OvirtVmDisplay* _tmp11_ = NULL;
		OvirtVmDisplay* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp9_ = self->priv->vm;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_tmp9_, "display", &_tmp10_, NULL);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp11_ = _tmp10_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp12_ = _tmp11_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_tmp12_, "address", &_tmp13_, NULL);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp14_ = _tmp13_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp15_ = _tmp14_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp0_ = g_strcmp0 (_tmp15_, "") == 0;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_free0 (_tmp15_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_object_unref0 (_tmp12_);
#line 1264 "ovirt-machine.c"
	}
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	if (_tmp0_) {
#line 1268 "ovirt-machine.c"
		OvirtVm* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		GError* _tmp20_ = NULL;
		GError* _tmp21_ = NULL;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp16_ = self->priv->vm;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_object_get ((OvirtResource*) _tmp16_, "name", &_tmp17_, NULL);
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp18_ = _tmp17_;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp19_ = _tmp18_;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp20_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "empty display address for %s", _tmp19_);
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_tmp21_ = _tmp20_;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_g_free0 (_tmp19_);
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		_inner_error_ = _tmp21_;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		g_propagate_error (error, _inner_error_);
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		return NULL;
#line 1295 "ovirt-machine.c"
	}
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp22_ = self->priv->vm;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp22_, "display", &_tmp23_, NULL);
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp24_ = _tmp23_;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp25_ = _tmp24_;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp25_, "type", &_tmp26_, NULL);
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp27_ = _tmp26_;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp28_ = _tmp27_;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (_tmp25_);
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	switch (_tmp28_) {
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_DISPLAY_SPICE:
#line 1317 "ovirt-machine.c"
		{
			BoxesSpiceDisplay* display = NULL;
			BoxesBoxConfig* _tmp29_ = NULL;
			OvirtVm* _tmp30_ = NULL;
			OvirtVmDisplay* _tmp31_ = NULL;
			OvirtVmDisplay* _tmp32_ = NULL;
			OvirtVmDisplay* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
			gchar* _tmp35_ = NULL;
			gchar* _tmp36_ = NULL;
			OvirtVm* _tmp37_ = NULL;
			OvirtVmDisplay* _tmp38_ = NULL;
			OvirtVmDisplay* _tmp39_ = NULL;
			OvirtVmDisplay* _tmp40_ = NULL;
			guint _tmp41_ = 0U;
			guint _tmp42_ = 0U;
			OvirtVm* _tmp43_ = NULL;
			OvirtVmDisplay* _tmp44_ = NULL;
			OvirtVmDisplay* _tmp45_ = NULL;
			OvirtVmDisplay* _tmp46_ = NULL;
			guint _tmp47_ = 0U;
			guint _tmp48_ = 0U;
			OvirtVm* _tmp49_ = NULL;
			OvirtVmDisplay* _tmp50_ = NULL;
			OvirtVmDisplay* _tmp51_ = NULL;
			OvirtVmDisplay* _tmp52_ = NULL;
			gchar* _tmp53_ = NULL;
			gchar* _tmp54_ = NULL;
			gchar* _tmp55_ = NULL;
			BoxesSpiceDisplay* _tmp56_ = NULL;
			BoxesSpiceDisplay* _tmp57_ = NULL;
			BoxesSpiceDisplay* _tmp58_ = NULL;
			OvirtProxy* _tmp59_ = NULL;
			GByteArray* _tmp60_ = NULL;
			GByteArray* _tmp61_ = NULL;
			GByteArray* _tmp62_ = NULL;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp29_ = ((BoxesMachine*) self)->config;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp30_ = self->priv->vm;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp30_, "display", &_tmp31_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp32_ = _tmp31_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp33_ = _tmp32_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp33_, "address", &_tmp34_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp35_ = _tmp34_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp36_ = _tmp35_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp37_ = self->priv->vm;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp37_, "display", &_tmp38_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp39_ = _tmp38_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp40_ = _tmp39_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp40_, "port", &_tmp41_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp42_ = _tmp41_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp43_ = self->priv->vm;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp43_, "display", &_tmp44_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp45_ = _tmp44_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp46_ = _tmp45_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp46_, "secure-port", &_tmp47_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp48_ = _tmp47_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp49_ = self->priv->vm;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp49_, "display", &_tmp50_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp51_ = _tmp50_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp52_ = _tmp51_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp52_, "host-subject", &_tmp53_, NULL);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp54_ = _tmp53_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp55_ = _tmp54_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp56_ = boxes_spice_display_new ((BoxesMachine*) self, _tmp29_, _tmp36_, (gint) _tmp42_, (gint) _tmp48_, _tmp55_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp57_ = _tmp56_;
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp55_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp52_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp46_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp40_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp36_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp33_);
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			display = _tmp57_;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp58_ = display;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp59_ = self->priv->proxy;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp59_, "ca-cert", &_tmp60_, NULL);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp61_ = _tmp60_;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp62_ = _tmp61_;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_spice_display_set_ca_cert (_tmp58_, _tmp62_);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_byte_array_unref0 (_tmp62_);
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			result = (BoxesDisplay*) display;
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return result;
#line 1444 "ovirt-machine.c"
		}
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_DISPLAY_VNC:
#line 1448 "ovirt-machine.c"
		{
			BoxesBoxConfig* _tmp63_ = NULL;
			OvirtVm* _tmp64_ = NULL;
			OvirtVmDisplay* _tmp65_ = NULL;
			OvirtVmDisplay* _tmp66_ = NULL;
			OvirtVmDisplay* _tmp67_ = NULL;
			gchar* _tmp68_ = NULL;
			gchar* _tmp69_ = NULL;
			gchar* _tmp70_ = NULL;
			OvirtVm* _tmp71_ = NULL;
			OvirtVmDisplay* _tmp72_ = NULL;
			OvirtVmDisplay* _tmp73_ = NULL;
			OvirtVmDisplay* _tmp74_ = NULL;
			guint _tmp75_ = 0U;
			guint _tmp76_ = 0U;
			BoxesVncDisplay* _tmp77_ = NULL;
			BoxesDisplay* _tmp78_ = NULL;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp63_ = ((BoxesMachine*) self)->config;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp64_ = self->priv->vm;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp64_, "display", &_tmp65_, NULL);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp66_ = _tmp65_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp67_ = _tmp66_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp67_, "address", &_tmp68_, NULL);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp69_ = _tmp68_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp70_ = _tmp69_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp71_ = self->priv->vm;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp71_, "display", &_tmp72_, NULL);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp73_ = _tmp72_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp74_ = _tmp73_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp74_, "port", &_tmp75_, NULL);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp76_ = _tmp75_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp77_ = boxes_vnc_display_new (_tmp63_, _tmp70_, (gint) _tmp76_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp78_ = (BoxesDisplay*) _tmp77_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp74_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp70_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp67_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			result = _tmp78_;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return result;
#line 1508 "ovirt-machine.c"
		}
		default:
		{
			OvirtVm* _tmp79_ = NULL;
			OvirtVmDisplay* _tmp80_ = NULL;
			OvirtVmDisplay* _tmp81_ = NULL;
			OvirtVmDisplay* _tmp82_ = NULL;
			OvirtVmDisplayType _tmp83_ = 0;
			OvirtVmDisplayType _tmp84_ = 0;
			OvirtVm* _tmp85_ = NULL;
			OvirtVmDisplay* _tmp86_ = NULL;
			OvirtVmDisplay* _tmp87_ = NULL;
			OvirtVmDisplay* _tmp88_ = NULL;
			OvirtVmDisplayType _tmp89_ = 0;
			OvirtVmDisplayType _tmp90_ = 0;
			OvirtVm* _tmp91_ = NULL;
			gchar* _tmp92_ = NULL;
			gchar* _tmp93_ = NULL;
			gchar* _tmp94_ = NULL;
			GError* _tmp95_ = NULL;
			GError* _tmp96_ = NULL;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp79_ = self->priv->vm;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp79_, "display", &_tmp80_, NULL);
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp81_ = _tmp80_;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp82_ = _tmp81_;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp82_, "type", &_tmp83_, NULL);
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp84_ = _tmp83_;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_warning ("ovirt-machine.vala:99: unsupported display of type %d", (gint) _tmp84_);
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp82_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp85_ = self->priv->vm;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp85_, "display", &_tmp86_, NULL);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp87_ = _tmp86_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp88_ = _tmp87_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_tmp88_, "type", &_tmp89_, NULL);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp90_ = _tmp89_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp91_ = self->priv->vm;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_object_get ((OvirtResource*) _tmp91_, "name", &_tmp92_, NULL);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp93_ = _tmp92_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp94_ = _tmp93_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp95_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "unsupported display type %d for %s", (gint) _tmp90_, _tmp94_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_tmp96_ = _tmp95_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp94_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp88_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			_inner_error_ = _tmp96_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			g_propagate_error (error, _inner_error_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			return NULL;
#line 1580 "ovirt-machine.c"
		}
	}
}


static void boxes_ovirt_machine_update_state (BoxesOvirtMachine* self) {
	OvirtVm* _tmp0_ = NULL;
	OvirtVmState _tmp1_ = 0;
	OvirtVmState _tmp2_ = 0;
#line 103 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_return_if_fail (self != NULL);
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = self->priv->vm;
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp0_, "state", &_tmp1_, NULL);
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_tmp2_ = _tmp1_;
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	switch (_tmp2_) {
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_STATE_UP:
#line 1602 "ovirt-machine.c"
		{
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_RUNNING);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1608 "ovirt-machine.c"
		}
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_STATE_DOWN:
#line 1612 "ovirt-machine.c"
		{
#line 109 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_STOPPED);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1618 "ovirt-machine.c"
		}
		default:
		{
#line 112 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_UNKNOWN);
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1626 "ovirt-machine.c"
		}
	}
}


static void boxes_ovirt_machine_class_init (BoxesOvirtMachineClass * klass) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	g_type_class_add_private (klass, sizeof (BoxesOvirtMachinePrivate));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->connect_display = boxes_ovirt_machine_real_connect_display;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->connect_display_finish = boxes_ovirt_machine_real_connect_display_finish;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->get_properties = boxes_ovirt_machine_real_get_properties;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->restart = boxes_ovirt_machine_real_restart;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_ovirt_machine_finalize;
#line 1647 "ovirt-machine.c"
}


static void boxes_ovirt_machine_instance_init (BoxesOvirtMachine * self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self->priv = BOXES_OVIRT_MACHINE_GET_PRIVATE (self);
#line 1654 "ovirt-machine.c"
}


static void boxes_ovirt_machine_finalize (GObject* obj) {
	BoxesOvirtMachine * self;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachine);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->vm);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->proxy);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/ovirt-machine.vala"
	G_OBJECT_CLASS (boxes_ovirt_machine_parent_class)->finalize (obj);
#line 1668 "ovirt-machine.c"
}


GType boxes_ovirt_machine_get_type (void) {
	static volatile gsize boxes_ovirt_machine_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_ovirt_machine_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesOvirtMachineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_ovirt_machine_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesOvirtMachine), 0, (GInstanceInitFunc) boxes_ovirt_machine_instance_init, NULL };
		GType boxes_ovirt_machine_type_id;
		boxes_ovirt_machine_type_id = g_type_register_static (BOXES_TYPE_MACHINE, "BoxesOvirtMachine", &g_define_type_info, 0);
		g_once_init_leave (&boxes_ovirt_machine_type_id__volatile, boxes_ovirt_machine_type_id);
	}
	return boxes_ovirt_machine_type_id__volatile;
}



