/* installer-media.c generated by valac 0.18.0.79-04df6, the Vala compiler
 * generated from installer-media.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libcommon.h>
#include <osinfo/osinfo.h>
#include <gudev/gudev.h>
#include <glib/gi18n-lib.h>


#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;
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_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 _BoxesInstallerMediaCreateForPathData BoxesInstallerMediaCreateForPathData;

#define BOXES_TYPE_OS_DATABASE (boxes_os_database_get_type ())
#define BOXES_OS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_OS_DATABASE, BoxesOSDatabase))
#define BOXES_OS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_OS_DATABASE, BoxesOSDatabaseClass))
#define BOXES_IS_OS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_OS_DATABASE))
#define BOXES_IS_OS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_OS_DATABASE))
#define BOXES_OS_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_OS_DATABASE, BoxesOSDatabaseClass))

typedef struct _BoxesOSDatabase BoxesOSDatabase;
typedef struct _BoxesOSDatabaseClass BoxesOSDatabaseClass;
typedef struct _BoxesInstallerMediaSetupForPathData BoxesInstallerMediaSetupForPathData;
typedef struct _BoxesInstallerMediaPrepareForInstallationData BoxesInstallerMediaPrepareForInstallationData;
#define __g_list_free__boxes_pair_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__boxes_pair_unref0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesInstallerMediaGetDeviceFromPathData BoxesInstallerMediaGetDeviceFromPathData;

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_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 (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_vbox) (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
	GList* (*get_vm_properties) (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_supports_virtio_disk) (BoxesInstallerMedia* self);
};

struct _BoxesInstallerMediaCreateForPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	gchar* path;
	BoxesMediaManager* media_manager;
	GCancellable* cancellable;
	BoxesInstallerMedia* result;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* media;
	const gchar* _tmp1_;
	BoxesMediaManager* _tmp2_;
	GCancellable* _tmp3_;
	GError * _inner_error_;
};

typedef enum  {
	BOXES_OS_DATABASE_ERROR_NON_BOOTABLE,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_MEDIA_ID
} BoxesOSDatabaseError;
#define BOXES_OS_DATABASE_ERROR boxes_os_database_error_quark ()
struct _BoxesInstallerMediaSetupForPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstallerMedia* self;
	gchar* path;
	BoxesMediaManager* media_manager;
	GCancellable* cancellable;
	const gchar* _tmp0_;
	BoxesMediaManager* _tmp1_;
	GUdevClient* _tmp2_;
	GUdevClient* _tmp3_;
	GCancellable* _tmp4_;
	GUdevDevice* _tmp5_;
	GUdevDevice* device;
	GUdevDevice* _tmp6_;
	GUdevDevice* _tmp7_;
	BoxesMediaManager* _tmp8_;
	BoxesOSDatabase* _tmp9_;
	BoxesOSDatabase* _tmp10_;
	BoxesMediaManager* _tmp11_;
	BoxesOSDatabase* _tmp12_;
	BoxesOSDatabase* _tmp13_;
	const gchar* _tmp14_;
	GCancellable* _tmp15_;
	OsinfoMedia* _tmp16_;
	OsinfoOs* _tmp17_;
	OsinfoOs* _tmp18_;
	gchar* _tmp19_;
	OsinfoMedia* _tmp20_;
	OsinfoMedia* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* architecture;
	BoxesMediaManager* _tmp27_;
	BoxesOSDatabase* _tmp28_;
	BoxesOSDatabase* _tmp29_;
	OsinfoOs* _tmp30_;
	const gchar* _tmp31_;
	OsinfoResources* _tmp32_;
	GError * _inner_error_;
};

struct _BoxesInstallerMediaPrepareForInstallationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstallerMedia* self;
	gchar* vm_name;
	GCancellable* cancellable;
};

struct _BoxesInstallerMediaGetDeviceFromPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstallerMedia* self;
	gchar* path;
	GUdevClient* client;
	GCancellable* cancellable;
	GUdevDevice* result;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* mount_dir;
	GCancellable* _tmp2_;
	GMount* _tmp3_;
	GMount* mount;
	GFile* _tmp4_;
	GFile* root_dir;
	GFile* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_;
	GVolume* _tmp11_;
	GVolume* volume;
	GVolume* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	GError* _error_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	GUdevClient* _tmp20_;
	const gchar* _tmp21_;
	GUdevDevice* _tmp22_;
	GError * _inner_error_;
};


static gpointer boxes_installer_media_parent_class = NULL;

GType boxes_installer_media_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_INSTALLER_MEDIA_DUMMY_PROPERTY,
	BOXES_INSTALLER_MEDIA_INSTALLED_SIZE,
	BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION,
	BOXES_INSTALLER_MEDIA_READY_TO_CREATE,
	BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK,
	BOXES_INSTALLER_MEDIA_LIVE
};
BoxesInstallerMedia* boxes_installer_media_new_from_iso_info (const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources);
BoxesInstallerMedia* boxes_installer_media_construct_from_iso_info (GType object_type, const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources);
static void boxes_installer_media_setup_label (BoxesInstallerMedia* self, const gchar* label);
static void boxes_installer_media_create_for_path_data_free (gpointer _data);
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
void boxes_installer_media_create_for_path (const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_installer_media_create_for_path_finish (GAsyncResult* _res_, GError** error);
static gboolean boxes_installer_media_create_for_path_co (BoxesInstallerMediaCreateForPathData* _data_);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
static void boxes_installer_media_setup_for_path (BoxesInstallerMedia* self, const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_installer_media_setup_for_path_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
static void boxes_installer_media_create_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_installer_media_setup_for_path_data_free (gpointer _data);
static gboolean boxes_installer_media_setup_for_path_co (BoxesInstallerMediaSetupForPathData* _data_);
static void boxes_installer_media_get_device_from_path (BoxesInstallerMedia* self, const gchar* path, GUdevClient* client, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GUdevDevice* boxes_installer_media_get_device_from_path_finish (BoxesInstallerMedia* self, GAsyncResult* _res_);
GUdevClient* boxes_media_manager_get_client (BoxesMediaManager* self);
static void boxes_installer_media_setup_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gpointer boxes_os_database_ref (gpointer instance);
void boxes_os_database_unref (gpointer instance);
GParamSpec* boxes_param_spec_os_database (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_os_database (GValue* value, gpointer v_object);
void boxes_value_take_os_database (GValue* value, gpointer v_object);
gpointer boxes_value_get_os_database (const GValue* value);
GType boxes_os_database_get_type (void) G_GNUC_CONST;
GQuark boxes_os_database_error_quark (void);
static void boxes_installer_media_get_media_info_from_device (BoxesInstallerMedia* self, GUdevDevice* device, BoxesOSDatabase* os_db, GError** error);
BoxesOSDatabase* boxes_media_manager_get_os_db (BoxesMediaManager* self);
void boxes_os_database_guess_os_from_install_media (BoxesOSDatabase* self, const gchar* media_path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoOs* boxes_os_database_guess_os_from_install_media_finish (BoxesOSDatabase* self, GAsyncResult* _res_, OsinfoMedia** os_media, GError** error);
OsinfoResources* boxes_os_database_get_resources_for_os (BoxesOSDatabase* self, OsinfoOs* os, const gchar* architecture);
void boxes_installer_media_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
static void boxes_installer_media_real_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
static void boxes_installer_media_real_prepare_for_installation_data_free (gpointer _data);
static void boxes_installer_media_real_prepare_for_installation (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installer_media_prepare_for_installation (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installer_media_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_installer_media_real_prepare_for_installation_co (BoxesInstallerMediaPrepareForInstallationData* _data_);
void boxes_installer_media_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
static void boxes_installer_media_real_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory);
void boxes_installer_media_populate_setup_vbox (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
static void boxes_installer_media_real_populate_setup_vbox (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self);
static GList* boxes_installer_media_real_get_vm_properties (BoxesInstallerMedia* self);
static void _boxes_pair_unref0_ (gpointer var);
static void _g_list_free__boxes_pair_unref0_ (GList* self);
gboolean boxes_installer_media_is_architecture_compatible (BoxesInstallerMedia* self, const gchar* architecture);
static void boxes_installer_media_get_device_from_path_data_free (gpointer _data);
static gboolean boxes_installer_media_get_device_from_path_co (BoxesInstallerMediaGetDeviceFromPathData* _data_);
static void boxes_installer_media_get_device_from_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
OsinfoOs* boxes_os_database_get_os_by_id (BoxesOSDatabase* self, const gchar* id, GError** error);
OsinfoMedia* boxes_os_database_get_media_by_id (BoxesOSDatabase* self, OsinfoOs* os, const gchar* id, GError** error);
guint64 boxes_installer_media_get_installed_size (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_ready_to_create (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_supports_virtio_disk (BoxesInstallerMedia* self);
OsinfoDevice* boxes_get_os_device_by_prop (OsinfoOs* os, const gchar* prop_name, const gchar* prop_value);
gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self);
static void boxes_installer_media_finalize (GObject* obj);
static void _vala_boxes_installer_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return self ? g_object_ref (self) : NULL;
#line 285 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_construct_from_iso_info (GType object_type, const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources) {
	BoxesInstallerMedia * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	OsinfoOs* _tmp2_;
	OsinfoOs* _tmp3_;
	OsinfoMedia* _tmp4_;
	OsinfoMedia* _tmp5_;
	OsinfoResources* _tmp6_;
	OsinfoResources* _tmp7_;
	const gchar* _tmp8_;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (os != NULL, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (media != NULL, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (resources != NULL, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = (BoxesInstallerMedia*) g_object_new (object_type, NULL);
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = path;
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->device_file);
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->device_file = _tmp1_;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = os;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->os = _tmp3_;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = media;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os_media);
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->os_media = _tmp5_;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = resources;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->resources);
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->resources = _tmp7_;
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->from_image = TRUE;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = label;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_label (self, _tmp8_);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return self;
#line 352 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_new_from_iso_info (const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources) {
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return boxes_installer_media_construct_from_iso_info (BOXES_TYPE_INSTALLER_MEDIA, path, label, os, media, resources);
#line 359 "installer-media.c"
}


static void boxes_installer_media_create_for_path_data_free (gpointer _data) {
	BoxesInstallerMediaCreateForPathData* _data_;
	_data_ = _data;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaCreateForPathData, _data_);
#line 376 "installer-media.c"
}


void boxes_installer_media_create_for_path (const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaCreateForPathData* _data_;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	BoxesMediaManager* _tmp2_;
	BoxesMediaManager* _tmp3_;
	GCancellable* _tmp4_;
	GCancellable* _tmp5_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaCreateForPathData);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, boxes_installer_media_create_for_path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installer_media_create_for_path_data_free);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = path;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->path = _tmp1_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = media_manager;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->media_manager = _tmp3_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = cancellable;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp5_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_create_for_path_co (_data_);
#line 420 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_create_for_path_finish (GAsyncResult* _res_, GError** error) {
	BoxesInstallerMedia* result;
	BoxesInstallerMediaCreateForPathData* _data_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return NULL;
#line 431 "installer-media.c"
	}
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _data_->result;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = NULL;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 441 "installer-media.c"
}


static void boxes_installer_media_create_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstallerMediaCreateForPathData* _data_;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = _user_data_;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_source_object_ = source_object;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_res_ = _res_;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_create_for_path_co (_data_);
#line 455 "installer-media.c"
}


static gboolean boxes_installer_media_create_for_path_co (BoxesInstallerMediaCreateForPathData* _data_) {
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 464 "installer-media.c"
		goto _state_0;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 468 "installer-media.c"
		goto _state_1;
		default:
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 473 "installer-media.c"
	}
	_state_0:
#line 45 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp0_ = boxes_installer_media_new ();
#line 45 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->media = _data_->_tmp0_;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->path;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = _data_->media_manager;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp3_ = _data_->cancellable;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_state_ = 1;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_for_path (_data_->media, _data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, boxes_installer_media_create_for_path_ready, _data_);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 492 "installer-media.c"
	_state_1:
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_for_path_finish (_data_->media, _data_->_res_, &_data_->_inner_error_);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_error_free (_data_->_inner_error_);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->media);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_state_ == 0) {
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 508 "installer-media.c"
		} else {
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 512 "installer-media.c"
		}
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_unref (_data_->_async_result);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 518 "installer-media.c"
	}
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = _data_->media;
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 526 "installer-media.c"
	} else {
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 530 "installer-media.c"
	}
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 49 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 542 "installer-media.c"
	} else {
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 546 "installer-media.c"
	}
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 552 "installer-media.c"
}


static void boxes_installer_media_setup_for_path_data_free (gpointer _data) {
	BoxesInstallerMediaSetupForPathData* _data_;
	_data_ = _data;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaSetupForPathData, _data_);
#line 569 "installer-media.c"
}


static void boxes_installer_media_setup_for_path (BoxesInstallerMedia* self, const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaSetupForPathData* _data_;
	BoxesInstallerMedia* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	BoxesMediaManager* _tmp3_;
	BoxesMediaManager* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaSetupForPathData);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_installer_media_setup_for_path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installer_media_setup_for_path_data_free);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = path;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->path = _tmp2_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = media_manager;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->media_manager = _tmp4_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = cancellable;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp6_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_for_path_co (_data_);
#line 618 "installer-media.c"
}


static void boxes_installer_media_setup_for_path_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error) {
	BoxesInstallerMediaSetupForPathData* _data_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return;
#line 628 "installer-media.c"
	}
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 632 "installer-media.c"
}


static void boxes_installer_media_setup_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstallerMediaSetupForPathData* _data_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = _user_data_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_source_object_ = source_object;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_res_ = _res_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_for_path_co (_data_);
#line 646 "installer-media.c"
}


static gboolean boxes_installer_media_setup_for_path_co (BoxesInstallerMediaSetupForPathData* _data_) {
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 655 "installer-media.c"
		goto _state_0;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 659 "installer-media.c"
		goto _state_1;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 2:
#line 663 "installer-media.c"
		goto _state_2;
		default:
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 668 "installer-media.c"
	}
	_state_0:
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp0_ = _data_->path;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->media_manager;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = boxes_media_manager_get_client (_data_->_tmp1_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp4_ = _data_->cancellable;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_state_ = 1;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_device_from_path (_data_->self, _data_->_tmp0_, _data_->_tmp3_, _data_->_tmp4_, boxes_installer_media_setup_for_path_ready, _data_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 687 "installer-media.c"
	_state_1:
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp5_ = NULL;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp5_ = boxes_installer_media_get_device_from_path_finish (_data_->self, _data_->_res_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->device = _data_->_tmp5_;
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp6_ = _data_->device;
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp6_ != NULL) {
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = _data_->device;
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = _data_->media_manager;
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = boxes_media_manager_get_os_db (_data_->_tmp8_);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		boxes_installer_media_get_media_info_from_device (_data_->self, _data_->_tmp7_, _data_->_tmp10_, &_data_->_inner_error_);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_error_free (_data_->_inner_error_);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_data_->_state_ == 0) {
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 721 "installer-media.c"
			} else {
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 725 "installer-media.c"
			}
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 58 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 731 "installer-media.c"
		}
	} else {
#line 60 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->from_image = TRUE;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp11_ = _data_->media_manager;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp12_ = boxes_media_manager_get_os_db (_data_->_tmp11_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp13_ = _data_->_tmp12_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp14_ = _data_->self->device_file;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp15_ = _data_->cancellable;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp16_ = NULL;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 2;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		boxes_os_database_guess_os_from_install_media (_data_->_tmp13_, _data_->_tmp14_, _data_->_tmp15_, boxes_installer_media_setup_for_path_ready, _data_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 754 "installer-media.c"
		_state_2:
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp17_ = NULL;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp17_ = boxes_os_database_guess_os_from_install_media_finish (_data_->_tmp13_, _data_->_res_, &_data_->_tmp16_, &_data_->_inner_error_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os_media);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->os_media = _data_->_tmp16_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->_tmp17_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_error_free (_data_->_inner_error_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_data_->_state_ == 0) {
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 778 "installer-media.c"
			} else {
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 782 "installer-media.c"
			}
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 788 "installer-media.c"
		}
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->os = _data_->_tmp18_;
#line 794 "installer-media.c"
	}
#line 64 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_label (_data_->self, NULL);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp20_ = _data_->self->os_media;
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp20_ != NULL) {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp21_ = _data_->self->os_media;
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp22_ = NULL;
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_data_->_tmp21_, "architecture", &_data_->_tmp22_, NULL);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp19_);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = _data_->_tmp23_;
#line 814 "installer-media.c"
	} else {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp24_ = g_strdup ("i686");
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp19_);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = _data_->_tmp24_;
#line 822 "installer-media.c"
	}
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp25_ = _data_->_tmp19_;
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp26_ = g_strdup (_data_->_tmp25_);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->architecture = _data_->_tmp26_;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp27_ = _data_->media_manager;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp28_ = boxes_media_manager_get_os_db (_data_->_tmp27_);
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp29_ = _data_->_tmp28_;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp30_ = _data_->self->os;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp31_ = _data_->architecture;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp32_ = NULL;
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp32_ = boxes_os_database_get_resources_for_os (_data_->_tmp29_, _data_->_tmp30_, _data_->_tmp31_);
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self->resources);
#line 68 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->self->resources = _data_->_tmp32_;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->architecture);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->_tmp19_);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->device);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 858 "installer-media.c"
	} else {
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 862 "installer-media.c"
	}
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 868 "installer-media.c"
}


static void boxes_installer_media_real_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os) {
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (os != NULL);
#line 875 "installer-media.c"
}


void boxes_installer_media_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os) {
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->set_direct_boot_params (self, os);
#line 884 "installer-media.c"
}


static void boxes_installer_media_real_prepare_for_installation_data_free (gpointer _data) {
	BoxesInstallerMediaPrepareForInstallationData* _data_;
	_data_ = _data;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->vm_name);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaPrepareForInstallationData, _data_);
#line 899 "installer-media.c"
}


static void boxes_installer_media_real_prepare_for_installation (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaPrepareForInstallationData* _data_;
	BoxesInstallerMedia* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaPrepareForInstallationData);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_installer_media_real_prepare_for_installation);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installer_media_real_prepare_for_installation_data_free);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = vm_name;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->vm_name);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->vm_name = _tmp2_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = cancellable;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp4_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_real_prepare_for_installation_co (_data_);
#line 938 "installer-media.c"
}


static void boxes_installer_media_real_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error) {
	BoxesInstallerMediaPrepareForInstallationData* _data_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return;
#line 948 "installer-media.c"
	}
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 952 "installer-media.c"
}


static gboolean boxes_installer_media_real_prepare_for_installation_co (BoxesInstallerMediaPrepareForInstallationData* _data_) {
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 961 "installer-media.c"
		goto _state_0;
		default:
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 966 "installer-media.c"
	}
	_state_0:
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 973 "installer-media.c"
	} else {
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 977 "installer-media.c"
	}
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 983 "installer-media.c"
}


void boxes_installer_media_prepare_for_installation (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_for_installation (self, vm_name, cancellable, _callback_, _user_data_);
#line 990 "installer-media.c"
}


void boxes_installer_media_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_for_installation_finish (self, _res_, error);
#line 997 "installer-media.c"
}


static void boxes_installer_media_real_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
	GVirConfigDomainDiskType _tmp0_ = 0;
	gboolean _tmp1_;
	GVirConfigDomain* _tmp2_;
	GVirConfigDomainDiskType _tmp3_;
	const gchar* _tmp4_;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->from_image;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp1_) {
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_FILE;
#line 1015 "installer-media.c"
	} else {
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_BLOCK;
#line 1019 "installer-media.c"
	}
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = domain;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _tmp0_;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = self->device_file;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_add_cd_config (self, _tmp2_, _tmp3_, _tmp4_, "hdc", TRUE);
#line 1029 "installer-media.c"
}


void boxes_installer_media_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->setup_domain_config (self, domain);
#line 1038 "installer-media.c"
}


static void boxes_installer_media_real_populate_setup_vbox (BoxesInstallerMedia* self, GtkVBox* setup_vbox) {
#line 78 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (setup_vbox != NULL);
#line 1045 "installer-media.c"
}


void boxes_installer_media_populate_setup_vbox (BoxesInstallerMedia* self, GtkVBox* setup_vbox) {
#line 78 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 78 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->populate_setup_vbox (self, setup_vbox);
#line 1054 "installer-media.c"
}


static void _boxes_pair_unref0_ (gpointer var) {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	(var == NULL) ? NULL : (var = (boxes_pair_unref (var), NULL));
#line 1061 "installer-media.c"
}


static void _g_list_free__boxes_pair_unref0_ (GList* self) {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_list_foreach (self, (GFunc) _boxes_pair_unref0_, NULL);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_list_free (self);
#line 1070 "installer-media.c"
}


static GList* boxes_installer_media_real_get_vm_properties (BoxesInstallerMedia* self) {
	GList* result = NULL;
	GList* properties;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	BoxesPair* _tmp2_;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	properties = NULL;
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _ ("System");
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->label;
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = boxes_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_);
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	properties = g_list_append (properties, _tmp2_);
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = properties;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 1094 "installer-media.c"
}


GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self) {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_vm_properties (self);
#line 1103 "installer-media.c"
}


gboolean boxes_installer_media_is_architecture_compatible (BoxesInstallerMedia* self, const gchar* architecture) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	OsinfoMedia* _tmp4_;
	gboolean _tmp10_;
	gboolean _tmp19_;
	gboolean _tmp28_;
	gboolean _tmp37_;
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (architecture != NULL, FALSE);
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = self->os_media;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp4_ == NULL) {
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = TRUE;
#line 1128 "installer-media.c"
	} else {
		OsinfoMedia* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		gchar* _tmp8_;
		const gchar* _tmp9_;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp5_ = self->os_media;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp5_, "architecture", &_tmp6_, NULL);
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp7_ = _tmp6_;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp8_ = _tmp7_;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp9_ = architecture;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = g_strcmp0 (_tmp8_, _tmp9_) == 0;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp8_);
#line 1149 "installer-media.c"
	}
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = _tmp3_;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp10_) {
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = TRUE;
#line 1157 "installer-media.c"
	} else {
		gboolean _tmp11_ = FALSE;
		OsinfoMedia* _tmp12_;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gboolean _tmp16_;
		gboolean _tmp18_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp12_ = self->os_media;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp12_, "architecture", &_tmp13_, NULL);
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp14_ = _tmp13_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp15_ = _tmp14_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp16_ = g_strcmp0 (_tmp15_, "i386") == 0;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp15_);
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp16_) {
#line 1180 "installer-media.c"
			const gchar* _tmp17_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp17_ = architecture;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp11_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 1186 "installer-media.c"
		} else {
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp11_ = FALSE;
#line 1190 "installer-media.c"
		}
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp18_ = _tmp11_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = _tmp18_;
#line 1196 "installer-media.c"
	}
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp19_ = _tmp2_;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp19_) {
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = TRUE;
#line 1204 "installer-media.c"
	} else {
		gboolean _tmp20_ = FALSE;
		OsinfoMedia* _tmp21_;
		gchar* _tmp22_ = NULL;
		gchar* _tmp23_;
		gchar* _tmp24_;
		gboolean _tmp25_;
		gboolean _tmp27_;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp21_ = self->os_media;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp21_, "architecture", &_tmp22_, NULL);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp23_ = _tmp22_;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp24_ = _tmp23_;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp25_ = g_strcmp0 (_tmp24_, "i386") == 0;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp24_);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp25_) {
#line 1227 "installer-media.c"
			const gchar* _tmp26_;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp26_ = architecture;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp20_ = g_strcmp0 (_tmp26_, "x86_64") == 0;
#line 1233 "installer-media.c"
		} else {
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp20_ = FALSE;
#line 1237 "installer-media.c"
		}
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp27_ = _tmp20_;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = _tmp27_;
#line 1243 "installer-media.c"
	}
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp28_ = _tmp1_;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp28_) {
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = TRUE;
#line 1251 "installer-media.c"
	} else {
		gboolean _tmp29_ = FALSE;
		OsinfoMedia* _tmp30_;
		gchar* _tmp31_ = NULL;
		gchar* _tmp32_;
		gchar* _tmp33_;
		gboolean _tmp34_;
		gboolean _tmp36_;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp30_ = self->os_media;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp30_, "architecture", &_tmp31_, NULL);
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp32_ = _tmp31_;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp33_ = _tmp32_;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp34_ = g_strcmp0 (_tmp33_, "i686") == 0;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp33_);
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp34_) {
#line 1274 "installer-media.c"
			const gchar* _tmp35_;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp35_ = architecture;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = g_strcmp0 (_tmp35_, "x86_64") == 0;
#line 1280 "installer-media.c"
		} else {
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = FALSE;
#line 1284 "installer-media.c"
		}
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp36_ = _tmp29_;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp36_;
#line 1290 "installer-media.c"
	}
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp37_ = _tmp0_;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _tmp37_;
#line 89 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 1298 "installer-media.c"
}


void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory) {
	GVirConfigDomainDisk* _tmp0_;
	GVirConfigDomainDisk* disk;
	GVirConfigDomainDisk* _tmp1_;
	GVirConfigDomainDiskType _tmp2_;
	GVirConfigDomainDisk* _tmp3_;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* _tmp5_;
	GVirConfigDomainDisk* _tmp6_;
	const gchar* _tmp7_;
	GVirConfigDomainDisk* _tmp8_;
	const gchar* _tmp9_;
	GVirConfigDomainDisk* _tmp10_;
	gboolean _tmp11_;
	GVirConfigDomain* _tmp13_;
	GVirConfigDomainDisk* _tmp14_;
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (iso_path != NULL);
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (device_name != NULL);
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	disk = _tmp0_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = disk;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = type;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_type (_tmp1_, _tmp2_);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = disk;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_guest_device_type (_tmp3_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_CDROM);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = disk;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_name (_tmp4_, "qemu");
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = disk;
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_type (_tmp5_, "raw");
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = disk;
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = device_name;
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_target_dev (_tmp6_, _tmp7_);
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = disk;
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp9_ = iso_path;
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_source (_tmp8_, _tmp9_);
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = disk;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_target_bus (_tmp10_, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp11_ = mandatory;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp11_) {
#line 1368 "installer-media.c"
		GVirConfigDomainDisk* _tmp12_;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp12_ = disk;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		gvir_config_domain_disk_set_startup_policy (_tmp12_, GVIR_CONFIG_DOMAIN_DISK_STARTUP_POLICY_MANDATORY);
#line 1374 "installer-media.c"
	}
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp13_ = domain;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp14_ = disk;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (disk);
#line 1384 "installer-media.c"
}


static void boxes_installer_media_get_device_from_path_data_free (gpointer _data) {
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
	_data_ = _data;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->client);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaGetDeviceFromPathData, _data_);
#line 1403 "installer-media.c"
}


static void boxes_installer_media_get_device_from_path (BoxesInstallerMedia* self, const gchar* path, GUdevClient* client, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
	BoxesInstallerMedia* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GUdevClient* _tmp3_;
	GUdevClient* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaGetDeviceFromPathData);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_installer_media_get_device_from_path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installer_media_get_device_from_path_data_free);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = path;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->path = _tmp2_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = client;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->client);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->client = _tmp4_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = cancellable;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp6_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_device_from_path_co (_data_);
#line 1452 "installer-media.c"
}


static GUdevDevice* boxes_installer_media_get_device_from_path_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
	GUdevDevice* result;
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _data_->result;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = NULL;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 1467 "installer-media.c"
}


static void boxes_installer_media_get_device_from_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_ = _user_data_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_source_object_ = source_object;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_res_ = _res_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_device_from_path_co (_data_);
#line 1481 "installer-media.c"
}


static gboolean boxes_installer_media_get_device_from_path_co (BoxesInstallerMediaGetDeviceFromPathData* _data_) {
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 1490 "installer-media.c"
		goto _state_0;
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 1494 "installer-media.c"
		goto _state_1;
		default:
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 1499 "installer-media.c"
	}
	_state_0:
	{
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp0_ = _data_->path;
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp1_ = NULL;
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp1_ = g_file_new_for_commandline_arg (_data_->_tmp0_);
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->mount_dir = _data_->_tmp1_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp2_ = _data_->cancellable;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 1;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_file_find_enclosing_mount_async (_data_->mount_dir, G_PRIORITY_DEFAULT, _data_->_tmp2_, boxes_installer_media_get_device_from_path_ready, _data_);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 1519 "installer-media.c"
		_state_1:
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp3_ = NULL;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp3_ = g_file_find_enclosing_mount_finish (_data_->mount_dir, _data_->_res_, &_data_->_inner_error_);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->mount = _data_->_tmp3_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->mount_dir);
#line 1531 "installer-media.c"
			goto __catch12_g_error;
		}
#line 120 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = NULL;
#line 120 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = g_mount_get_root (_data_->mount);
#line 120 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->root_dir = _data_->_tmp4_;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp5_ = _data_->root_dir;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp6_ = NULL;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp6_ = g_file_get_path (_data_->_tmp5_);
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = _data_->_tmp6_;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = NULL;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = g_file_get_path (_data_->mount_dir);
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = g_strcmp0 (_data_->_tmp7_, _data_->_tmp9_) == 0;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp9_);
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp7_);
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp10_) {
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp11_ = NULL;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp11_ = g_mount_get_volume (_data_->mount);
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->volume = _data_->_tmp11_;
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp12_ = _data_->volume;
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp13_ = NULL;
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp13_ = g_volume_get_identifier (_data_->_tmp12_, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp13_;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp14_ = _data_->path;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->mount_point);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->mount_point = _data_->_tmp15_;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->volume);
#line 1588 "installer-media.c"
		} else {
#line 127 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp16_ = _data_->path;
#line 127 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp17_ = g_strdup (_data_->_tmp16_);
#line 127 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 127 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp17_;
#line 1598 "installer-media.c"
		}
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->root_dir);
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount);
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount_dir);
#line 1606 "installer-media.c"
	}
	goto __finally12;
	__catch12_g_error:
	{
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_inner_error_ = NULL;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->path;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = g_strdup (_data_->_tmp18_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->self->device_file);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->device_file = _data_->_tmp19_;
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_error_free0 (_data_->_error_);
#line 1625 "installer-media.c"
	}
	__finally12:
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.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 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_clear_error (&_data_->_inner_error_);
#line 117 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 1636 "installer-media.c"
	}
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp20_ = _data_->client;
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp21_ = _data_->self->device_file;
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp22_ = NULL;
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp22_ = g_udev_client_query_by_device_file (_data_->_tmp20_, _data_->_tmp21_);
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = _data_->_tmp22_;
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1652 "installer-media.c"
	} else {
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1656 "installer-media.c"
	}
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 133 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1666 "installer-media.c"
	} else {
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1670 "installer-media.c"
	}
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 1676 "installer-media.c"
}


static void boxes_installer_media_get_media_info_from_device (BoxesInstallerMedia* self, GUdevDevice* device, BoxesOSDatabase* os_db, GError** error) {
	GUdevDevice* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GUdevDevice* _tmp4_;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_;
	GUdevDevice* _tmp7_;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* os_id;
	const gchar* _tmp17_;
	GError * _inner_error_ = NULL;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (device != NULL);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (os_db != NULL);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = device;
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_udev_device_get_property_as_boolean (_tmp0_, "OSINFO_BOOTABLE");
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (!_tmp1_) {
#line 1708 "installer-media.c"
		const gchar* _tmp2_;
		GError* _tmp3_;
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->device_file;
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = g_error_new (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_NON_BOOTABLE, "Media %s is not bootable.", _tmp2_);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_inner_error_ = _tmp3_;
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_propagate_error (error, _inner_error_);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1723 "installer-media.c"
		} else {
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_clear_error (&_inner_error_);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1731 "installer-media.c"
		}
	}
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = device;
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = g_udev_device_get_property (_tmp4_, "ID_FS_LABEL");
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->label);
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->label = _tmp6_;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = device;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = g_udev_device_get_property (_tmp7_, "OSINFO_INSTALLER");
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = _tmp9_;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp11_ = _tmp10_;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp11_ == NULL) {
#line 1756 "installer-media.c"
		GUdevDevice* _tmp12_;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp12_ = device;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp13_ = g_udev_device_get_property (_tmp12_, "OSINFO_LIVE");
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp14_ = g_strdup (_tmp13_);
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp10_);
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp10_ = _tmp14_;
#line 1770 "installer-media.c"
	}
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp15_ = _tmp10_;
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 142 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	os_id = _tmp16_;
#line 144 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp17_ = os_id;
#line 144 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp17_ != NULL) {
#line 1782 "installer-media.c"
		BoxesOSDatabase* _tmp18_;
		const gchar* _tmp19_;
		OsinfoOs* _tmp20_ = NULL;
		OsinfoOs* _tmp21_;
		GUdevDevice* _tmp22_;
		const gchar* _tmp23_ = NULL;
		gchar* _tmp24_;
		gchar* media_id;
		const gchar* _tmp25_;
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp18_ = os_db;
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp19_ = os_id;
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp20_ = boxes_os_database_get_os_by_id (_tmp18_, _tmp19_, &_inner_error_);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp21_ = _tmp20_;
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_inner_error_ != NULL) {
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_propagate_error (error, _inner_error_);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (os_id);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp10_);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				return;
#line 1812 "installer-media.c"
			} else {
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (os_id);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp10_);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_clear_error (&_inner_error_);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				return;
#line 1824 "installer-media.c"
			}
		}
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (self->os);
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		self->os = _tmp21_;
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp22_ = device;
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp23_ = g_udev_device_get_property (_tmp22_, "OSINFO_MEDIA");
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp24_ = g_strdup (_tmp23_);
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		media_id = _tmp24_;
#line 148 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp25_ = media_id;
#line 148 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp25_ != NULL) {
#line 1843 "installer-media.c"
			BoxesOSDatabase* _tmp26_;
			OsinfoOs* _tmp27_;
			const gchar* _tmp28_;
			OsinfoMedia* _tmp29_ = NULL;
			OsinfoMedia* _tmp30_;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp26_ = os_db;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp27_ = self->os;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp28_ = media_id;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = boxes_os_database_get_media_by_id (_tmp26_, _tmp27_, _tmp28_, &_inner_error_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp30_ = _tmp29_;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_inner_error_ != NULL) {
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					g_propagate_error (error, _inner_error_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (media_id);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (os_id);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp10_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					return;
#line 1873 "installer-media.c"
				} else {
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (media_id);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (os_id);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp10_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					g_clear_error (&_inner_error_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					return;
#line 1887 "installer-media.c"
				}
			}
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (self->os_media);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			self->os_media = _tmp30_;
#line 1894 "installer-media.c"
		}
#line 144 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (media_id);
#line 1898 "installer-media.c"
	}
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (os_id);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_tmp10_);
#line 1904 "installer-media.c"
}


static void boxes_installer_media_setup_label (BoxesInstallerMedia* self, const gchar* label) {
	const gchar* _tmp0_;
#line 153 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 154 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = label;
#line 154 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp0_ != NULL) {
#line 1916 "installer-media.c"
		const gchar* _tmp1_;
		gchar* _tmp2_;
#line 155 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = label;
#line 155 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = g_strdup (_tmp1_);
#line 155 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (self->label);
#line 155 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		self->label = _tmp2_;
#line 1927 "installer-media.c"
	} else {
		OsinfoOs* _tmp3_;
#line 156 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = self->os;
#line 156 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp3_ != NULL) {
#line 1934 "installer-media.c"
			OsinfoOs* _tmp4_;
			const gchar* _tmp5_ = NULL;
			gchar* _tmp6_;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp4_ = self->os;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp5_ = osinfo_product_get_name ((OsinfoProduct*) _tmp4_);
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp6_ = g_strdup (_tmp5_);
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (self->label);
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			self->label = _tmp6_;
#line 1948 "installer-media.c"
		} else {
			const gchar* _tmp7_;
			gchar* _tmp8_ = NULL;
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp7_ = self->device_file;
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp8_ = g_path_get_basename (_tmp7_);
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (self->label);
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			self->label = _tmp8_;
#line 162 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1962 "installer-media.c"
		}
	}
}


BoxesInstallerMedia* boxes_installer_media_construct (GType object_type) {
	BoxesInstallerMedia * self = NULL;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = (BoxesInstallerMedia*) g_object_new (object_type, NULL);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return self;
#line 1974 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_new (void) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return boxes_installer_media_construct (BOXES_TYPE_INSTALLER_MEDIA);
#line 1981 "installer-media.c"
}


guint64 boxes_installer_media_get_installed_size (BoxesInstallerMedia* self) {
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, 0ULL);
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_installed_size (self);
#line 1990 "installer-media.c"
}


static guint64 boxes_installer_media_real_get_installed_size (BoxesInstallerMedia* base) {
	guint64 result;
	BoxesInstallerMedia* self;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = base;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = (guint64) 0;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2003 "installer-media.c"
}


gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self) {
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_need_user_input_for_vm_creation (self);
#line 2012 "installer-media.c"
}


static gboolean boxes_installer_media_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = base;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = FALSE;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2025 "installer-media.c"
}


gboolean boxes_installer_media_get_ready_to_create (BoxesInstallerMedia* self) {
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_ready_to_create (self);
#line 2034 "installer-media.c"
}


static gboolean boxes_installer_media_real_get_ready_to_create (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = base;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = TRUE;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2047 "installer-media.c"
}


gboolean boxes_installer_media_get_supports_virtio_disk (BoxesInstallerMedia* self) {
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_supports_virtio_disk (self);
#line 2056 "installer-media.c"
}


static gboolean boxes_installer_media_real_get_supports_virtio_disk (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
	OsinfoOs* _tmp0_;
	OsinfoDevice* _tmp1_ = NULL;
	OsinfoDevice* _tmp2_;
	gboolean _tmp3_;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = base;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = self->os;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = boxes_get_os_device_by_prop (_tmp0_, OSINFO_DEVICE_PROP_NAME, "virtio-block");
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _tmp1_;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _tmp2_ != NULL;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_tmp2_);
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _tmp3_;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2083 "installer-media.c"
}


gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	OsinfoMedia* _tmp1_;
	gboolean _tmp5_;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->os_media;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp1_ == NULL) {
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = TRUE;
#line 2100 "installer-media.c"
	} else {
		OsinfoMedia* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->os_media;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp2_, "live", &_tmp3_, NULL);
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp4_ = _tmp3_;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp4_;
#line 2113 "installer-media.c"
	}
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _tmp0_;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _tmp5_;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2121 "installer-media.c"
}


static void boxes_installer_media_class_init (BoxesInstallerMediaClass * klass) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_parent_class = g_type_class_peek_parent (klass);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->set_direct_boot_params = boxes_installer_media_real_set_direct_boot_params;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->prepare_for_installation = boxes_installer_media_real_prepare_for_installation;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->prepare_for_installation_finish = boxes_installer_media_real_prepare_for_installation_finish;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->setup_domain_config = boxes_installer_media_real_setup_domain_config;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->populate_setup_vbox = boxes_installer_media_real_populate_setup_vbox;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_vm_properties = boxes_installer_media_real_get_vm_properties;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_installed_size = boxes_installer_media_real_get_installed_size;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_need_user_input_for_vm_creation = boxes_installer_media_real_get_need_user_input_for_vm_creation;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_ready_to_create = boxes_installer_media_real_get_ready_to_create;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_supports_virtio_disk = boxes_installer_media_real_get_supports_virtio_disk;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_installer_media_get_property;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_installer_media_finalize;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_INSTALLED_SIZE, g_param_spec_uint64 ("installed-size", "installed-size", "installed-size", 0, G_MAXUINT64, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION, g_param_spec_boolean ("need-user-input-for-vm-creation", "need-user-input-for-vm-creation", "need-user-input-for-vm-creation", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_READY_TO_CREATE, g_param_spec_boolean ("ready-to-create", "ready-to-create", "ready-to-create", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK, g_param_spec_boolean ("supports-virtio-disk", "supports-virtio-disk", "supports-virtio-disk", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_LIVE, g_param_spec_boolean ("live", "live", "live", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 2162 "installer-media.c"
}


static void boxes_installer_media_instance_init (BoxesInstallerMedia * self) {
}


static void boxes_installer_media_finalize (GObject* obj) {
	BoxesInstallerMedia * self;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia);
#line 8 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os);
#line 9 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->resources);
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os_media);
#line 11 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->label);
#line 12 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->device_file);
#line 13 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->mount_point);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (boxes_installer_media_parent_class)->finalize (obj);
#line 2188 "installer-media.c"
}


GType boxes_installer_media_get_type (void) {
	static volatile gsize boxes_installer_media_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_installer_media_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesInstallerMediaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_installer_media_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesInstallerMedia), 0, (GInstanceInitFunc) boxes_installer_media_instance_init, NULL };
		GType boxes_installer_media_type_id;
		boxes_installer_media_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesInstallerMedia", &g_define_type_info, 0);
		g_once_init_leave (&boxes_installer_media_type_id__volatile, boxes_installer_media_type_id);
	}
	return boxes_installer_media_type_id__volatile;
}


static void _vala_boxes_installer_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesInstallerMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (property_id) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_INSTALLED_SIZE:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_value_set_uint64 (value, boxes_installer_media_get_installed_size (self));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_need_user_input_for_vm_creation (self));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_READY_TO_CREATE:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_ready_to_create (self));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_supports_virtio_disk (self));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_LIVE:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_live (self));
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 2239 "installer-media.c"
		default:
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		break;
#line 2245 "installer-media.c"
	}
}



