/* ovirt-machine.c generated by valac 0.38.4, 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>
#include <libxml/uri.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 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;
enum  {
	BOXES_OVIRT_MACHINE_0_PROPERTY,
	BOXES_OVIRT_MACHINE_CAN_RESTART_PROPERTY,
	BOXES_OVIRT_MACHINE_CAN_CLONE_PROPERTY,
	BOXES_OVIRT_MACHINE_NUM_PROPERTIES
};
static GParamSpec* boxes_ovirt_machine_properties[BOXES_OVIRT_MACHINE_NUM_PROPERTIES];
#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)))
typedef struct _BoxesOvirtMachineCloneData BoxesOvirtMachineCloneData;
#define _xmlFreeURI0(var) ((var == NULL) ? NULL : (var = (xmlFreeURI (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_GENERAL,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_SNAPSHOTS,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

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

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;
};

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);
	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 (*clone) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*clone_finish) (BoxesMachine* self, GAsyncResult* _res_);
	void (*disconnect_display) (BoxesMachine* self);
	void (*update_status) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
	gboolean (*get_suspend_at_exit) (BoxesMachine* self);
	gboolean (*get_can_save) (BoxesMachine* self);
	gboolean (*get_can_restart) (BoxesMachine* self);
	gboolean (*get_can_clone) (BoxesMachine* self);
	gboolean (*get_should_autosave) (BoxesMachine* self);
	gboolean (*get_is_local) (BoxesMachine* self);
};

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;

typedef gint (*BoxesDisplayOpenFDFunc) (void* user_data);
struct _BoxesOvirtMachineConnectDisplayData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _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_;
};

struct _BoxesOvirtMachineCloneData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOvirtMachine* self;
};


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 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))
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* uuid);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
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_update_info (BoxesOvirtMachine* self);
static void _boxes_ovirt_machine_update_info_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
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, BoxesDisplayOpenFDFunc open_fd, void* open_fd_target, GDestroyNotify open_fd_target_destroy_notify, GError** error);
static GList* boxes_ovirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page);
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);
const gchar* boxes_display_get_protocol (BoxesDisplay* self);
gchar* boxes_display_get_uri (BoxesDisplay* self);
GList* boxes_display_get_properties (BoxesDisplay* self, BoxesPropertiesPage page);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_ovirt_machine_real_restart (BoxesMachine* base);
static void boxes_ovirt_machine_real_clone_data_free (gpointer _data);
static void boxes_ovirt_machine_real_clone (BoxesMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_ovirt_machine_real_clone_co (BoxesOvirtMachineCloneData* _data_);
void boxes_machine_set_info (BoxesMachine* self, const gchar* value);
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);
gboolean boxes_machine_get_can_restart (BoxesMachine* self);
gboolean boxes_machine_get_can_clone (BoxesMachine* self);
static void _vala_boxes_ovirt_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


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


static void _boxes_ovirt_machine_update_info_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 27 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_update_info ((BoxesOvirtMachine*) self);
#line 393 "ovirt-machine.c"
}


BoxesOvirtMachine* boxes_ovirt_machine_construct (GType object_type, BoxesCollectionSource* source, OvirtProxy* proxy, OvirtVm* vm, GError** error) {
	BoxesOvirtMachine * self = NULL;
	BoxesCollectionSource* _tmp0_;
	OvirtVm* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	OvirtVm* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	OvirtProxy* _tmp13_;
	OvirtProxy* _tmp14_;
	OvirtVm* _tmp15_;
	OvirtVm* _tmp16_;
	BoxesCollectionSource* _tmp17_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (proxy != NULL, NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_return_val_if_fail (vm != NULL, NULL);
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = source;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = vm;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_get ((OvirtResource*) _tmp1_, "name", &_tmp2_, NULL);
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp3_ = _tmp2_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp4_ = _tmp3_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp5_ = vm;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_get ((OvirtResource*) _tmp5_, "guid", &_tmp6_, NULL);
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp7_ = _tmp6_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp8_ = _tmp7_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) boxes_machine_construct (object_type, _tmp0_, _tmp4_, _tmp8_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp8_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp4_);
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp9_ = boxes_collection_item_get_name ((BoxesCollectionItem*) self);
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp10_ = _tmp9_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp11_ = g_strconcat ("new ovirt machine: ", _tmp10_, NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp12_ = _tmp11_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_debug ("ovirt-machine.vala:17: %s", _tmp12_);
#line 17 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp12_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp13_ = proxy;
#line 18 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp14_ = _g_object_ref0 (_tmp13_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->proxy);
#line 18 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self->priv->proxy = _tmp14_;
#line 19 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp15_ = vm;
#line 19 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp16_ = _g_object_ref0 (_tmp15_);
#line 19 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->vm);
#line 19 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self->priv->vm = _tmp16_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_update_state (self);
#line 23 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_load_screenshot ((BoxesMachine*) self);
#line 24 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_set_screenshot_enable ((BoxesMachine*) self, TRUE);
#line 25 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_update_info (self);
#line 27 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp17_ = source;
#line 27 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_signal_connect_object ((GObject*) _tmp17_, "notify::uri", (GCallback) _boxes_ovirt_machine_update_info_g_object_notify, self, 0);
#line 12 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return self;
#line 489 "ovirt-machine.c"
}


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


static void boxes_ovirt_machine_real_connect_display_data_free (gpointer _data) {
	BoxesOvirtMachineConnectDisplayData* _data_;
	_data_ = _data;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_slice_free (BoxesOvirtMachineConnectDisplayData, _data_);
#line 507 "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_;
	BoxesMachineConnectFlags _tmp1_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_slice_new0 (BoxesOvirtMachineConnectDisplayData);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_ovirt_machine_real_connect_display_data_free);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->self = _tmp0_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = flags;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->flags = _tmp1_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_real_connect_display_co (_data_);
#line 534 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_connect_display_finish (BoxesMachine* base, GAsyncResult* _res_, GError** error) {
	BoxesOvirtMachineConnectDisplayData* _data_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (NULL == _data_) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		return;
#line 546 "ovirt-machine.c"
	}
}


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


static gboolean boxes_ovirt_machine_real_connect_display_co (BoxesOvirtMachineConnectDisplayData* _data_) {
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	switch (_data_->_state_) {
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case 0:
#line 570 "ovirt-machine.c"
		goto _state_0;
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case 1:
#line 574 "ovirt-machine.c"
		goto _state_1;
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case 2:
#line 578 "ovirt-machine.c"
		goto _state_2;
		default:
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_assert_not_reached ();
#line 583 "ovirt-machine.c"
	}
	_state_0:
#line 31 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp0_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 31 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp1_ != NULL) {
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_state_ != 0) {
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 600 "ovirt-machine.c"
			}
		}
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 32 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 607 "ovirt-machine.c"
	}
#line 34 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp2_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 34 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 34 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_cancellable_reset (_data_->_tmp3_);
#line 36 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp4_ = boxes_machine_get_state ((BoxesMachine*) _data_->self);
#line 36 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 36 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp5_ == BOXES_MACHINE_MACHINE_STATE_STOPPED) {
#line 621 "ovirt-machine.c"
		{
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp6_ = _data_->self->priv->vm;
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp7_ = _data_->self->priv->proxy;
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp8_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp9_ = _data_->_tmp8_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_state_ = 1;
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_start_async (_data_->_tmp6_, _data_->_tmp7_, _data_->_tmp9_, boxes_ovirt_machine_connect_display_ready, _data_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 637 "ovirt-machine.c"
			_state_1:
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_start_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 38 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
				if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 645 "ovirt-machine.c"
					goto __catch166_g_io_error_cancelled;
				}
				goto __catch166_g_error;
			}
#line 39 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			boxes_ovirt_machine_update_state (_data_->self);
#line 652 "ovirt-machine.c"
		}
		goto __finally166;
		__catch166_g_io_error_cancelled:
		{
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_error_ = _data_->_inner_error_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = NULL;
#line 41 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp10_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
#line 41 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp11_ = _data_->_tmp10_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_debug ("ovirt-machine.vala:41: connection to %s was cancelled", _data_->_tmp11_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_error_free0 (_data_->_error_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			if (_data_->_state_ != 0) {
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
				while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 677 "ovirt-machine.c"
				}
			}
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_object_unref (_data_->_async_result);
#line 43 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 684 "ovirt-machine.c"
		}
		goto __finally166;
		__catch166_g_error:
		{
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = NULL;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp12_ = _data_->self->priv->vm;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_object_get ((OvirtResource*) _data_->_tmp12_, "name", &_data_->_tmp13_, NULL);
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp14_ = _data_->_tmp13_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp15_ = _data_->_tmp14_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp16_ = _data_->_vala1__error_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp17_ = _data_->_tmp16_->message;
#line 45 "/home/fborges/checkout/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 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp19_ = _data_->_tmp18_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_data_->_tmp15_);
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_inner_error_ = _data_->_tmp19_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 715 "ovirt-machine.c"
			goto __finally166;
		}
		__finally166:
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_object_unref (_data_->_async_result);
#line 37 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 727 "ovirt-machine.c"
		}
	}
#line 48 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp20_ = boxes_machine_get_state ((BoxesMachine*) _data_->self);
#line 48 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_tmp21_ = _data_->_tmp20_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_tmp21_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp22_ = _data_->self->priv->vm;
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_get ((OvirtResource*) _data_->_tmp22_, "name", &_data_->_tmp23_, NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp24_ = _data_->_tmp23_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp25_ = _data_->_tmp24_;
#line 49 "/home/fborges/checkout/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 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp27_ = _data_->_tmp26_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_g_free0 (_data_->_tmp25_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = _data_->_tmp27_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 49 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 758 "ovirt-machine.c"
	}
	{
#line 52 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp29_ = boxes_ovirt_machine_create_display_connection (_data_->self, &_data_->_inner_error_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp28_ = _data_->_tmp29_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 52 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 769 "ovirt-machine.c"
				goto __catch167_g_io_error_cancelled;
			}
			goto __catch167_g_error;
		}
#line 52 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		boxes_machine_set_display ((BoxesMachine*) _data_->self, _data_->_tmp28_);
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp30_ = _data_->self->priv->vm;
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_data_->_tmp30_, "display", &_data_->_tmp31_, NULL);
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp32_ = _data_->_tmp31_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp33_ = _data_->_tmp32_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_get (_data_->_tmp33_, "type", &_data_->_tmp34_, NULL);
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp35_ = _data_->_tmp34_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp36_ = _data_->_tmp35_ == OVIRT_VM_DISPLAY_SPICE;
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_g_object_unref0 (_data_->_tmp33_);
#line 53 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		if (_data_->_tmp36_) {
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp37_ = _data_->self->priv->vm;
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp38_ = _data_->self->priv->proxy;
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp39_ = boxes_machine_get_connecting_cancellable ((BoxesMachine*) _data_->self);
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp40_ = _data_->_tmp39_;
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_state_ = 2;
#line 54 "/home/fborges/checkout/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 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			return FALSE;
#line 808 "ovirt-machine.c"
			_state_2:
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			ovirt_vm_get_ticket_finish (_data_->_tmp37_, _data_->_res_, &_data_->_inner_error_);
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
				_g_object_unref0 (_data_->_tmp28_);
#line 54 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
				if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 818 "ovirt-machine.c"
					goto __catch167_g_io_error_cancelled;
				}
				goto __catch167_g_error;
			}
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp41_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp42_ = _data_->_tmp41_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp43_ = _data_->self->priv->vm;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_data_->_tmp43_, "display", &_data_->_tmp44_, NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp45_ = _data_->_tmp44_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp46_ = _data_->_tmp45_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_object_get (_data_->_tmp46_, "ticket", &_data_->_tmp47_, NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp48_ = _data_->_tmp47_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_data_->_tmp49_ = _data_->_tmp48_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			boxes_display_set_password (_data_->_tmp42_, _data_->_tmp49_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_data_->_tmp49_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_data_->_tmp46_);
#line 847 "ovirt-machine.c"
		}
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp50_ = boxes_machine_get_display ((BoxesMachine*) _data_->self);
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp51_ = _data_->_tmp50_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		boxes_display_connect_it (_data_->_tmp51_, NULL, NULL, NULL, &_data_->_inner_error_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_data_->_tmp28_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
#line 861 "ovirt-machine.c"
				goto __catch167_g_io_error_cancelled;
			}
			goto __catch167_g_error;
		}
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_g_object_unref0 (_data_->_tmp28_);
#line 868 "ovirt-machine.c"
	}
	goto __finally167;
	__catch167_g_io_error_cancelled:
	{
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_vala2__error_ = _data_->_inner_error_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = NULL;
#line 60 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp52_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->self);
#line 60 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp53_ = _data_->_tmp52_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_debug ("ovirt-machine.vala:60: connection to %s was cancelled", _data_->_tmp53_);
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_g_error_free0 (_data_->_vala2__error_);
#line 885 "ovirt-machine.c"
	}
	goto __finally167;
	__catch167_g_error:
	{
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->e = _data_->_inner_error_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = NULL;
#line 62 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp54_ = _data_->e;
#line 62 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp55_ = _data_->_tmp54_->message;
#line 62 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_tmp56_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Error opening display: %s", _data_->_tmp55_);
#line 62 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_data_->_inner_error_ = _data_->_tmp56_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		_g_error_free0 (_data_->e);
#line 904 "ovirt-machine.c"
		goto __finally167;
	}
	__finally167:
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_object_unref (_data_->_async_result);
#line 51 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		return FALSE;
#line 916 "ovirt-machine.c"
	}
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_state_ != 0) {
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 926 "ovirt-machine.c"
		}
	}
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_unref (_data_->_async_result);
#line 30 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return FALSE;
#line 933 "ovirt-machine.c"
}


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


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 947 "ovirt-machine.c"
}


static GList* boxes_ovirt_machine_real_get_properties (BoxesMachine* base, BoxesPropertiesPage page) {
	BoxesOvirtMachine * self;
	GList* result = NULL;
	GList* list = NULL;
	BoxesPropertiesPage _tmp0_;
	BoxesDisplay* _tmp20_;
	BoxesDisplay* _tmp21_;
	BoxesPropertiesPage _tmp22_;
	GList* _tmp23_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 67 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	list = NULL;
#line 69 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = page;
#line 69 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	switch (_tmp0_) {
#line 69 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case BOXES_PROPERTIES_PAGE_GENERAL:
#line 970 "ovirt-machine.c"
		{
			BoxesCollectionSource* _tmp1_;
			gchar* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp4_;
			BoxesStringProperty* _tmp5_;
			BoxesStringProperty* _tmp6_;
			BoxesDisplay* _tmp7_;
			BoxesDisplay* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			BoxesStringProperty* _tmp11_;
			BoxesStringProperty* _tmp12_;
			BoxesDisplay* _tmp13_;
			BoxesDisplay* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			BoxesStringProperty* _tmp18_;
			BoxesStringProperty* _tmp19_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp1_ = ((BoxesMachine*) self)->source;
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp2_ = boxes_collection_source_get_name (_tmp1_);
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp3_ = _tmp2_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp4_ = _tmp3_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp5_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _ ("Broker"), _tmp4_);
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp6_ = _tmp5_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp6_);
#line 71 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp4_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp7_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp8_ = _tmp7_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp9_ = boxes_display_get_protocol (_tmp8_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp10_ = _tmp9_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp11_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _ ("Protocol"), _tmp10_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp12_ = _tmp11_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp12_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp13_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp14_ = _tmp13_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp15_ = boxes_display_get_uri (_tmp14_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp16_ = _tmp15_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp17_ = _tmp16_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp18_ = boxes_iproperties_provider_add_string_property ((BoxesIPropertiesProvider*) self, &list, _ ("URL"), _tmp17_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_tmp19_ = _tmp18_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_object_unref0 (_tmp19_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			_g_free0 (_tmp17_);
#line 74 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1041 "ovirt-machine.c"
		}
		default:
#line 69 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		break;
#line 1046 "ovirt-machine.c"
	}
#line 77 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp20_ = boxes_machine_get_display ((BoxesMachine*) self);
#line 77 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp21_ = _tmp20_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp22_ = page;
#line 77 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp23_ = boxes_display_get_properties (_tmp21_, _tmp22_);
#line 77 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	list = g_list_concat (list, _tmp23_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	result = list;
#line 79 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return result;
#line 1062 "ovirt-machine.c"
}


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


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


static void boxes_ovirt_machine_real_clone (BoxesMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOvirtMachine * self;
	BoxesOvirtMachineCloneData* _data_;
	BoxesOvirtMachine* _tmp0_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_slice_new0 (BoxesOvirtMachineCloneData);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_ovirt_machine_real_clone_data_free);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_->self = _tmp0_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_real_clone_co (_data_);
#line 1103 "ovirt-machine.c"
}


static void boxes_ovirt_machine_real_clone_finish (BoxesMachine* base, GAsyncResult* _res_) {
	BoxesOvirtMachineCloneData* _data_;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 1111 "ovirt-machine.c"
}


static gboolean boxes_ovirt_machine_real_clone_co (BoxesOvirtMachineCloneData* _data_) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	switch (_data_->_state_) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case 0:
#line 1120 "ovirt-machine.c"
		goto _state_0;
		default:
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_assert_not_reached ();
#line 1125 "ovirt-machine.c"
	}
	_state_0:
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	if (_data_->_state_ != 0) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1136 "ovirt-machine.c"
		}
	}
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_unref (_data_->_async_result);
#line 83 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return FALSE;
#line 1143 "ovirt-machine.c"
}


static void boxes_ovirt_machine_update_info (BoxesOvirtMachine* self) {
	xmlURI* uri = NULL;
	BoxesCollectionSource* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	xmlURI* _tmp4_;
	xmlURI* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
#line 85 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_return_if_fail (self != NULL);
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = ((BoxesMachine*) self)->source;
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp1_ = boxes_collection_source_get_uri (_tmp0_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp2_ = _tmp1_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp3_ = _tmp2_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp4_ = xmlParseURI (_tmp3_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp5_ = _tmp4_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp3_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	uri = _tmp5_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp6_ = uri->server;
#line 88 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp7_ = g_strdup_printf (_ ("host: %s"), _tmp6_);
#line 88 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp8_ = _tmp7_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_machine_set_info ((BoxesMachine*) self, _tmp8_);
#line 88 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_free0 (_tmp8_);
#line 85 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_xmlFreeURI0 (uri);
#line 1188 "ovirt-machine.c"
}


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


static void boxes_ovirt_machine_update_state (BoxesOvirtMachine* self) {
	OvirtVm* _tmp0_;
	OvirtVmState _tmp1_;
	OvirtVmState _tmp2_;
#line 114 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_return_if_fail (self != NULL);
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp0_ = self->priv->vm;
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_get (_tmp0_, "state", &_tmp1_, NULL);
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_tmp2_ = _tmp1_;
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	switch (_tmp2_) {
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_STATE_UP:
#line 1604 "ovirt-machine.c"
		{
#line 117 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_RUNNING);
#line 118 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1610 "ovirt-machine.c"
		}
#line 115 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case OVIRT_VM_STATE_DOWN:
#line 1614 "ovirt-machine.c"
		{
#line 120 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_STOPPED);
#line 121 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1620 "ovirt-machine.c"
		}
		default:
		{
#line 123 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			boxes_machine_set_state ((BoxesMachine*) self, BOXES_MACHINE_MACHINE_STATE_UNKNOWN);
#line 124 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
			break;
#line 1628 "ovirt-machine.c"
		}
	}
}


static gboolean boxes_ovirt_machine_real_get_can_restart (BoxesMachine* base) {
	gboolean result;
	BoxesOvirtMachine* self;
#line 6 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 6 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	result = FALSE;
#line 6 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return result;
#line 1643 "ovirt-machine.c"
}


static gboolean boxes_ovirt_machine_real_get_can_clone (BoxesMachine* base) {
	gboolean result;
	BoxesOvirtMachine* self;
#line 7 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = (BoxesOvirtMachine*) base;
#line 7 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	result = FALSE;
#line 7 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	return result;
#line 1656 "ovirt-machine.c"
}


static void boxes_ovirt_machine_class_init (BoxesOvirtMachineClass * klass) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	boxes_ovirt_machine_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_type_class_add_private (klass, sizeof (BoxesOvirtMachinePrivate));
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->connect_display = (void (*) (BoxesMachine *, BoxesMachineConnectFlags, GAsyncReadyCallback, gpointer)) boxes_ovirt_machine_real_connect_display;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->connect_display_finish = (void (*) (BoxesMachine *, GAsyncResult*, GError**)) boxes_ovirt_machine_real_connect_display_finish;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->get_properties = (GList* (*) (BoxesMachine *, BoxesPropertiesPage)) boxes_ovirt_machine_real_get_properties;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->restart = (void (*) (BoxesMachine *)) boxes_ovirt_machine_real_restart;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->clone = (void (*) (BoxesMachine *, GAsyncReadyCallback, gpointer)) boxes_ovirt_machine_real_clone;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	((BoxesMachineClass *) klass)->clone_finish = (void (*) (BoxesMachine *, GAsyncResult*)) boxes_ovirt_machine_real_clone_finish;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	BOXES_MACHINE_CLASS (klass)->get_can_restart = boxes_ovirt_machine_real_get_can_restart;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	BOXES_MACHINE_CLASS (klass)->get_can_clone = boxes_ovirt_machine_real_get_can_clone;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_ovirt_machine_get_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_ovirt_machine_finalize;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_OVIRT_MACHINE_CAN_RESTART_PROPERTY, boxes_ovirt_machine_properties[BOXES_OVIRT_MACHINE_CAN_RESTART_PROPERTY] = g_param_spec_boolean ("can-restart", "can-restart", "can-restart", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_OVIRT_MACHINE_CAN_CLONE_PROPERTY, boxes_ovirt_machine_properties[BOXES_OVIRT_MACHINE_CAN_CLONE_PROPERTY] = g_param_spec_boolean ("can-clone", "can-clone", "can-clone", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 1689 "ovirt-machine.c"
}


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


static void boxes_ovirt_machine_finalize (GObject * obj) {
	BoxesOvirtMachine * self;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachine);
#line 9 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->vm);
#line 10 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	_g_object_unref0 (self->priv->proxy);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	G_OBJECT_CLASS (boxes_ovirt_machine_parent_class)->finalize (obj);
#line 1710 "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;
}


static void _vala_boxes_ovirt_machine_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesOvirtMachine * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_OVIRT_MACHINE, BoxesOvirtMachine);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case BOXES_OVIRT_MACHINE_CAN_RESTART_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_value_set_boolean (value, boxes_machine_get_can_restart ((BoxesMachine*) self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		break;
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		case BOXES_OVIRT_MACHINE_CAN_CLONE_PROPERTY:
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		g_value_set_boolean (value, boxes_machine_get_can_clone ((BoxesMachine*) self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		break;
#line 1743 "ovirt-machine.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/ovirt-machine.vala"
		break;
#line 1749 "ovirt-machine.c"
	}
}



