/* vm-importer.c generated by valac 0.32.0.73-ab1d1, 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>
#include <libgd/gd.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;

#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 _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_;
	GSimpleAsyncResult* _async_result;
	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_;
	GSimpleAsyncResult* _async_result;
	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_;
	GSimpleAsyncResult* _async_result;
	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;
	const gchar* _tmp21_;
	BoxesInstalledMedia* _tmp22_;
	BoxesInstalledMedia* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	BoxesApp* _tmp26_;
	BoxesAppWindow* _tmp27_;
	BoxesAppWindow* _tmp28_;
	BoxesNotificationbar* _tmp29_;
	BoxesNotificationbar* _tmp30_;
	const gchar* _tmp31_;
	GdNotification* _tmp32_;
	GdNotification* _tmp33_;
	BoxesLibvirtMachine* _tmp34_;
	BoxesLibvirtMachine* _tmp35_;
	gboolean _tmp36_;
	BoxesLibvirtMachine* _tmp37_;
	GVirDomain* _tmp38_;
	GVirDomain* _tmp39_;
	GError* _vala1__error_;
	BoxesLibvirtMachine* _tmp40_;
	GVirDomain* _tmp41_;
	GVirDomain* _tmp42_;
	const gchar* _tmp43_;
	GError* _tmp44_;
	const gchar* _tmp45_;
	BoxesLibvirtMachine* _tmp46_;
	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;
enum  {
	BOXES_VM_IMPORTER_DUMMY_PROPERTY
};
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);
GdNotification* 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_ = NULL;
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_return_val_if_fail (source_media != NULL, NULL);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = source_media;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) boxes_vm_creator_construct (object_type, (BoxesInstallerMedia*) _tmp0_);
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return self;
#line 494 "vm-importer.c"
}


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


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


BoxesVMImporter* boxes_vm_importer_new_for_import_completion (BoxesLibvirtMachine* machine) {
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return boxes_vm_importer_construct_for_import_completion (BOXES_TYPE_VM_IMPORTER, machine);
#line 523 "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_ = NULL;
	gint64 _tmp1_ = 0LL;
	gint64 _tmp2_ = 0LL;
	BoxesLibvirtMachine* _tmp5_ = NULL;
	BoxesBoxConfig* _tmp6_ = NULL;
	BoxesLibvirtMachine* _tmp7_ = NULL;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) base;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_return_if_fail (machine != NULL);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = machine;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_tmp0_, (BoxesVMCreator*) self);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = access_last_time;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (_tmp2_ > ((gint64) 0)) {
#line 547 "vm-importer.c"
		gint64 _tmp3_ = 0LL;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_tmp3_ = access_last_time;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_tmp1_ = _tmp3_;
#line 553 "vm-importer.c"
	} else {
		gint64 _tmp4_ = 0LL;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_tmp4_ = g_get_real_time ();
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_tmp1_ = _tmp4_;
#line 560 "vm-importer.c"
	}
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp5_ = machine;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp6_ = ((BoxesMachine*) _tmp5_)->config;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_box_config_set_access_last_time (_tmp6_, _tmp1_);
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp7_ = machine;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm (self, _tmp7_, NULL, NULL);
#line 572 "vm-importer.c"
}


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


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


static gpointer _g_object_ref0 (gpointer self) {
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return self ? g_object_ref (self) : NULL;
#line 599 "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_ = NULL;
	BoxesLibvirtMachine* _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_ = NULL;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	self = (BoxesVMImporter*) base;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_ = g_slice_new0 (BoxesVmImporterContinueInstallationData);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_vm_importer_real_continue_installation);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_importer_real_continue_installation_data_free);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = machine;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->machine = _tmp2_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_real_continue_installation_co (_data_);
#line 631 "vm-importer.c"
}


static void boxes_vm_importer_real_continue_installation_finish (BoxesVMCreator* base, GAsyncResult* _res_) {
	BoxesVmImporterContinueInstallationData* _data_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 639 "vm-importer.c"
}


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


static gboolean boxes_vm_importer_real_continue_installation_co (BoxesVmImporterContinueInstallationData* _data_) {
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 662 "vm-importer.c"
		goto _state_0;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 1:
#line 666 "vm-importer.c"
		goto _state_1;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 2:
#line 670 "vm-importer.c"
		goto _state_2;
		default:
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 675 "vm-importer.c"
	}
	_state_0:
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = boxes_media_manager_get_instance ();
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp1_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp2_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp2_ = _data_->machine;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp3_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp3_ = boxes_libvirt_machine_get_domain_config (_data_->_tmp2_);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp4_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 1;
#line 27 "/home/zeenix/checkout/gnome/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/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 704 "vm-importer.c"
	_state_1:
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp5_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp5_ = boxes_media_manager_create_installer_media_from_config_finish (_data_->_tmp1_, _data_->_res_);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp6_ = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_creator_set_install_media ((BoxesVMCreator*) _data_->self, _data_->_tmp6_);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->_tmp6_);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->_tmp1_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp7_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp7_ = _data_->machine;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_data_->_tmp7_, (BoxesVMCreator*) _data_->self);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp8_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp8_ = _data_->machine;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 2;
#line 30 "/home/zeenix/checkout/gnome/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/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 736 "vm-importer.c"
	_state_2:
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_import_vm_finish (_data_->self, _data_->_res_);
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ == 0) {
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 744 "vm-importer.c"
	} else {
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 748 "vm-importer.c"
	}
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 754 "vm-importer.c"
}


static void boxes_vm_importer_real_post_import_setup_data_free (gpointer _data) {
	BoxesVmImporterPostImportSetupData* _data_;
	_data_ = _data;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_boxes_vm_creator_unref0 (_data_->self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_slice_free (BoxesVmImporterPostImportSetupData, _data_);
#line 767 "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_ = NULL;
	BoxesLibvirtMachine* _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_ = NULL;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_ = g_slice_new0 (BoxesVmImporterPostImportSetupData);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_vm_importer_real_post_import_setup);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_importer_real_post_import_setup_data_free);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp1_ = machine;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_g_object_unref0 (_data_->machine);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->machine = _tmp2_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_real_post_import_setup_co (_data_);
#line 796 "vm-importer.c"
}


static void boxes_vm_importer_real_post_import_setup_finish (BoxesVMImporter* self, GAsyncResult* _res_) {
	BoxesVmImporterPostImportSetupData* _data_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 804 "vm-importer.c"
}


static gboolean boxes_vm_importer_real_post_import_setup_co (BoxesVmImporterPostImportSetupData* _data_) {
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 813 "vm-importer.c"
		goto _state_0;
		default:
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 818 "vm-importer.c"
	}
	_state_0:
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = NULL;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp0_ = _data_->machine;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_creator_set_post_install_config ((BoxesVMCreator*) _data_->self, _data_->_tmp0_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ == 0) {
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 831 "vm-importer.c"
	} else {
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 835 "vm-importer.c"
	}
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 841 "vm-importer.c"
}


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


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


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


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


static void boxes_vm_importer_import_vm_finish (BoxesVMImporter* self, GAsyncResult* _res_) {
	BoxesVmImporterImportVmData* _data_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 905 "vm-importer.c"
}


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


static gboolean boxes_vm_importer_import_vm_co (BoxesVmImporterImportVmData* _data_) {
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	switch (_data_->_state_) {
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 0:
#line 928 "vm-importer.c"
		goto _state_0;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 1:
#line 932 "vm-importer.c"
		goto _state_1;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 2:
#line 936 "vm-importer.c"
		goto _state_2;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		case 3:
#line 940 "vm-importer.c"
		goto _state_3;
		default:
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_assert_not_reached ();
#line 945 "vm-importer.c"
	}
	_state_0:
	{
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp0_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp0_ = _data_->machine;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp1_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp1_ = boxes_libvirt_machine_get_storage_volume (_data_->_tmp0_);
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp2_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp2_ = _data_->_tmp1_;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp3_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp3_ = gvir_storage_vol_get_path (_data_->_tmp2_, &_data_->_inner_error_);
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp4_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp4_ = g_strdup (_data_->_tmp3_);
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->destination_path = _data_->_tmp4_;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 973 "vm-importer.c"
			goto __catch116_g_error;
		}
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp5_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp5_ = boxes_vm_importer_get_source_media (_data_->self);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp6_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp7_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp7_ = _data_->destination_path;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_state_ = 1;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		boxes_installed_media_copy (_data_->_tmp6_, _data_->_tmp7_, boxes_vm_importer_import_vm_ready, _data_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 994 "vm-importer.c"
		_state_1:
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		boxes_installed_media_copy_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_g_free0 (_data_->destination_path);
#line 1002 "vm-importer.c"
			goto __catch116_g_error;
		}
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp8_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp8_ = boxes_vm_creator_get_connection ((BoxesVMCreator*) _data_->self);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp9_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp10_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_state_ = 2;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		boxes_ensure_storage_pool (_data_->_tmp10_, boxes_vm_importer_import_vm_ready, _data_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1023 "vm-importer.c"
		_state_2:
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp11_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp11_ = boxes_ensure_storage_pool_finish (_data_->_res_, &_data_->_inner_error_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp12_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp12_ = _data_->_tmp11_;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp12_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp10_);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_g_free0 (_data_->destination_path);
#line 1041 "vm-importer.c"
			goto __catch116_g_error;
		}
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_free0 (_data_->destination_path);
#line 1046 "vm-importer.c"
	}
	goto __finally116;
	__catch116_g_error:
	{
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_inner_error_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp13_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp13_ = _data_->machine;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp14_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp14_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data_->_tmp13_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp15_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp15_ = _data_->_tmp14_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp16_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp16_ = boxes_vm_importer_get_source_media (_data_->self);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp17_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp17_ = _data_->_tmp16_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp18_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp18_ = ((BoxesInstallerMedia*) _data_->_tmp17_)->device_file;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp19_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp19_ = _data_->_error_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp20_ = NULL;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp20_ = _data_->_tmp19_->message;
#line 46 "/home/zeenix/checkout/gnome/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/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp21_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp21_ = _ ("Box import from file '%s' failed.");
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp22_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp22_ = boxes_vm_importer_get_source_media (_data_->self);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp23_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp24_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp24_ = ((BoxesInstallerMedia*) _data_->_tmp23_)->device_file;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp25_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp25_ = g_strdup_printf (_data_->_tmp21_, _data_->_tmp24_);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->ui_message = _data_->_tmp25_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp26_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp26_ = boxes_app_app;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp27_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp27_ = boxes_app_get_main_window (_data_->_tmp26_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp28_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp28_ = _data_->_tmp27_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp29_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp29_ = boxes_app_window_get_notificationbar (_data_->_tmp28_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp30_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp30_ = _data_->_tmp29_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp31_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp31_ = _data_->ui_message;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp32_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp32_ = boxes_notificationbar_display_error (_data_->_tmp30_, _data_->_tmp31_, BOXES_NOTIFICATIONBAR_DEFAULT_TIMEOUT);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp33_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp33_ = _data_->_tmp32_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_object_unref0 (_data_->_tmp33_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp34_ = NULL;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_data_->_tmp34_ = _data_->machine;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		boxes_machine_delete ((BoxesMachine*) _data_->_tmp34_, TRUE);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_free0 (_data_->ui_message);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		_g_error_free0 (_data_->_error_);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		if (_data_->_state_ == 0) {
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1159 "vm-importer.c"
		} else {
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1163 "vm-importer.c"
		}
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_object_unref (_data_->_async_result);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1169 "vm-importer.c"
	}
	__finally116:
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 38 "/home/zeenix/checkout/gnome/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/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_clear_error (&_data_->_inner_error_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		return FALSE;
#line 1180 "vm-importer.c"
	}
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp35_ = NULL;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp35_ = _data_->machine;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_state_ = 3;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_post_import_setup (_data_->self, _data_->_tmp35_, boxes_vm_importer_import_vm_ready, _data_);
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 1192 "vm-importer.c"
	_state_3:
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_post_import_setup_finish (_data_->self, _data_->_res_);
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp36_ = FALSE;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp36_ = _data_->self->start_after_import;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (_data_->_tmp36_) {
#line 1202 "vm-importer.c"
		{
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp37_ = NULL;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp37_ = _data_->machine;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp38_ = NULL;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp38_ = boxes_libvirt_machine_get_domain (_data_->_tmp37_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp39_ = NULL;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp39_ = _data_->_tmp38_;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			gvir_domain_start (_data_->_tmp39_, (guint) 0, &_data_->_inner_error_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1220 "vm-importer.c"
				goto __catch117_g_error;
			}
		}
		goto __finally117;
		__catch117_g_error:
		{
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_inner_error_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp40_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp40_ = _data_->machine;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp41_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp41_ = boxes_libvirt_machine_get_domain (_data_->_tmp40_);
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp42_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp42_ = _data_->_tmp41_;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp43_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp43_ = gvir_domain_get_name (_data_->_tmp42_);
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp44_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp44_ = _data_->_vala1__error_;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp45_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_data_->_tmp45_ = _data_->_tmp44_->message;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			g_warning ("vm-importer.vala:62: Failed to start domain '%s': %s", _data_->_tmp43_, _data_->_tmp45_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 1259 "vm-importer.c"
		}
		__finally117:
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 59 "/home/zeenix/checkout/gnome/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/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			g_clear_error (&_data_->_inner_error_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
			return FALSE;
#line 1270 "vm-importer.c"
		}
	}
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp46_ = NULL;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	_data_->_tmp46_ = _data_->machine;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_libvirt_machine_set_vm_creator (_data_->_tmp46_, NULL);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	if (_data_->_state_ == 0) {
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1283 "vm-importer.c"
	} else {
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1287 "vm-importer.c"
	}
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	return FALSE;
#line 1293 "vm-importer.c"
}


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


static void boxes_vm_importer_class_init (BoxesVMImporterClass * klass) {
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	boxes_vm_importer_parent_class = g_type_class_peek_parent (klass);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->finalize = boxes_vm_importer_finalize;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->launch_vm = boxes_vm_importer_real_launch_vm;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->continue_installation = boxes_vm_importer_real_continue_installation;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->continue_installation_finish = boxes_vm_importer_real_continue_installation_finish;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMImporterClass *) klass)->post_import_setup = boxes_vm_importer_real_post_import_setup;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	((BoxesVMImporterClass *) klass)->post_import_setup_finish = boxes_vm_importer_real_post_import_setup_finish;
#line 1330 "vm-importer.c"
}


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


static void boxes_vm_importer_finalize (BoxesVMCreator* obj) {
	BoxesVMImporter * self;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_IMPORTER, BoxesVMImporter);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-importer.vala"
	BOXES_VM_CREATOR_CLASS (boxes_vm_importer_parent_class)->finalize (obj);
#line 1347 "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;
}



