/* vm-importer.c generated by valac 0.36.1.38-6532, the Vala compiler
 * generated from vm-importer.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 <stdlib.h>
#include <string.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.h>
#include <glib/gi18n-lib.h>


#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
typedef struct _BoxesVMCreatorPrivate BoxesVMCreatorPrivate;

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

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

#define BOXES_TYPE_LIBVIRT_MACHINE (boxes_libvirt_machine_get_type ())
#define BOXES_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachine))
#define BOXES_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))
#define BOXES_IS_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_IS_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_LIBVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))

typedef struct _BoxesLibvirtMachine BoxesLibvirtMachine;
typedef struct _BoxesLibvirtMachineClass BoxesLibvirtMachineClass;

#define BOXES_TYPE_VM_IMPORTER (boxes_vm_importer_get_type ())
#define BOXES_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_IMPORTER, BoxesVMImporter))
#define BOXES_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_IMPORTER, BoxesVMImporterClass))
#define BOXES_IS_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_IMPORTER))
#define BOXES_IS_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_IMPORTER))
#define BOXES_VM_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_IMPORTER, BoxesVMImporterClass))

typedef struct _BoxesVMImporter BoxesVMImporter;
typedef struct _BoxesVMImporterClass BoxesVMImporterClass;
typedef struct _BoxesVMImporterPrivate BoxesVMImporterPrivate;
enum  {
	BOXES_VM_IMPORTER_DUMMY_PROPERTY,
	BOXES_VM_IMPORTER_LAST_PROPERTY
};
static GParamSpec* boxes_vm_importer_properties[BOXES_VM_IMPORTER_LAST_PROPERTY];

#define BOXES_TYPE_INSTALLER_MEDIA (boxes_installer_media_get_type ())
#define BOXES_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia))
#define BOXES_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))
#define BOXES_IS_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_IS_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_INSTALLER_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))

typedef struct _BoxesInstallerMedia BoxesInstallerMedia;
typedef struct _BoxesInstallerMediaClass BoxesInstallerMediaClass;

#define BOXES_TYPE_INSTALLED_MEDIA (boxes_installed_media_get_type ())
#define BOXES_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMedia))
#define BOXES_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))
#define BOXES_IS_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_IS_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_INSTALLED_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))

typedef struct _BoxesInstalledMedia BoxesInstalledMedia;
typedef struct _BoxesInstalledMediaClass BoxesInstalledMediaClass;

#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 ())
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;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_MACHINE_TYPE_CONNECT_FLAGS (boxes_machine_connect_flags_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _boxes_vm_creator_unref0(var) ((var == NULL) ? NULL : (var = (boxes_vm_creator_unref (var), NULL)))

#define BOXES_TYPE_MEDIA_MANAGER (boxes_media_manager_get_type ())
#define BOXES_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager))
#define BOXES_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))
#define BOXES_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))

typedef struct _BoxesMediaManager BoxesMediaManager;
typedef struct _BoxesMediaManagerClass BoxesMediaManagerClass;
typedef struct _BoxesVmImporterContinueInstallationData BoxesVmImporterContinueInstallationData;
typedef struct _BoxesVmImporterPostImportSetupData BoxesVmImporterPostImportSetupData;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_NOTIFICATION (boxes_notification_get_type ())
#define BOXES_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATION, BoxesNotification))
#define BOXES_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATION, BoxesNotificationClass))
#define BOXES_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATION))
#define BOXES_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATION))
#define BOXES_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATION, BoxesNotificationClass))

typedef struct _BoxesNotification BoxesNotification;
typedef struct _BoxesNotificationClass BoxesNotificationClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesVmImporterImportVmData BoxesVmImporterImportVmData;

struct _BoxesVMCreator {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BoxesVMCreatorPrivate * priv;
};

struct _BoxesVMCreatorClass {
	GTypeClass parent_class;
	void (*finalize) (BoxesVMCreator *self);
	void (*launch_vm) (BoxesVMCreator* self, BoxesLibvirtMachine* machine, gint64 access_last_time, GError** error);
	void (*continue_installation) (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*continue_installation_finish) (BoxesVMCreator* self, GAsyncResult* _res_);
	void (*create_domain_config) (BoxesVMCreator* self, const gchar* name, const gchar* title, GVirStorageVol* volume, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GVirConfigDomain* (*create_domain_config_finish) (BoxesVMCreator* self, GAsyncResult* _res_, GError** error);
	void (*create_domain_base_name_and_title) (BoxesVMCreator* self, gchar* * base_name, gchar* * base_title);
};

struct _BoxesVMImporter {
	BoxesVMCreator parent_instance;
	BoxesVMImporterPrivate * priv;
	gboolean start_after_import;
};

struct _BoxesVMImporterClass {
	BoxesVMCreatorClass parent_class;
	void (*post_import_setup) (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*post_import_setup_finish) (BoxesVMImporter* self, GAsyncResult* _res_);
};

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 _BoxesVmImporterContinueInstallationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean _task_complete_;
	BoxesVMImporter* self;
	BoxesLibvirtMachine* machine;
	BoxesMediaManager* _tmp0_;
	BoxesMediaManager* _tmp1_;
	BoxesLibvirtMachine* _tmp2_;
	GVirConfigDomain* _tmp3_;
	GVirConfigDomain* _tmp4_;
	BoxesInstallerMedia* _tmp5_;
	BoxesInstallerMedia* _tmp6_;
	BoxesLibvirtMachine* _tmp7_;
	BoxesLibvirtMachine* _tmp8_;
};

struct _BoxesVmImporterPostImportSetupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean _task_complete_;
	BoxesVMImporter* self;
	BoxesLibvirtMachine* machine;
	BoxesLibvirtMachine* _tmp0_;
};

struct _BoxesInstallerMedia {
	GObject parent_instance;
	BoxesInstallerMediaPrivate * priv;
	OsinfoOs* os;
	OsinfoResources* resources;
	OsinfoMedia* os_media;
	gchar* label;
	gchar* device_file;
	gchar* mount_point;
	gboolean from_image;
};

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare) (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_box) (BoxesInstallerMedia* self, GtkBox* setup_box);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	BoxesVMCreator* (*get_vm_creator) (BoxesInstallerMedia* self);
	OsinfoDeviceList* (*get_supported_devices) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_ready_to_create) (BoxesInstallerMedia* self);
	gboolean (*get_live) (BoxesInstallerMedia* self);
	gchar* (*get_architecture) (BoxesInstallerMedia* self);
};

struct _BoxesVmImporterImportVmData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean _task_complete_;
	BoxesVMImporter* self;
	BoxesLibvirtMachine* machine;
	gchar* destination_path;
	BoxesLibvirtMachine* _tmp0_;
	GVirStorageVol* _tmp1_;
	GVirStorageVol* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	BoxesInstalledMedia* _tmp5_;
	BoxesInstalledMedia* _tmp6_;
	const gchar* _tmp7_;
	GVirConnection* _tmp8_;
	GVirConnection* _tmp9_;
	GVirConnection* _tmp10_;
	GVirStoragePool* _tmp11_;
	GVirStoragePool* _tmp12_;
	GError* _error_;
	BoxesLibvirtMachine* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	BoxesInstalledMedia* _tmp16_;
	BoxesInstalledMedia* _tmp17_;
	const gchar* _tmp18_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	gchar* ui_message;
	BoxesInstalledMedia* _tmp21_;
	BoxesInstalledMedia* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	BoxesApp* _tmp25_;
	BoxesAppWindow* _tmp26_;
	BoxesAppWindow* _tmp27_;
	BoxesNotificationbar* _tmp28_;
	BoxesNotificationbar* _tmp29_;
	const gchar* _tmp30_;
	BoxesNotification* _tmp31_;
	BoxesNotification* _tmp32_;
	BoxesLibvirtMachine* _tmp33_;
	BoxesLibvirtMachine* _tmp34_;
	gboolean _tmp35_;
	BoxesLibvirtMachine* _tmp36_;
	GVirDomain* _tmp37_;
	GVirDomain* _tmp38_;
	GError* _vala1__error_;
	BoxesLibvirtMachine* _tmp39_;
	GVirDomain* _tmp40_;
	GVirDomain* _tmp41_;
	const gchar* _tmp42_;
	GError* _tmp43_;
	const gchar* _tmp44_;
	BoxesLibvirtMachine* _tmp45_;
	GError * _inner_error_;
};


static gpointer boxes_vm_importer_parent_class = NULL;
extern BoxesApp* boxes_app_app;

gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST;
GType boxes_vm_importer_get_type (void) G_GNUC_CONST;
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GType boxes_installed_media_get_type (void) G_GNUC_CONST;
BoxesVMImporter* boxes_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesVMImporter* boxes_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
BoxesVMCreator* boxes_vm_creator_new (BoxesInstallerMedia* install_media);
BoxesVMCreator* boxes_vm_creator_construct (GType object_type, BoxesInstallerMedia* install_media);
BoxesVMImporter* boxes_vm_importer_new_for_import_completion (BoxesLibvirtMachine* machine);
BoxesVMImporter* boxes_vm_importer_construct_for_import_completion (GType object_type, BoxesLibvirtMachine* machine);
BoxesVMCreator* boxes_vm_creator_new_for_install_completion (BoxesLibvirtMachine* machine);
BoxesVMCreator* boxes_vm_creator_construct_for_install_completion (GType object_type, BoxesLibvirtMachine* machine);
static void boxes_vm_importer_real_launch_vm (BoxesVMCreator* base, BoxesLibvirtMachine* machine, gint64 access_last_time, GError** error);
void boxes_libvirt_machine_set_vm_creator (BoxesLibvirtMachine* self, BoxesVMCreator* value);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_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_connect_flags_get_type (void) G_GNUC_CONST;
static void boxes_vm_importer_import_vm (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_vm_importer_import_vm_finish (BoxesVMImporter* self, GAsyncResult* _res_);
static void boxes_vm_importer_real_continue_installation_data_free (gpointer _data);
static void boxes_vm_importer_real_continue_installation (BoxesVMCreator* base, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_vm_importer_real_continue_installation_co (BoxesVmImporterContinueInstallationData* _data_);
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
BoxesMediaManager* boxes_media_manager_get_instance (void);
void boxes_media_manager_create_installer_media_from_config (BoxesMediaManager* self, GVirConfigDomain* config, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_config_finish (BoxesMediaManager* self, GAsyncResult* _res_);
GVirConfigDomain* boxes_libvirt_machine_get_domain_config (BoxesLibvirtMachine* self);
static void boxes_vm_importer_continue_installation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_vm_creator_set_install_media (BoxesVMCreator* self, BoxesInstallerMedia* value);
static void boxes_vm_importer_real_post_import_setup_data_free (gpointer _data);
static void boxes_vm_importer_real_post_import_setup (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_vm_importer_post_import_setup (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_vm_importer_post_import_setup_finish (BoxesVMImporter* self, GAsyncResult* _res_);
static gboolean boxes_vm_importer_real_post_import_setup_co (BoxesVmImporterPostImportSetupData* _data_);
void boxes_vm_creator_set_post_install_config (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
static void boxes_vm_importer_import_vm_data_free (gpointer _data);
static gboolean boxes_vm_importer_import_vm_co (BoxesVmImporterImportVmData* _data_);
GVirStorageVol* boxes_libvirt_machine_get_storage_volume (BoxesLibvirtMachine* self);
BoxesInstalledMedia* boxes_vm_importer_get_source_media (BoxesVMImporter* self);
void boxes_installed_media_copy (BoxesInstalledMedia* self, const gchar* destination_path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installed_media_copy_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error);
static void boxes_vm_importer_import_vm_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_ensure_storage_pool (GVirConnection* connection, GAsyncReadyCallback _callback_, gpointer _user_data_);
GVirStoragePool* boxes_ensure_storage_pool_finish (GAsyncResult* _res_, GError** error);
GVirConnection* boxes_vm_creator_get_connection (BoxesVMCreator* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
BoxesAppWindow* boxes_app_get_main_window (BoxesApp* self);
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
BoxesNotificationbar* boxes_app_window_get_notificationbar (BoxesAppWindow* self);
GType boxes_notification_get_type (void) G_GNUC_CONST;
BoxesNotification* boxes_notificationbar_display_error (BoxesNotificationbar* self, const gchar* message, gint timeout);
#define BOXES_NOTIFICATIONBAR_DEFAULT_TIMEOUT 6
void boxes_machine_delete (BoxesMachine* self, gboolean by_user);
GVirDomain* boxes_libvirt_machine_get_domain (BoxesLibvirtMachine* self);
BoxesInstallerMedia* boxes_vm_creator_get_install_media (BoxesVMCreator* self);
static void boxes_vm_importer_finalize (BoxesVMCreator * obj);


BoxesVMImporter* boxes_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media) {
	BoxesVMImporter* self = NULL;
	BoxesInstalledMedia* _tmp0_;
#line 11 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_return_val_if_fail (source_media != NULL, NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = source_media;
#line 12 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) boxes_vm_creator_construct (object_type, (BoxesInstallerMedia*) _tmp0_);
#line 11 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return self;
#line 508 "vm-importer.c"
}


BoxesVMImporter* boxes_vm_importer_new (BoxesInstalledMedia* source_media) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return boxes_vm_importer_construct (BOXES_TYPE_VM_IMPORTER, source_media);
#line 515 "vm-importer.c"
}


BoxesVMImporter* boxes_vm_importer_construct_for_import_completion (GType object_type, BoxesLibvirtMachine* machine) {
	BoxesVMImporter* self = NULL;
	BoxesLibvirtMachine* _tmp0_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 16 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = machine;
#line 16 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) boxes_vm_creator_construct_for_install_completion (object_type, _tmp0_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return self;
#line 530 "vm-importer.c"
}


BoxesVMImporter* boxes_vm_importer_new_for_import_completion (BoxesLibvirtMachine* machine) {
#line 15 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return boxes_vm_importer_construct_for_import_completion (BOXES_TYPE_VM_IMPORTER, machine);
#line 537 "vm-importer.c"
}


static void boxes_vm_importer_real_launch_vm (BoxesVMCreator* base, BoxesLibvirtMachine* machine, gint64 access_last_time, GError** error) {
	BoxesVMImporter * self;
	BoxesLibvirtMachine* _tmp0_;
	gint64 _tmp1_ = 0LL;
	gint64 _tmp2_;
	BoxesLibvirtMachine* _tmp5_;
	BoxesBoxConfig* _tmp6_;
	BoxesLibvirtMachine* _tmp7_;
#line 19 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) base;
#line 19 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_return_if_fail (machine != NULL);
#line 20 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = machine;
#line 20 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_tmp0_, (BoxesVMCreator*) self);
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = access_last_time;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_tmp2_ > ((gint64) 0)) {
#line 561 "vm-importer.c"
		gint64 _tmp3_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_tmp3_ = access_last_time;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_tmp1_ = _tmp3_;
#line 567 "vm-importer.c"
	} else {
		gint64 _tmp4_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_tmp4_ = g_get_real_time ();
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_tmp1_ = _tmp4_;
#line 574 "vm-importer.c"
	}
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp5_ = machine;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp6_ = ((BoxesMachine*) _tmp5_)->config;
#line 21 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_box_config_set_access_last_time (_tmp6_, _tmp1_);
#line 23 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp7_ = machine;
#line 23 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm (self, _tmp7_, NULL, NULL);
#line 586 "vm-importer.c"
}


static void boxes_vm_importer_real_continue_installation_data_free (gpointer _data) {
	BoxesVmImporterContinueInstallationData* _data_;
	_data_ = _data;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_boxes_vm_creator_unref0 (_data_->self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_slice_free (BoxesVmImporterContinueInstallationData, _data_);
#line 599 "vm-importer.c"
}


static gpointer _boxes_vm_creator_ref0 (gpointer self) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return self ? boxes_vm_creator_ref (self) : NULL;
#line 606 "vm-importer.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return self ? g_object_ref (self) : NULL;
#line 613 "vm-importer.c"
}


static void boxes_vm_importer_real_continue_installation (BoxesVMCreator* base, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVMImporter * self;
	BoxesVmImporterContinueInstallationData* _data_;
	BoxesVMImporter* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	BoxesLibvirtMachine* _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) base;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_slice_new0 (BoxesVmImporterContinueInstallationData);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_callback_ == NULL) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_task_complete_ = TRUE;
#line 633 "vm-importer.c"
	}
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_vm_importer_real_continue_installation_data_free);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = machine;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->machine = _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_real_continue_installation_co (_data_);
#line 651 "vm-importer.c"
}


static void boxes_vm_importer_real_continue_installation_finish (BoxesVMCreator* base, GAsyncResult* _res_) {
	BoxesVmImporterContinueInstallationData* _data_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_task_complete_ = TRUE;
#line 661 "vm-importer.c"
}


static void boxes_vm_importer_continue_installation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmImporterContinueInstallationData* _data_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = _user_data_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_source_object_ = source_object;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_res_ = _res_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_task_complete_ = TRUE;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_real_continue_installation_co (_data_);
#line 677 "vm-importer.c"
}


static gboolean boxes_vm_importer_real_continue_installation_co (BoxesVmImporterContinueInstallationData* _data_) {
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 686 "vm-importer.c"
		goto _state_0;
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 1:
#line 690 "vm-importer.c"
		goto _state_1;
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 2:
#line 694 "vm-importer.c"
		goto _state_2;
		default:
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 699 "vm-importer.c"
	}
	_state_0:
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = boxes_media_manager_get_instance ();
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp2_ = _data_->machine;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp3_ = boxes_libvirt_machine_get_domain_config (_data_->_tmp2_);
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 1;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_media_manager_create_installer_media_from_config (_data_->_tmp1_, _data_->_tmp4_, boxes_vm_importer_continue_installation_ready, _data_);
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 718 "vm-importer.c"
	_state_1:
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp5_ = boxes_media_manager_create_installer_media_from_config_finish (_data_->_tmp1_, _data_->_res_);
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_creator_set_install_media ((BoxesVMCreator*) _data_->self, _data_->_tmp6_);
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->_tmp6_);
#line 27 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->_tmp1_);
#line 28 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp7_ = _data_->machine;
#line 28 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_data_->_tmp7_, (BoxesVMCreator*) _data_->self);
#line 30 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp8_ = _data_->machine;
#line 30 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 2;
#line 30 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm (_data_->self, _data_->_tmp8_, boxes_vm_importer_continue_installation_ready, _data_);
#line 30 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 742 "vm-importer.c"
	_state_2:
#line 30 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm_finish (_data_->self, _data_->_res_);
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ != 0) {
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 754 "vm-importer.c"
		}
	}
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 26 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 761 "vm-importer.c"
}


static void boxes_vm_importer_real_post_import_setup_data_free (gpointer _data) {
	BoxesVmImporterPostImportSetupData* _data_;
	_data_ = _data;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_boxes_vm_creator_unref0 (_data_->self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_slice_free (BoxesVmImporterPostImportSetupData, _data_);
#line 774 "vm-importer.c"
}


static void boxes_vm_importer_real_post_import_setup (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmImporterPostImportSetupData* _data_;
	BoxesVMImporter* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	BoxesLibvirtMachine* _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_slice_new0 (BoxesVmImporterPostImportSetupData);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_callback_ == NULL) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_task_complete_ = TRUE;
#line 791 "vm-importer.c"
	}
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_vm_importer_real_post_import_setup_data_free);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = machine;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->machine = _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_real_post_import_setup_co (_data_);
#line 809 "vm-importer.c"
}


static void boxes_vm_importer_real_post_import_setup_finish (BoxesVMImporter* self, GAsyncResult* _res_) {
	BoxesVmImporterPostImportSetupData* _data_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_task_complete_ = TRUE;
#line 819 "vm-importer.c"
}


static gboolean boxes_vm_importer_real_post_import_setup_co (BoxesVmImporterPostImportSetupData* _data_) {
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 828 "vm-importer.c"
		goto _state_0;
		default:
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 833 "vm-importer.c"
	}
	_state_0:
#line 34 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = _data_->machine;
#line 34 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_creator_set_post_install_config ((BoxesVMCreator*) _data_->self, _data_->_tmp0_);
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ != 0) {
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 848 "vm-importer.c"
		}
	}
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 33 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 855 "vm-importer.c"
}


void boxes_vm_importer_post_import_setup (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	BOXES_VM_IMPORTER_GET_CLASS (self)->post_import_setup (self, machine, _callback_, _user_data_);
#line 862 "vm-importer.c"
}


void boxes_vm_importer_post_import_setup_finish (BoxesVMImporter* self, GAsyncResult* _res_) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	BOXES_VM_IMPORTER_GET_CLASS (self)->post_import_setup_finish (self, _res_);
#line 869 "vm-importer.c"
}


static void boxes_vm_importer_import_vm_data_free (gpointer _data) {
	BoxesVmImporterImportVmData* _data_;
	_data_ = _data;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_boxes_vm_creator_unref0 (_data_->self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_slice_free (BoxesVmImporterImportVmData, _data_);
#line 882 "vm-importer.c"
}


static void boxes_vm_importer_import_vm (BoxesVMImporter* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmImporterImportVmData* _data_;
	BoxesVMImporter* _tmp0_;
	BoxesLibvirtMachine* _tmp1_;
	BoxesLibvirtMachine* _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_slice_new0 (BoxesVmImporterImportVmData);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_callback_ == NULL) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_task_complete_ = TRUE;
#line 899 "vm-importer.c"
	}
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_vm_importer_import_vm_data_free);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = machine;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->machine = _tmp2_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm_co (_data_);
#line 917 "vm-importer.c"
}


static void boxes_vm_importer_import_vm_finish (BoxesVMImporter* self, GAsyncResult* _res_) {
	BoxesVmImporterImportVmData* _data_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_task_complete_ = TRUE;
#line 927 "vm-importer.c"
}


static void boxes_vm_importer_import_vm_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmImporterImportVmData* _data_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_ = _user_data_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_source_object_ = source_object;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_res_ = _res_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_task_complete_ = TRUE;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm_co (_data_);
#line 943 "vm-importer.c"
}


static gboolean boxes_vm_importer_import_vm_co (BoxesVmImporterImportVmData* _data_) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 952 "vm-importer.c"
		goto _state_0;
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 1:
#line 956 "vm-importer.c"
		goto _state_1;
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 2:
#line 960 "vm-importer.c"
		goto _state_2;
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		case 3:
#line 964 "vm-importer.c"
		goto _state_3;
		default:
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 969 "vm-importer.c"
	}
	_state_0:
	{
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp0_ = _data_->machine;
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp1_ = boxes_libvirt_machine_get_storage_volume (_data_->_tmp0_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp2_ = _data_->_tmp1_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp3_ = gvir_storage_vol_get_path (_data_->_tmp2_, &_data_->_inner_error_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp4_ = g_strdup (_data_->_tmp3_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->destination_path = _data_->_tmp4_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 987 "vm-importer.c"
			goto __catch125_g_error;
		}
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp5_ = boxes_vm_importer_get_source_media (_data_->self);
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp7_ = _data_->destination_path;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_state_ = 1;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		boxes_installed_media_copy (_data_->_tmp6_, _data_->_tmp7_, boxes_vm_importer_import_vm_ready, _data_);
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1002 "vm-importer.c"
		_state_1:
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		boxes_installed_media_copy_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_g_free0 (_data_->destination_path);
#line 1010 "vm-importer.c"
			goto __catch125_g_error;
		}
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp8_ = boxes_vm_creator_get_connection ((BoxesVMCreator*) _data_->self);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_state_ = 2;
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		boxes_ensure_storage_pool (_data_->_tmp10_, boxes_vm_importer_import_vm_ready, _data_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1025 "vm-importer.c"
		_state_2:
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp11_ = boxes_ensure_storage_pool_finish (_data_->_res_, &_data_->_inner_error_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp12_ = _data_->_tmp11_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp12_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp10_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_g_free0 (_data_->destination_path);
#line 1039 "vm-importer.c"
			goto __catch125_g_error;
		}
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_free0 (_data_->destination_path);
#line 1044 "vm-importer.c"
	}
	goto __finally125;
	__catch125_g_error:
	{
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_inner_error_ = NULL;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp13_ = _data_->machine;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp14_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->_tmp13_);
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp15_ = _data_->_tmp14_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp16_ = boxes_vm_importer_get_source_media (_data_->self);
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp17_ = _data_->_tmp16_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp18_ = ((BoxesInstallerMedia*) _data_->_tmp17_)->device_file;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp19_ = _data_->_error_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp20_ = _data_->_tmp19_->message;
#line 46 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_warning ("vm-importer.vala:46: Failed to import box '%s' from file '%s': %s", _data_->_tmp15_, _data_->_tmp18_, _data_->_tmp20_);
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp21_ = boxes_vm_importer_get_source_media (_data_->self);
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp22_ = _data_->_tmp21_;
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp23_ = ((BoxesInstallerMedia*) _data_->_tmp22_)->device_file;
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp24_ = g_strdup_printf (_ ("Box import from file “%s” failed."), _data_->_tmp23_);
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->ui_message = _data_->_tmp24_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp25_ = boxes_app_app;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp26_ = boxes_app_get_main_window (_data_->_tmp25_);
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp27_ = _data_->_tmp26_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp28_ = boxes_app_window_get_notificationbar (_data_->_tmp27_);
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp29_ = _data_->_tmp28_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp30_ = _data_->ui_message;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp31_ = boxes_notificationbar_display_error (_data_->_tmp29_, _data_->_tmp30_, BOXES_NOTIFICATIONBAR_DEFAULT_TIMEOUT);
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp32_ = _data_->_tmp31_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp32_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp33_ = _data_->machine;
#line 52 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		boxes_machine_delete ((BoxesMachine*) _data_->_tmp33_, TRUE);
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_free0 (_data_->ui_message);
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		_g_error_free0 (_data_->_error_);
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		if (_data_->_state_ != 0) {
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			while (_data_->_task_complete_ != TRUE) {
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1115 "vm-importer.c"
			}
		}
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_object_unref (_data_->_async_result);
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1122 "vm-importer.c"
	}
	__finally125:
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_clear_error (&_data_->_inner_error_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		g_object_unref (_data_->_async_result);
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1135 "vm-importer.c"
	}
#line 57 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp34_ = _data_->machine;
#line 57 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 3;
#line 57 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_post_import_setup (_data_->self, _data_->_tmp34_, boxes_vm_importer_import_vm_ready, _data_);
#line 57 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 1145 "vm-importer.c"
	_state_3:
#line 57 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_post_import_setup_finish (_data_->self, _data_->_res_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp35_ = _data_->self->start_after_import;
#line 58 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_data_->_tmp35_) {
#line 1153 "vm-importer.c"
		{
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp36_ = _data_->machine;
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp37_ = boxes_libvirt_machine_get_domain (_data_->_tmp36_);
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp38_ = _data_->_tmp37_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			gvir_domain_start (_data_->_tmp38_, (guint) 0, &_data_->_inner_error_);
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1165 "vm-importer.c"
				goto __catch126_g_error;
			}
		}
		goto __finally126;
		__catch126_g_error:
		{
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_inner_error_ = NULL;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp39_ = _data_->machine;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp40_ = boxes_libvirt_machine_get_domain (_data_->_tmp39_);
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp41_ = _data_->_tmp40_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp42_ = gvir_domain_get_name (_data_->_tmp41_);
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp43_ = _data_->_vala1__error_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp44_ = _data_->_tmp43_->message;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_warning ("vm-importer.vala:62: Failed to start domain '%s': %s", _data_->_tmp42_, _data_->_tmp44_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 1192 "vm-importer.c"
		}
		__finally126:
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_clear_error (&_data_->_inner_error_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_object_unref (_data_->_async_result);
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			return FALSE;
#line 1205 "vm-importer.c"
		}
	}
#line 65 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp45_ = _data_->machine;
#line 65 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_data_->_tmp45_, NULL);
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ != 0) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1220 "vm-importer.c"
		}
	}
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 37 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 1227 "vm-importer.c"
}


BoxesInstalledMedia* boxes_vm_importer_get_source_media (BoxesVMImporter* self) {
	BoxesInstalledMedia* result;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = boxes_vm_creator_get_install_media ((BoxesVMCreator*) self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, BOXES_TYPE_INSTALLED_MEDIA) ? ((BoxesInstalledMedia*) _tmp1_) : NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	return result;
#line 1245 "vm-importer.c"
}


static void boxes_vm_importer_class_init (BoxesVMImporterClass * klass) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_parent_class = g_type_class_peek_parent (klass);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->finalize = boxes_vm_importer_finalize;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->launch_vm = (void (*) (BoxesVMCreator *, BoxesLibvirtMachine*, gint64, GError**)) boxes_vm_importer_real_launch_vm;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->continue_installation = (void (*) (BoxesVMCreator *, BoxesLibvirtMachine*, GAsyncReadyCallback, gpointer)) boxes_vm_importer_real_continue_installation;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->continue_installation_finish = (void (*) (BoxesVMCreator *, GAsyncResult*)) boxes_vm_importer_real_continue_installation_finish;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMImporterClass *) klass)->post_import_setup = (void (*) (BoxesVMImporter *, BoxesLibvirtMachine*, GAsyncReadyCallback, gpointer)) boxes_vm_importer_real_post_import_setup;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	((BoxesVMImporterClass *) klass)->post_import_setup_finish = (void (*) (BoxesVMImporter *, GAsyncResult*)) boxes_vm_importer_real_post_import_setup_finish;
#line 1264 "vm-importer.c"
}


static void boxes_vm_importer_instance_init (BoxesVMImporter * self) {
#line 9 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self->start_after_import = TRUE;
#line 1271 "vm-importer.c"
}


static void boxes_vm_importer_finalize (BoxesVMCreator * obj) {
	BoxesVMImporter * self;
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_IMPORTER, BoxesVMImporter);
#line 6 "/home/fborges/checkout/gnome-boxes/src/vm-importer.vala"
	BOXES_VM_CREATOR_CLASS (boxes_vm_importer_parent_class)->finalize (obj);
#line 1281 "vm-importer.c"
}


GType boxes_vm_importer_get_type (void) {
	static volatile gsize boxes_vm_importer_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_vm_importer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesVMImporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_vm_importer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesVMImporter), 0, (GInstanceInitFunc) boxes_vm_importer_instance_init, NULL };
		GType boxes_vm_importer_type_id;
		boxes_vm_importer_type_id = g_type_register_static (BOXES_TYPE_VM_CREATOR, "BoxesVMImporter", &g_define_type_info, 0);
		g_once_init_leave (&boxes_vm_importer_type_id__volatile, boxes_vm_importer_type_id);
	}
	return boxes_vm_importer_type_id__volatile;
}



