/* installer-media.c generated by valac 0.17.3.12-6a5ea3, 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 <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 BOXES_TYPE_PAIR (boxes_pair_get_type ())
#define BOXES_PAIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PAIR, BoxesPair))
#define BOXES_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PAIR, BoxesPairClass))
#define BOXES_IS_PAIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PAIR))
#define BOXES_IS_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PAIR))
#define BOXES_PAIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PAIR, BoxesPairClass))

typedef struct _BoxesPair BoxesPair;
typedef struct _BoxesPairClass BoxesPairClass;
#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;

typedef enum  {
	UNATTENDED_INSTALLER_ERROR_SETUP_INCOMPLETE
} UnattendedInstallerError;
#define UNATTENDED_INSTALLER_ERROR unattended_installer_error_quark ()
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 (*setup_spice_config) (BoxesInstallerMedia* self, GVirConfigDomainGraphicsSpice* graphics);
	void (*populate_setup_vbox) (BoxesInstallerMedia* self, GtkVBox* setup_vbox);
	void (*check_needed_info) (BoxesInstallerMedia* self, GError** error);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (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* _tmp5_;
	GFile* root_dir;
	GFile* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gboolean _tmp11_;
	GVolume* _tmp12_;
	GVolume* _tmp13_;
	GVolume* volume;
	GVolume* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	GError* _error_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	GUdevClient* _tmp23_;
	const gchar* _tmp24_;
	GUdevDevice* _tmp25_;
	GError * _inner_error_;
};


static gpointer boxes_installer_media_parent_class = NULL;

GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GQuark unattended_installer_error_quark (void);
gpointer boxes_pair_ref (gpointer instance);
void boxes_pair_unref (gpointer instance);
GParamSpec* boxes_param_spec_pair (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_pair (GValue* value, gpointer v_object);
void boxes_value_take_pair (GValue* value, gpointer v_object);
gpointer boxes_value_get_pair (const GValue* value);
GType boxes_pair_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_INSTALLER_MEDIA_DUMMY_PROPERTY,
	BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION,
	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_setup_spice_config (BoxesInstallerMedia* self, GVirConfigDomainGraphicsSpice* graphics);
static void boxes_installer_media_real_setup_spice_config (BoxesInstallerMedia* self, GVirConfigDomainGraphicsSpice* graphics);
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);
void boxes_installer_media_check_needed_info (BoxesInstallerMedia* self, GError** error);
static void boxes_installer_media_real_check_needed_info (BoxesInstallerMedia* self, GError** error);
GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self);
static GList* boxes_installer_media_real_get_vm_properties (BoxesInstallerMedia* self);
BoxesPair* boxes_pair_new (GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, gconstpointer first, gconstpointer second);
BoxesPair* boxes_pair_construct (GType object_type, GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, gconstpointer first, gconstpointer second);
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);
gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self);
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 29 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return self ? g_object_ref (self) : NULL;
#line 306 "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 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (os != NULL, NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (media != NULL, NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (resources != NULL, NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self = (BoxesInstallerMedia*) g_object_new (object_type, NULL);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = path;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->device_file);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->device_file = _tmp1_;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp2_ = os;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os);
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->os = _tmp3_;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = media;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os_media);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->os_media = _tmp5_;
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = resources;
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->resources);
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->resources = _tmp7_;
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->from_image = TRUE;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = label;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_label (self, _tmp8_);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return self;
#line 373 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_new_from_iso_info (const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources) {
#line 23 "/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 380 "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 397 "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"
	_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"
	_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"
	_data_->cancellable = _tmp5_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_create_for_path_co (_data_);
#line 435 "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 446 "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 456 "installer-media.c"
}


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


static gboolean boxes_installer_media_create_for_path_co (BoxesInstallerMediaCreateForPathData* _data_) {
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 479 "installer-media.c"
		goto _state_0;
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 483 "installer-media.c"
		goto _state_1;
		default:
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 488 "installer-media.c"
	}
	_state_0:
#line 40 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp0_ = boxes_installer_media_new ();
#line 40 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->media = _data_->_tmp0_;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->path;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = _data_->media_manager;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp3_ = _data_->cancellable;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_state_ = 1;
#line 42 "/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 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 507 "installer-media.c"
	_state_1:
#line 42 "/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 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_error_free (_data_->_inner_error_);
#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 523 "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 527 "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 533 "installer-media.c"
	}
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = _data_->media;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 541 "installer-media.c"
	} else {
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 545 "installer-media.c"
	}
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media);
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 557 "installer-media.c"
	} else {
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 561 "installer-media.c"
	}
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 37 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 567 "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 584 "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"
	_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"
	_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"
	_data_->cancellable = _tmp6_;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_for_path_co (_data_);
#line 627 "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 637 "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 641 "installer-media.c"
}


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


static gboolean boxes_installer_media_setup_for_path_co (BoxesInstallerMediaSetupForPathData* _data_) {
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 664 "installer-media.c"
		goto _state_0;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 668 "installer-media.c"
		goto _state_1;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 2:
#line 672 "installer-media.c"
		goto _state_2;
		default:
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 677 "installer-media.c"
	}
	_state_0:
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp0_ = _data_->path;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->media_manager;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = boxes_media_manager_get_client (_data_->_tmp1_);
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp4_ = _data_->cancellable;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_state_ = 1;
#line 50 "/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 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 696 "installer-media.c"
	_state_1:
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp5_ = NULL;
#line 50 "/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 50 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->device = _data_->_tmp5_;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp6_ = _data_->device;
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp6_ != NULL) {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = _data_->device;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = _data_->media_manager;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = boxes_media_manager_get_os_db (_data_->_tmp8_);
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 53 "/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 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_error_free (_data_->_inner_error_);
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_data_->_state_ == 0) {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 730 "installer-media.c"
			} else {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 734 "installer-media.c"
			}
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 740 "installer-media.c"
		}
	} else {
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->from_image = TRUE;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp11_ = _data_->media_manager;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp12_ = boxes_media_manager_get_os_db (_data_->_tmp11_);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp13_ = _data_->_tmp12_;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp14_ = _data_->self->device_file;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp15_ = _data_->cancellable;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp16_ = NULL;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 2;
#line 56 "/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 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 763 "installer-media.c"
		_state_2:
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp17_ = NULL;
#line 56 "/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 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os_media);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->os_media = _data_->_tmp16_;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->_tmp17_;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_error_free (_data_->_inner_error_);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_data_->_state_ == 0) {
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 787 "installer-media.c"
			} else {
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 791 "installer-media.c"
			}
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 797 "installer-media.c"
		}
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->os = _data_->_tmp18_;
#line 803 "installer-media.c"
	}
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_setup_label (_data_->self, NULL);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp20_ = _data_->self->os_media;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp20_ != NULL) {
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp21_ = _data_->self->os_media;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp22_ = NULL;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_data_->_tmp21_, "architecture", &_data_->_tmp22_, NULL);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp19_);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = _data_->_tmp23_;
#line 823 "installer-media.c"
	} else {
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp24_ = g_strdup ("i686");
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp19_);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = _data_->_tmp24_;
#line 831 "installer-media.c"
	}
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp25_ = _data_->_tmp19_;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp26_ = g_strdup (_data_->_tmp25_);
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->architecture = _data_->_tmp26_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp27_ = _data_->media_manager;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp28_ = boxes_media_manager_get_os_db (_data_->_tmp27_);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp29_ = _data_->_tmp28_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp30_ = _data_->self->os;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp31_ = _data_->architecture;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp32_ = NULL;
#line 63 "/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 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self->resources);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->self->resources = _data_->_tmp32_;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->architecture);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->_tmp19_);
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->device);
#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 867 "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 871 "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 877 "installer-media.c"
}


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


void boxes_installer_media_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os) {
#line 66 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 66 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->set_direct_boot_params (self, os);
#line 893 "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 908 "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"
	_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"
	_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 943 "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 953 "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 957 "installer-media.c"
}


static gboolean boxes_installer_media_real_prepare_for_installation_co (BoxesInstallerMediaPrepareForInstallationData* _data_) {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 966 "installer-media.c"
		goto _state_0;
		default:
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 971 "installer-media.c"
	}
	_state_0:
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 978 "installer-media.c"
	} else {
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 982 "installer-media.c"
	}
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 67 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 988 "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 995 "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 1002 "installer-media.c"
}


static void boxes_installer_media_real_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
	GVirConfigDomainDisk* _tmp0_;
	GVirConfigDomainDisk* disk;
	gboolean _tmp1_;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* _tmp5_;
	GVirConfigDomainDisk* _tmp6_;
	GVirConfigDomainDisk* _tmp7_;
	const gchar* _tmp8_;
	GVirConfigDomainDisk* _tmp9_;
	GVirConfigDomainDisk* _tmp10_;
	GVirConfigDomainDisk* _tmp11_;
	GVirConfigDomain* _tmp12_;
	GVirConfigDomainDisk* _tmp13_;
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	disk = _tmp0_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->from_image;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp1_) {
#line 1030 "installer-media.c"
		GVirConfigDomainDisk* _tmp2_;
#line 73 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = disk;
#line 73 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		gvir_config_domain_disk_set_type (_tmp2_, GVIR_CONFIG_DOMAIN_DISK_FILE);
#line 1036 "installer-media.c"
	} else {
		GVirConfigDomainDisk* _tmp3_;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = disk;
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		gvir_config_domain_disk_set_type (_tmp3_, GVIR_CONFIG_DOMAIN_DISK_BLOCK);
#line 1043 "installer-media.c"
	}
#line 77 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = disk;
#line 77 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_guest_device_type (_tmp4_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_CDROM);
#line 78 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = disk;
#line 78 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_name (_tmp5_, "qemu");
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = disk;
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_type (_tmp6_, "raw");
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = disk;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = self->device_file;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_source (_tmp7_, _tmp8_);
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp9_ = disk;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_target_dev (_tmp9_, "hdc");
#line 82 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = disk;
#line 82 "/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 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp11_ = disk;
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_startup_policy (_tmp11_, GVIR_CONFIG_DOMAIN_DISK_STARTUP_POLICY_MANDATORY);
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp12_ = domain;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp13_ = disk;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_add_device (_tmp12_, (GVirConfigDomainDevice*) _tmp13_);
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (disk);
#line 1083 "installer-media.c"
}


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


static void boxes_installer_media_real_setup_spice_config (BoxesInstallerMedia* self, GVirConfigDomainGraphicsSpice* graphics) {
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (graphics != NULL);
#line 1099 "installer-media.c"
}


void boxes_installer_media_setup_spice_config (BoxesInstallerMedia* self, GVirConfigDomainGraphicsSpice* graphics) {
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->setup_spice_config (self, graphics);
#line 1108 "installer-media.c"
}


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


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


static void boxes_installer_media_real_check_needed_info (BoxesInstallerMedia* self, GError** error) {
}


void boxes_installer_media_check_needed_info (BoxesInstallerMedia* self, GError** error) {
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->check_needed_info (self, error);
#line 1137 "installer-media.c"
}


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


static void _g_list_free__boxes_pair_unref0_ (GList* self) {
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_list_foreach (self, (GFunc) _boxes_pair_unref0_, NULL);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_list_free (self);
#line 1153 "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 93 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	properties = NULL;
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _ ("System");
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->label;
#line 95 "/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 95 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	properties = g_list_append (properties, _tmp2_);
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = properties;
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 1177 "installer-media.c"
}


GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self) {
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_vm_properties (self);
#line 1186 "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 100 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 100 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (architecture != NULL, FALSE);
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = self->os_media;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp4_ == NULL) {
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = TRUE;
#line 1211 "installer-media.c"
	} else {
		OsinfoMedia* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		gchar* _tmp8_;
		const gchar* _tmp9_;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp5_ = self->os_media;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp5_, "architecture", &_tmp6_, NULL);
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp7_ = _tmp6_;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp8_ = _tmp7_;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp9_ = architecture;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = g_strcmp0 (_tmp8_, _tmp9_) == 0;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp8_);
#line 1232 "installer-media.c"
	}
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = _tmp3_;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp10_) {
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = TRUE;
#line 1240 "installer-media.c"
	} else {
		gboolean _tmp11_ = FALSE;
		OsinfoMedia* _tmp12_;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gboolean _tmp16_;
		gboolean _tmp18_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp12_ = self->os_media;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp12_, "architecture", &_tmp13_, NULL);
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp14_ = _tmp13_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp15_ = _tmp14_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp16_ = g_strcmp0 (_tmp15_, "i386") == 0;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp15_);
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp16_) {
#line 1263 "installer-media.c"
			const gchar* _tmp17_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp17_ = architecture;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp11_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 1269 "installer-media.c"
		} else {
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp11_ = FALSE;
#line 1273 "installer-media.c"
		}
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp18_ = _tmp11_;
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = _tmp18_;
#line 1279 "installer-media.c"
	}
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp19_ = _tmp2_;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp19_) {
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = TRUE;
#line 1287 "installer-media.c"
	} else {
		gboolean _tmp20_ = FALSE;
		OsinfoMedia* _tmp21_;
		gchar* _tmp22_ = NULL;
		gchar* _tmp23_;
		gchar* _tmp24_;
		gboolean _tmp25_;
		gboolean _tmp27_;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp21_ = self->os_media;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp21_, "architecture", &_tmp22_, NULL);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp23_ = _tmp22_;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp24_ = _tmp23_;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp25_ = g_strcmp0 (_tmp24_, "i386") == 0;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp24_);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp25_) {
#line 1310 "installer-media.c"
			const gchar* _tmp26_;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp26_ = architecture;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp20_ = g_strcmp0 (_tmp26_, "x86_64") == 0;
#line 1316 "installer-media.c"
		} else {
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp20_ = FALSE;
#line 1320 "installer-media.c"
		}
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp27_ = _tmp20_;
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = _tmp27_;
#line 1326 "installer-media.c"
	}
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp28_ = _tmp1_;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp28_) {
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = TRUE;
#line 1334 "installer-media.c"
	} else {
		gboolean _tmp29_ = FALSE;
		OsinfoMedia* _tmp30_;
		gchar* _tmp31_ = NULL;
		gchar* _tmp32_;
		gchar* _tmp33_;
		gboolean _tmp34_;
		gboolean _tmp36_;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp30_ = self->os_media;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp30_, "architecture", &_tmp31_, NULL);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp32_ = _tmp31_;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp33_ = _tmp32_;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp34_ = g_strcmp0 (_tmp33_, "i686") == 0;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp33_);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp34_) {
#line 1357 "installer-media.c"
			const gchar* _tmp35_;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp35_ = architecture;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = g_strcmp0 (_tmp35_, "x86_64") == 0;
#line 1363 "installer-media.c"
		} else {
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = FALSE;
#line 1367 "installer-media.c"
		}
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp36_ = _tmp29_;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp36_;
#line 1373 "installer-media.c"
	}
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp37_ = _tmp0_;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _tmp37_;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 1381 "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 1400 "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"
	_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"
	_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"
	_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 1443 "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 1458 "installer-media.c"
}


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


static gboolean boxes_installer_media_get_device_from_path_co (BoxesInstallerMediaGetDeviceFromPathData* _data_) {
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 0:
#line 1481 "installer-media.c"
		goto _state_0;
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		case 1:
#line 1485 "installer-media.c"
		goto _state_1;
		default:
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 1490 "installer-media.c"
	}
	_state_0:
	{
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp0_ = _data_->path;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp1_ = NULL;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp1_ = g_file_new_for_commandline_arg (_data_->_tmp0_);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->mount_dir = _data_->_tmp1_;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp2_ = _data_->cancellable;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 1;
#line 111 "/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 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 1510 "installer-media.c"
		_state_1:
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp3_ = NULL;
#line 111 "/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 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->mount = _data_->_tmp3_;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->mount_dir);
#line 1522 "installer-media.c"
			goto __catch15_g_error;
		}
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = g_mount_get_root (_data_->mount);
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->root_dir = _data_->_tmp5_;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp6_ = _data_->root_dir;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = NULL;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = g_file_get_path (_data_->_tmp6_);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = NULL;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = g_file_get_path (_data_->mount_dir);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp11_ = g_strcmp0 (_data_->_tmp8_, _data_->_tmp10_) == 0;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp10_);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp8_);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp11_) {
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp12_ = NULL;
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp12_ = g_mount_get_volume (_data_->mount);
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp13_ = _g_object_ref0 (_data_->_tmp12_);
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->volume = _data_->_tmp13_;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp14_ = _data_->volume;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp15_ = NULL;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp15_ = g_volume_get_identifier (_data_->_tmp14_, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp16_ = g_strdup (_data_->_tmp15_);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp16_;
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp17_ = _data_->path;
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp18_ = g_strdup (_data_->_tmp17_);
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->mount_point);
#line 116 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->mount_point = _data_->_tmp18_;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->volume);
#line 1585 "installer-media.c"
		} else {
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp19_ = _data_->path;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->_tmp20_ = g_strdup (_data_->_tmp19_);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp20_;
#line 1595 "installer-media.c"
		}
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->root_dir);
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount);
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount_dir);
#line 1603 "installer-media.c"
	}
	goto __finally15;
	__catch15_g_error:
	{
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_inner_error_ = NULL;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp21_ = _data_->path;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->_tmp22_ = g_strdup (_data_->_tmp21_);
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->self->device_file);
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_data_->self->device_file = _data_->_tmp22_;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_error_free0 (_data_->_error_);
#line 1622 "installer-media.c"
	}
	__finally15:
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 109 "/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 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_clear_error (&_data_->_inner_error_);
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 1633 "installer-media.c"
	}
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp23_ = _data_->client;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp24_ = _data_->self->device_file;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp25_ = NULL;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->_tmp25_ = g_udev_client_query_by_device_file (_data_->_tmp23_, _data_->_tmp24_);
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_data_->result = _data_->_tmp25_;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1649 "installer-media.c"
	} else {
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1653 "installer-media.c"
	}
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ == 0) {
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1663 "installer-media.c"
	} else {
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1667 "installer-media.c"
	}
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 1673 "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 128 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (device != NULL);
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (os_db != NULL);
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = device;
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_udev_device_get_property_as_boolean (_tmp0_, "OSINFO_BOOTABLE");
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (!_tmp1_) {
#line 1705 "installer-media.c"
		const gchar* _tmp2_;
		GError* _tmp3_;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->device_file;
#line 130 "/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 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_inner_error_ = _tmp3_;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_propagate_error (error, _inner_error_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1720 "installer-media.c"
		} else {
#line 130 "/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 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			g_clear_error (&_inner_error_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1728 "installer-media.c"
		}
	}
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp4_ = device;
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = g_udev_device_get_property (_tmp4_, "ID_FS_LABEL");
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->label);
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	self->label = _tmp6_;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp7_ = device;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp8_ = g_udev_device_get_property (_tmp7_, "OSINFO_INSTALLER");
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = _tmp9_;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp11_ = _tmp10_;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp11_ == NULL) {
#line 1753 "installer-media.c"
		GUdevDevice* _tmp12_;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp12_ = device;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp13_ = g_udev_device_get_property (_tmp12_, "OSINFO_LIVE");
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp14_ = g_strdup (_tmp13_);
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp10_);
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp10_ = _tmp14_;
#line 1767 "installer-media.c"
	}
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp15_ = _tmp10_;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	os_id = _tmp16_;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp17_ = os_id;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp17_ != NULL) {
#line 1779 "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 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp18_ = os_db;
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp19_ = os_id;
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp20_ = boxes_os_database_get_os_by_id (_tmp18_, _tmp19_, &_inner_error_);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp21_ = _tmp20_;
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_inner_error_ != NULL) {
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_propagate_error (error, _inner_error_);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (os_id);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp10_);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				return;
#line 1809 "installer-media.c"
			} else {
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (os_id);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp10_);
#line 137 "/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 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				g_clear_error (&_inner_error_);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				return;
#line 1821 "installer-media.c"
			}
		}
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (self->os);
#line 137 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		self->os = _tmp21_;
#line 139 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp22_ = device;
#line 139 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp23_ = g_udev_device_get_property (_tmp22_, "OSINFO_MEDIA");
#line 139 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp24_ = g_strdup (_tmp23_);
#line 139 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		media_id = _tmp24_;
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp25_ = media_id;
#line 140 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		if (_tmp25_ != NULL) {
#line 1840 "installer-media.c"
			BoxesOSDatabase* _tmp26_;
			OsinfoOs* _tmp27_;
			const gchar* _tmp28_;
			OsinfoMedia* _tmp29_ = NULL;
			OsinfoMedia* _tmp30_;
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp26_ = os_db;
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp27_ = self->os;
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp28_ = media_id;
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp29_ = boxes_os_database_get_media_by_id (_tmp26_, _tmp27_, _tmp28_, &_inner_error_);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp30_ = _tmp29_;
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			if (_inner_error_ != NULL) {
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
				if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					g_propagate_error (error, _inner_error_);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (media_id);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (os_id);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp10_);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					return;
#line 1870 "installer-media.c"
				} else {
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (media_id);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (os_id);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp10_);
#line 141 "/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 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					g_clear_error (&_inner_error_);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
					return;
#line 1884 "installer-media.c"
				}
			}
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (self->os_media);
#line 141 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			self->os_media = _tmp30_;
#line 1891 "installer-media.c"
		}
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (media_id);
#line 1895 "installer-media.c"
	}
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (os_id);
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_g_free0 (_tmp10_);
#line 1901 "installer-media.c"
}


static void boxes_installer_media_setup_label (BoxesInstallerMedia* self, const gchar* label) {
	const gchar* _tmp0_;
	gboolean _tmp9_ = FALSE;
	OsinfoMedia* _tmp10_;
	gboolean _tmp14_;
#line 145 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 146 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp0_ = label;
#line 146 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp0_ != NULL) {
#line 1916 "installer-media.c"
		const gchar* _tmp1_;
		gchar* _tmp2_;
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp1_ = label;
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = g_strdup (_tmp1_);
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_g_free0 (self->label);
#line 147 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		self->label = _tmp2_;
#line 1927 "installer-media.c"
	} else {
		OsinfoOs* _tmp3_;
#line 148 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp3_ = self->os;
#line 148 "/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 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp4_ = self->os;
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp5_ = osinfo_product_get_name ((OsinfoProduct*) _tmp4_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp6_ = g_strdup (_tmp5_);
#line 149 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (self->label);
#line 149 "/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 152 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp7_ = self->device_file;
#line 152 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_tmp8_ = g_path_get_basename (_tmp7_);
#line 152 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			_g_free0 (self->label);
#line 152 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			self->label = _tmp8_;
#line 154 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
			return;
#line 1962 "installer-media.c"
		}
	}
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp10_ = self->os_media;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp10_ != NULL) {
#line 1969 "installer-media.c"
		OsinfoMedia* _tmp11_;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp11_ = self->os_media;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp11_, "live", &_tmp12_, NULL);
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp13_ = _tmp12_;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp9_ = _tmp13_;
#line 1981 "installer-media.c"
	} else {
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp9_ = FALSE;
#line 1985 "installer-media.c"
	}
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp14_ = _tmp9_;
#line 157 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp14_) {
#line 1991 "installer-media.c"
		const gchar* _tmp15_ = NULL;
		const gchar* _tmp16_;
		gchar* _tmp17_ = NULL;
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp15_ = _ ("%s (Live)");
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp16_ = self->label;
#line 160 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp17_ = g_strdup_printf (_tmp15_, _tmp16_);
#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 = _tmp17_;
#line 2005 "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 2016 "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 2023 "installer-media.c"
}


gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self) {
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 17 "/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 2032 "installer-media.c"
}


static gboolean boxes_installer_media_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
#line 17 "/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 2045 "installer-media.c"
}


gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	OsinfoMedia* _tmp1_;
	gboolean _tmp5_;
#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"
	_tmp1_ = self->os_media;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	if (_tmp1_ == NULL) {
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = TRUE;
#line 2062 "installer-media.c"
	} else {
		OsinfoMedia* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->os_media;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp2_, "live", &_tmp3_, NULL);
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp4_ = _tmp3_;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp4_;
#line 2075 "installer-media.c"
	}
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _tmp0_;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	result = _tmp5_;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/installer-media.vala"
	return result;
#line 2083 "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)->setup_spice_config = boxes_installer_media_real_setup_spice_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)->check_needed_info = boxes_installer_media_real_check_needed_info;
#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_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"
	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_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_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 2116 "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 2142 "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_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_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 2175 "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 2181 "installer-media.c"
	}
}



