/* libvirt-system-vm-importer.c generated by valac 0.26.0.19-b2255, the Vala compiler
 * generated from libvirt-system-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 <libcommon.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.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_LIBVIRT_SYSTEM_VM_IMPORTER (boxes_libvirt_system_vm_importer_get_type ())
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporter))
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporterClass))
#define BOXES_IS_LIBVIRT_SYSTEM_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER))
#define BOXES_IS_LIBVIRT_SYSTEM_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER))
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporterClass))

typedef struct _BoxesLibvirtSystemVMImporter BoxesLibvirtSystemVMImporter;
typedef struct _BoxesLibvirtSystemVMImporterClass BoxesLibvirtSystemVMImporterClass;
typedef struct _BoxesLibvirtSystemVMImporterPrivate BoxesLibvirtSystemVMImporterPrivate;

#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_LIBVIRT_SYSTEM_MEDIA (boxes_libvirt_system_media_get_type ())
#define BOXES_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))

typedef struct _BoxesLibvirtSystemMedia BoxesLibvirtSystemMedia;
typedef struct _BoxesLibvirtSystemMediaClass BoxesLibvirtSystemMediaClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#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)))
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesLibvirtSystemVmImporterCreateDomainConfigData BoxesLibvirtSystemVmImporterCreateDomainConfigData;

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, GError** error);
	void (*continue_installation) (BoxesVMCreator* self, BoxesLibvirtMachine* machine, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*continue_installation_finish) (BoxesVMCreator* self, GAsyncResult* _res_);
	void (*update_machine_info) (BoxesVMCreator* self, BoxesLibvirtMachine* machine);
	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;
};

struct _BoxesLibvirtSystemVMImporter {
	BoxesVMImporter parent_instance;
	BoxesLibvirtSystemVMImporterPrivate * priv;
};

struct _BoxesLibvirtSystemVMImporterClass {
	BoxesVMImporterClass parent_class;
};

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_);
	void (*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_, GError** error);
	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 _BoxesLibvirtSystemVmImporterCreateDomainConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesLibvirtSystemVMImporter* self;
	gchar* name;
	gchar* title;
	GVirStorageVol* volume;
	GCancellable* cancellable;
	GVirConfigDomain* result;
	BoxesLibvirtSystemMedia* media;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	BoxesLibvirtSystemMedia* _tmp2_;
	GVirConfigDomain* config;
	BoxesLibvirtSystemMedia* _tmp3_;
	GVirConfigDomain* _tmp4_;
	GVirConfigDomain* _tmp5_;
	GVirConfigDomain* _tmp6_;
	GVirConfigDomain* _tmp7_;
	const gchar* _tmp8_;
	GVirConfigDomain* _tmp9_;
	const gchar* _tmp10_;
	GVirConfigDomain* _tmp11_;
	BoxesInstallerMedia* _tmp12_;
	BoxesInstallerMedia* _tmp13_;
	GList* devices;
	GVirConfigDomain* _tmp14_;
	GList* _tmp15_;
	GList* _tmp16_;
	GList* device_collection;
	GList* device_it;
	GVirConfigDomainDevice* _tmp17_;
	GVirConfigDomainDevice* device;
	GVirConfigDomainDevice* _tmp18_;
	GVirConfigDomainDisk* disk;
	GVirConfigDomainDevice* _tmp19_;
	GVirConfigDomainDisk* _tmp20_;
	GVirConfigDomainDisk* _tmp21_;
	const gchar* _tmp22_;
	BoxesLibvirtSystemMedia* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	GVirStorageVol* _tmp26_;
	const gchar* _tmp27_;
	GVirConfigDomainDisk* _tmp28_;
	GVirConfigDomain* _tmp29_;
	GList* _tmp30_;
	GError * _inner_error_;
};


static gpointer boxes_libvirt_system_vm_importer_parent_class = NULL;

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_libvirt_system_vm_importer_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_LIBVIRT_SYSTEM_VM_IMPORTER_DUMMY_PROPERTY
};
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GType boxes_installed_media_get_type (void) G_GNUC_CONST;
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
BoxesVMImporter* boxes_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesVMImporter* boxes_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_new_for_import_completion (BoxesLibvirtMachine* machine);
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_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_libvirt_system_vm_importer_real_create_domain_base_name_and_title (BoxesVMCreator* base, gchar** base_name, gchar** base_title);
GType boxes_libvirt_system_media_get_type (void) G_GNUC_CONST;
BoxesInstallerMedia* boxes_vm_creator_get_install_media (BoxesVMCreator* self);
GVirConfigDomain* boxes_libvirt_system_media_get_domain_config (BoxesLibvirtSystemMedia* self);
static void boxes_libvirt_system_vm_importer_real_create_domain_config_data_free (gpointer _data);
static void boxes_libvirt_system_vm_importer_real_create_domain_config (BoxesVMCreator* base, const gchar* name, const gchar* title, GVirStorageVol* volume, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_libvirt_system_vm_importer_real_create_domain_config_co (BoxesLibvirtSystemVmImporterCreateDomainConfigData* _data_);
void boxes_vm_configurator_setup_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);


BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media) {
	BoxesLibvirtSystemVMImporter* self = NULL;
	BoxesInstalledMedia* _tmp0_ = NULL;
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_return_val_if_fail (source_media != NULL, NULL);
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp0_ = source_media;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	self = (BoxesLibvirtSystemVMImporter*) boxes_vm_importer_construct (object_type, _tmp0_);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	((BoxesVMImporter*) self)->start_after_import = FALSE;
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return self;
#line 295 "libvirt-system-vm-importer.c"
}


BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_new (BoxesInstalledMedia* source_media) {
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return boxes_libvirt_system_vm_importer_construct (BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, source_media);
#line 302 "libvirt-system-vm-importer.c"
}


BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_construct_for_import_completion (GType object_type, BoxesLibvirtMachine* machine) {
	BoxesLibvirtSystemVMImporter* self = NULL;
	BoxesLibvirtMachine* _tmp0_ = NULL;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_return_val_if_fail (machine != NULL, NULL);
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp0_ = machine;
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	self = (BoxesLibvirtSystemVMImporter*) boxes_vm_creator_construct_for_install_completion (object_type, _tmp0_);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	((BoxesVMImporter*) self)->start_after_import = FALSE;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return self;
#line 319 "libvirt-system-vm-importer.c"
}


BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_new_for_import_completion (BoxesLibvirtMachine* machine) {
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return boxes_libvirt_system_vm_importer_construct_for_import_completion (BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, machine);
#line 326 "libvirt-system-vm-importer.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return self ? g_object_ref (self) : NULL;
#line 333 "libvirt-system-vm-importer.c"
}


static void boxes_libvirt_system_vm_importer_real_create_domain_base_name_and_title (BoxesVMCreator* base, gchar** base_name, gchar** base_title) {
	BoxesLibvirtSystemVMImporter * self;
	gchar* _vala_base_name = NULL;
	gchar* _vala_base_title = NULL;
	BoxesLibvirtSystemMedia* media = NULL;
	BoxesInstallerMedia* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
	BoxesLibvirtSystemMedia* _tmp2_ = NULL;
	BoxesLibvirtSystemMedia* _tmp3_ = NULL;
	GVirConfigDomain* _tmp4_ = NULL;
	GVirConfigDomain* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	BoxesLibvirtSystemMedia* _tmp10_ = NULL;
	GVirConfigDomain* _tmp11_ = NULL;
	GVirConfigDomain* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	gchar* _tmp16_ = NULL;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	self = (BoxesLibvirtSystemVMImporter*) base;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp0_ = boxes_vm_creator_get_install_media ((BoxesVMCreator*) self);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp1_ = _tmp0_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA) ? ((BoxesLibvirtSystemMedia*) _tmp1_) : NULL);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	media = _tmp2_;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp3_ = media;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp4_ = boxes_libvirt_system_media_get_domain_config (_tmp3_);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp5_ = _tmp4_;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp6_ = gvir_config_domain_get_name (_tmp5_);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp7_ = _tmp6_;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp8_ = g_strdup (_tmp7_);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_vala_base_name);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_vala_base_name = _tmp8_;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp10_ = media;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp11_ = boxes_libvirt_system_media_get_domain_config (_tmp10_);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp12_ = _tmp11_;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp13_ = gvir_config_domain_get_title (_tmp12_);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp14_ = _tmp13_;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp9_ = _tmp14_;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (_tmp9_ == NULL) {
#line 398 "libvirt-system-vm-importer.c"
		const gchar* _tmp15_ = NULL;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		_tmp15_ = _vala_base_name;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		_tmp9_ = _tmp15_;
#line 404 "libvirt-system-vm-importer.c"
	}
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp16_ = g_strdup (_tmp9_);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_vala_base_title);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_vala_base_title = _tmp16_;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (media);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (base_name) {
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		*base_name = _vala_base_name;
#line 418 "libvirt-system-vm-importer.c"
	} else {
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		_g_free0 (_vala_base_name);
#line 422 "libvirt-system-vm-importer.c"
	}
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (base_title) {
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		*base_title = _vala_base_title;
#line 428 "libvirt-system-vm-importer.c"
	} else {
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		_g_free0 (_vala_base_title);
#line 432 "libvirt-system-vm-importer.c"
	}
}


static void boxes_libvirt_system_vm_importer_real_create_domain_config_data_free (gpointer _data) {
	BoxesLibvirtSystemVmImporterCreateDomainConfigData* _data_;
	_data_ = _data;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_data_->name);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_data_->title);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->volume);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->cancellable);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->result);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_boxes_vm_creator_unref0 (_data_->self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_slice_free (BoxesLibvirtSystemVmImporterCreateDomainConfigData, _data_);
#line 454 "libvirt-system-vm-importer.c"
}


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


static void boxes_libvirt_system_vm_importer_real_create_domain_config (BoxesVMCreator* base, const gchar* name, const gchar* title, GVirStorageVol* volume, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesLibvirtSystemVMImporter * self;
	BoxesLibvirtSystemVmImporterCreateDomainConfigData* _data_;
	BoxesLibvirtSystemVMImporter* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GVirStorageVol* _tmp5_ = NULL;
	GVirStorageVol* _tmp6_ = NULL;
	GCancellable* _tmp7_ = NULL;
	GCancellable* _tmp8_ = NULL;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	self = (BoxesLibvirtSystemVMImporter*) base;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_ = g_slice_new0 (BoxesLibvirtSystemVmImporterCreateDomainConfigData);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_libvirt_system_vm_importer_real_create_domain_config);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_libvirt_system_vm_importer_real_create_domain_config_data_free);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp0_ = _boxes_vm_creator_ref0 (self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->self = _tmp0_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp1_ = name;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_data_->name);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->name = _tmp2_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp3_ = title;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_free0 (_data_->title);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->title = _tmp4_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp5_ = volume;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->volume);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->volume = _tmp6_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp7_ = cancellable;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->cancellable);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->cancellable = _tmp8_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	boxes_libvirt_system_vm_importer_real_create_domain_config_co (_data_);
#line 523 "libvirt-system-vm-importer.c"
}


static GVirConfigDomain* boxes_libvirt_system_vm_importer_real_create_domain_config_finish (BoxesVMCreator* base, GAsyncResult* _res_, GError** error) {
	GVirConfigDomain* result;
	BoxesLibvirtSystemVmImporterCreateDomainConfigData* _data_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		return NULL;
#line 534 "libvirt-system-vm-importer.c"
	}
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	result = _data_->result;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->result = NULL;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return result;
#line 544 "libvirt-system-vm-importer.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 551 "libvirt-system-vm-importer.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_list_free (self);
#line 560 "libvirt-system-vm-importer.c"
}


static gboolean boxes_libvirt_system_vm_importer_real_create_domain_config_co (BoxesLibvirtSystemVmImporterCreateDomainConfigData* _data_) {
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	switch (_data_->_state_) {
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		case 0:
#line 569 "libvirt-system-vm-importer.c"
		goto _state_0;
		default:
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		g_assert_not_reached ();
#line 574 "libvirt-system-vm-importer.c"
	}
	_state_0:
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp0_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp0_ = boxes_vm_creator_get_install_media ((BoxesVMCreator*) _data_->self);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp1_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp1_ = _data_->_tmp0_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp2_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp1_, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA) ? ((BoxesLibvirtSystemMedia*) _data_->_tmp1_) : NULL);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->media = _data_->_tmp2_;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp3_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp3_ = _data_->media;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp4_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp4_ = boxes_libvirt_system_media_get_domain_config (_data_->_tmp3_);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp5_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp6_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp6_ = _g_object_ref0 (_data_->_tmp5_);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->config = _data_->_tmp6_;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp7_ = NULL;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp7_ = _data_->config;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp8_ = NULL;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp8_ = _data_->name;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	gvir_config_domain_set_name (_data_->_tmp7_, _data_->_tmp8_);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp9_ = NULL;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp9_ = _data_->config;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp10_ = NULL;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp10_ = _data_->title;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	gvir_config_domain_set_title (_data_->_tmp9_, _data_->_tmp10_);
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp11_ = NULL;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp11_ = _data_->config;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp12_ = NULL;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp12_ = boxes_vm_creator_get_install_media ((BoxesVMCreator*) _data_->self);
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp13_ = NULL;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp13_ = _data_->_tmp12_;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	boxes_vm_configurator_setup_custom_xml (_data_->_tmp11_, _data_->_tmp13_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp14_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp14_ = _data_->config;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp15_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp15_ = gvir_config_domain_get_devices (_data_->_tmp14_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->devices = _data_->_tmp15_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp16_ = NULL;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp16_ = _data_->devices;
#line 657 "libvirt-system-vm-importer.c"
	{
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		_data_->device_collection = _data_->_tmp16_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		for (_data_->device_it = _data_->device_collection; _data_->device_it != NULL; _data_->device_it = _data_->device_it->next) {
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
			_data_->_tmp17_ = NULL;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
			_data_->_tmp17_ = _g_object_ref0 ((GVirConfigDomainDevice*) _data_->device_it->data);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
			_data_->device = _data_->_tmp17_;
#line 669 "libvirt-system-vm-importer.c"
			{
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp18_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp18_ = _data_->device;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp18_, gvir_config_domain_disk_get_type ())) {
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_g_object_unref0 (_data_->device);
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					continue;
#line 681 "libvirt-system-vm-importer.c"
				}
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp19_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp19_ = _data_->device;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp20_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp19_, gvir_config_domain_disk_get_type ()) ? ((GVirConfigDomainDisk*) _data_->_tmp19_) : NULL);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->disk = _data_->_tmp20_;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp21_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp21_ = _data_->disk;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp22_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp22_ = gvir_config_domain_disk_get_source (_data_->_tmp21_);
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp23_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp23_ = _data_->media;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp24_ = NULL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_data_->_tmp24_ = ((BoxesInstallerMedia*) _data_->_tmp23_)->device_file;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				if (g_strcmp0 (_data_->_tmp22_, _data_->_tmp24_) == 0) {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp26_ = NULL;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp26_ = _data_->volume;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp27_ = NULL;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp27_ = gvir_storage_vol_get_path (_data_->_tmp26_, &_data_->_inner_error_);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp25_ = _data_->_tmp27_;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						g_error_free (_data_->_inner_error_);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						_g_object_unref0 (_data_->disk);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						_g_object_unref0 (_data_->device);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						__g_list_free__g_object_unref0_0 (_data_->devices);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						_g_object_unref0 (_data_->config);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						_g_object_unref0 (_data_->media);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						if (_data_->_state_ == 0) {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
							g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 741 "libvirt-system-vm-importer.c"
						} else {
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
							g_simple_async_result_complete (_data_->_async_result);
#line 745 "libvirt-system-vm-importer.c"
						}
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						g_object_unref (_data_->_async_result);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
						return FALSE;
#line 751 "libvirt-system-vm-importer.c"
					}
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp28_ = NULL;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_data_->_tmp28_ = _data_->disk;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					gvir_config_domain_disk_set_source (_data_->_tmp28_, _data_->_tmp25_);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_g_object_unref0 (_data_->disk);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					_g_object_unref0 (_data_->device);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
					break;
#line 765 "libvirt-system-vm-importer.c"
				}
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_g_object_unref0 (_data_->disk);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
				_g_object_unref0 (_data_->device);
#line 771 "libvirt-system-vm-importer.c"
			}
		}
	}
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp29_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp29_ = _data_->config;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp30_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->_tmp30_ = _data_->devices;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	gvir_config_domain_set_devices (_data_->_tmp29_, _data_->_tmp30_);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_data_->result = _data_->config;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	__g_list_free__g_object_unref0_0 (_data_->devices);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->media);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (_data_->_state_ == 0) {
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 795 "libvirt-system-vm-importer.c"
	} else {
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 799 "libvirt-system-vm-importer.c"
	}
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return FALSE;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	__g_list_free__g_object_unref0_0 (_data_->devices);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->config);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	_g_object_unref0 (_data_->media);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	if (_data_->_state_ == 0) {
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 815 "libvirt-system-vm-importer.c"
	} else {
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 819 "libvirt-system-vm-importer.c"
	}
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	g_object_unref (_data_->_async_result);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	return FALSE;
#line 825 "libvirt-system-vm-importer.c"
}


static void boxes_libvirt_system_vm_importer_class_init (BoxesLibvirtSystemVMImporterClass * klass) {
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	boxes_libvirt_system_vm_importer_parent_class = g_type_class_peek_parent (klass);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->create_domain_base_name_and_title = boxes_libvirt_system_vm_importer_real_create_domain_base_name_and_title;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->create_domain_config = boxes_libvirt_system_vm_importer_real_create_domain_config;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-vm-importer.vala"
	((BoxesVMCreatorClass *) klass)->create_domain_config_finish = boxes_libvirt_system_vm_importer_real_create_domain_config_finish;
#line 838 "libvirt-system-vm-importer.c"
}


static void boxes_libvirt_system_vm_importer_instance_init (BoxesLibvirtSystemVMImporter * self) {
}


GType boxes_libvirt_system_vm_importer_get_type (void) {
	static volatile gsize boxes_libvirt_system_vm_importer_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_libvirt_system_vm_importer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesLibvirtSystemVMImporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_libvirt_system_vm_importer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesLibvirtSystemVMImporter), 0, (GInstanceInitFunc) boxes_libvirt_system_vm_importer_instance_init, NULL };
		GType boxes_libvirt_system_vm_importer_type_id;
		boxes_libvirt_system_vm_importer_type_id = g_type_register_static (BOXES_TYPE_VM_IMPORTER, "BoxesLibvirtSystemVMImporter", &g_define_type_info, 0);
		g_once_init_leave (&boxes_libvirt_system_vm_importer_type_id__volatile, boxes_libvirt_system_vm_importer_type_id);
	}
	return boxes_libvirt_system_vm_importer_type_id__volatile;
}



