/* installer-media.c generated by valac 0.37.1.4-3591e, 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 <libcommon.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.h>
#include <gudev/gudev.h>
#include <glib/gi18n-lib.h>
#include <stdio.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_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
enum  {
	BOXES_INSTALLER_MEDIA_DUMMY_PROPERTY,
	BOXES_INSTALLER_MEDIA_SUPPORTED_DEVICES,
	BOXES_INSTALLER_MEDIA_INSTALLED_SIZE,
	BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION,
	BOXES_INSTALLER_MEDIA_READY_TO_CREATE,
	BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK,
	BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_NET,
	BOXES_INSTALLER_MEDIA_LIVE,
	BOXES_INSTALLER_MEDIA_ARCHITECTURE,
	BOXES_INSTALLER_MEDIA_LAST_PROPERTY
};
static GParamSpec* boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_LAST_PROPERTY];
#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;

#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 _BoxesInstallerMediaNewForPathData BoxesInstallerMediaNewForPathData;
typedef struct _BoxesInstallerMediaPrepareData BoxesInstallerMediaPrepareData;
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 BOXES_TYPE_CPU_ARCH_COMPATIBILITY (boxes_cpu_arch_compatibility_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesInstallerMediaGetDeviceFromPathData BoxesInstallerMediaGetDeviceFromPathData;
typedef struct _BoxesInstallerMediaGetMediaInfoFromDeviceData BoxesInstallerMediaGetMediaInfoFromDeviceData;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
enum  {
	BOXES_INSTALLER_MEDIA_USER_WANTS_TO_CREATE_SIGNAL,
	BOXES_INSTALLER_MEDIA_LAST_SIGNAL
};
static guint boxes_installer_media_signals[BOXES_INSTALLER_MEDIA_LAST_SIGNAL] = {0};

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

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

struct _BoxesInstallerMediaNewForPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GType object_type;
	BoxesInstallerMedia* self;
	gchar* path;
	BoxesMediaManager* media_manager;
	GCancellable* cancellable;
	GUdevDevice* device;
	const gchar* _tmp0_;
	BoxesMediaManager* _tmp1_;
	GUdevClient* _tmp2_;
	GUdevClient* _tmp3_;
	GCancellable* _tmp4_;
	GUdevDevice* _tmp5_;
	GUdevDevice* _tmp6_;
	GUdevDevice* _tmp7_;
	BoxesMediaManager* _tmp8_;
	BoxesOSDatabase* _tmp9_;
	BoxesOSDatabase* _tmp10_;
	OsinfoMedia* _tmp11_;
	BoxesMediaManager* _tmp12_;
	BoxesOSDatabase* _tmp13_;
	BoxesOSDatabase* _tmp14_;
	const gchar* _tmp15_;
	GCancellable* _tmp16_;
	OsinfoMedia* _tmp17_;
	OsinfoMedia* _tmp18_;
	OsinfoMedia* _tmp19_;
	OsinfoMedia* _tmp20_;
	OsinfoOs* _tmp21_;
	OsinfoOs* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* architecture;
	gchar* _tmp27_;
	BoxesMediaManager* _tmp28_;
	BoxesOSDatabase* _tmp29_;
	BoxesOSDatabase* _tmp30_;
	OsinfoOs* _tmp31_;
	const gchar* _tmp32_;
	OsinfoResources* _tmp33_;
	gint64 _tmp34_;
	gboolean _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	OsinfoResources* _tmp38_;
	gint64 _tmp39_;
	gint64 _tmp40_;
	gint64 _tmp41_;
	OsinfoResources* _tmp42_;
	gint64 _tmp43_;
	gint64 _tmp44_;
	gint64 _tmp45_;
	OsinfoResources* _tmp46_;
	GError * _inner_error_;
};

struct _BoxesInstallerMediaPrepareData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesInstallerMedia* self;
	BoxesActivityProgress* progress;
	GCancellable* cancellable;
	gboolean result;
};

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

typedef enum  {
	BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE = -1,
	BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL = 0,
	BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE = 1,
	BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE = 2
} BoxesCPUArchCompatibility;

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

typedef enum  {
	BOXES_OS_DATABASE_ERROR_NON_BOOTABLE,
	BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED,
	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 _BoxesInstallerMediaGetMediaInfoFromDeviceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesInstallerMedia* self;
	GUdevDevice* device;
	BoxesOSDatabase* os_db;
	gboolean _tmp0_;
	GUdevDevice* _tmp1_;
	const gchar* _tmp2_;
	GUdevDevice* _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	GError* _tmp6_;
	GUdevDevice* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	GUdevDevice* _tmp10_;
	const gchar* _tmp11_;
	GUdevDevice* _tmp12_;
	const gchar* _tmp13_;
	gchar* os_id;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	OsinfoOs* _tmp16_;
	BoxesOSDatabase* _tmp17_;
	const gchar* _tmp18_;
	OsinfoOs* _tmp19_;
	OsinfoOs* _tmp20_;
	gchar* media_id;
	GUdevDevice* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	const gchar* _tmp24_;
	OsinfoMedia* _tmp25_;
	BoxesOSDatabase* _tmp26_;
	OsinfoOs* _tmp27_;
	const gchar* _tmp28_;
	OsinfoMedia* _tmp29_;
	OsinfoMedia* _tmp30_;
	OsinfoMedia* media;
	const gchar* _tmp31_;
	OsinfoMedia* _tmp32_;
	OsinfoMedia* _tmp33_;
	const gchar* _tmp34_;
	GUdevDevice* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar** _tmp39_;
	gchar** _tmp40_;
	gint _tmp40__length1;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar** _tmp44_;
	gchar** _tmp45_;
	gint _tmp45__length1;
	OsinfoMedia* _tmp46_;
	OsinfoMedia* _tmp47_;
	BoxesOSDatabase* _tmp48_;
	OsinfoMedia* _tmp49_;
	OsinfoMedia* _tmp50_;
	OsinfoMedia* _tmp51_;
	OsinfoMedia* _tmp52_;
	OsinfoMedia* _tmp53_;
	OsinfoOs* _tmp54_;
	OsinfoOs* _tmp55_;
	GError * _inner_error_;
};


static gpointer boxes_installer_media_parent_class = NULL;

GType boxes_installer_media_get_type (void) G_GNUC_CONST;
gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
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);
void boxes_installer_media_label_setup (BoxesInstallerMedia* self, const gchar* label);
static void boxes_installer_media_construct_for_path_data_free (gpointer _data);
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
void boxes_installer_media_new_for_path (const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_installer_media_new_for_path_finish (GAsyncResult* _res_, GError** error);
void boxes_installer_media_construct_for_path (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_installer_media_construct_for_path_finish (GAsyncResult* _res_, GError** error);
static gboolean boxes_installer_media_construct_for_path_co (BoxesInstallerMediaNewForPathData* _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_new_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType boxes_os_database_get_type (void) G_GNUC_CONST;
static void boxes_installer_media_get_media_info_from_device (BoxesInstallerMedia* self, GUdevDevice* device, BoxesOSDatabase* os_db, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_installer_media_get_media_info_from_device_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
BoxesOSDatabase* boxes_media_manager_get_os_db (BoxesMediaManager* self);
void boxes_os_database_guess_os_from_install_media_path (BoxesOSDatabase* self, const gchar* media_path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_guess_os_from_install_media_path_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
gchar* boxes_installer_media_get_architecture (BoxesInstallerMedia* self);
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_data_free (gpointer _data);
static void boxes_installer_media_real_prepare (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installer_media_prepare (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean boxes_installer_media_prepare_finish (BoxesInstallerMedia* self, GAsyncResult* _res_);
static gboolean boxes_installer_media_real_prepare_co (BoxesInstallerMediaPrepareData* _data_);
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_);
static gboolean boxes_installer_media_real_prepare_for_installation_co (BoxesInstallerMediaPrepareForInstallationData* _data_);
void boxes_installer_media_prepare_to_continue_installation (BoxesInstallerMedia* self, const gchar* vm_name);
static void boxes_installer_media_real_prepare_to_continue_installation (BoxesInstallerMedia* self, const gchar* vm_name);
void boxes_installer_media_clean_up (BoxesInstallerMedia* self);
static void boxes_installer_media_real_clean_up (BoxesInstallerMedia* self);
void boxes_installer_media_clean_up_preparation_cache (BoxesInstallerMedia* self);
static void boxes_installer_media_real_clean_up_preparation_cache (BoxesInstallerMedia* self);
void boxes_installer_media_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
static void boxes_installer_media_real_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory);
void boxes_installer_media_setup_post_install_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
static void boxes_installer_media_real_setup_post_install_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
static void boxes_installer_media_eject_cdrom_media (BoxesInstallerMedia* self, GVirConfigDomain* domain);
void boxes_installer_media_populate_setup_box (BoxesInstallerMedia* self, GtkBox* setup_box);
static void boxes_installer_media_real_populate_setup_box (BoxesInstallerMedia* self, GtkBox* setup_box);
GList* boxes_installer_media_get_vm_properties (BoxesInstallerMedia* self);
static GList* boxes_installer_media_real_get_vm_properties (BoxesInstallerMedia* self);
static void _boxes_pair_unref0_ (gpointer var);
static inline void _g_list_free__boxes_pair_unref0_ (GList* self);
gboolean boxes_installer_media_is_architecture_compatible (BoxesInstallerMedia* self, const gchar* architecture);
GType boxes_cpu_arch_compatibility_get_type (void) G_GNUC_CONST;
BoxesCPUArchCompatibility boxes_compare_cpu_architectures (const gchar* arch1, const gchar* arch2);
BoxesVMCreator* boxes_installer_media_get_vm_creator (BoxesInstallerMedia* self);
static BoxesVMCreator* boxes_installer_media_real_get_vm_creator (BoxesInstallerMedia* self);
BoxesVMCreator* boxes_vm_creator_new (BoxesInstallerMedia* install_media);
BoxesVMCreator* boxes_vm_creator_construct (GType object_type, BoxesInstallerMedia* install_media);
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_);
static void boxes_installer_media_get_media_info_from_device_data_free (gpointer _data);
static gboolean boxes_installer_media_get_media_info_from_device_co (BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_);
GQuark boxes_os_database_error_quark (void);
static gchar* boxes_installer_media_get_decoded_udev_property (BoxesInstallerMedia* self, GUdevDevice* device, const gchar* property_name);
void boxes_os_database_get_os_by_id (BoxesOSDatabase* self, const gchar* id, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoOs* boxes_os_database_get_os_by_id_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static void boxes_installer_media_get_media_info_from_device_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_get_media_by_id (BoxesOSDatabase* self, OsinfoOs* os, const gchar* id, GError** error);
static void boxes_installer_media_get_decoded_udev_properties_for_media (BoxesInstallerMedia* self, GUdevDevice* device, gchar** udev_props, int udev_props_length1, gchar** media_props, int media_props_length1, OsinfoMedia* media);
void boxes_os_database_guess_os_from_install_media (BoxesOSDatabase* self, OsinfoMedia* media, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_guess_os_from_install_media_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
OsinfoDeviceList* boxes_installer_media_get_supported_devices (BoxesInstallerMedia* self);
guint64 boxes_installer_media_get_installed_size (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_need_user_input_for_vm_creation (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_ready_to_create (BoxesInstallerMedia* self);
gboolean boxes_installer_media_get_supports_virtio_disk (BoxesInstallerMedia* self);
OsinfoDevice* boxes_find_device_by_prop (OsinfoDeviceList* devices, const gchar* prop_name, const gchar* prop_value);
gboolean boxes_installer_media_get_supports_virtio_net (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 void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gpointer _g_object_ref0 (gpointer self) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return self ? g_object_ref (self) : NULL;
#line 442 "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 49 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (resources != NULL, NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = (BoxesInstallerMedia*) g_object_new (object_type, NULL);
#line 54 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = path;
#line 54 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 54 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->device_file);
#line 54 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self->device_file = _tmp1_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = os;
#line 55 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os);
#line 55 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self->os = _tmp3_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = media;
#line 56 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 56 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os_media);
#line 56 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self->os_media = _tmp5_;
#line 57 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp6_ = resources;
#line 57 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 57 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->resources);
#line 57 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self->resources = _tmp7_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self->from_image = TRUE;
#line 60 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp8_ = label;
#line 60 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_label_setup (self, _tmp8_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return self;
#line 505 "installer-media.c"
}


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


static void boxes_installer_media_construct_for_path_data_free (gpointer _data) {
	BoxesInstallerMediaNewForPathData* _data_;
	_data_ = _data;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaNewForPathData, _data_);
#line 529 "installer-media.c"
}


void boxes_installer_media_construct_for_path (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaNewForPathData* _data_;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	BoxesMediaManager* _tmp2_;
	BoxesMediaManager* _tmp3_;
	GCancellable* _tmp4_;
	GCancellable* _tmp5_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaNewForPathData);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_task_new (NULL, cancellable, _callback_, _user_data_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_installer_media_construct_for_path_data_free);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->object_type = object_type;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = path;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->path = _tmp1_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = media_manager;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->media_manager = _tmp3_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = cancellable;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp5_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_construct_for_path_co (_data_);
#line 575 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_construct_for_path_finish (GAsyncResult* _res_, GError** error) {
	BoxesInstallerMedia* result;
	BoxesInstallerMediaNewForPathData* _data_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (NULL == _data_) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return;
#line 588 "installer-media.c"
	}
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _data_->self;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = NULL;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 596 "installer-media.c"
}


static void boxes_installer_media_new_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstallerMediaNewForPathData* _data_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = _user_data_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_source_object_ = source_object;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_res_ = _res_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_construct_for_path_co (_data_);
#line 610 "installer-media.c"
}


static gboolean boxes_installer_media_construct_for_path_co (BoxesInstallerMediaNewForPathData* _data_) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 0:
#line 619 "installer-media.c"
		goto _state_0;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 1:
#line 623 "installer-media.c"
		goto _state_1;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 2:
#line 627 "installer-media.c"
		goto _state_2;
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 3:
#line 631 "installer-media.c"
		goto _state_3;
		default:
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 636 "installer-media.c"
	}
	_state_0:
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = (BoxesInstallerMedia*) g_object_new (_data_->object_type, NULL);
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp0_ = _data_->path;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->media_manager;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = boxes_media_manager_get_client (_data_->_tmp1_);
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp4_ = _data_->cancellable;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_state_ = 1;
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_device_from_path (_data_->self, _data_->_tmp0_, _data_->_tmp3_, _data_->_tmp4_, boxes_installer_media_new_for_path_ready, _data_);
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 657 "installer-media.c"
	_state_1:
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp5_ = boxes_installer_media_get_device_from_path_finish (_data_->self, _data_->_res_);
#line 66 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->device = _data_->_tmp5_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp6_ = _data_->device;
#line 68 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp6_ != NULL) {
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = _data_->device;
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = _data_->media_manager;
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = boxes_media_manager_get_os_db (_data_->_tmp8_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 2;
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_installer_media_get_media_info_from_device (_data_->self, _data_->_tmp7_, _data_->_tmp10_, boxes_installer_media_new_for_path_ready, _data_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 681 "installer-media.c"
		_state_2:
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_installer_media_get_media_info_from_device_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 69 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 695 "installer-media.c"
		}
	} else {
#line 71 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->self->from_image = TRUE;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp12_ = _data_->media_manager;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp13_ = boxes_media_manager_get_os_db (_data_->_tmp12_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp14_ = _data_->_tmp13_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp15_ = _data_->self->device_file;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp16_ = _data_->cancellable;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 3;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_os_database_guess_os_from_install_media_path (_data_->_tmp14_, _data_->_tmp15_, _data_->_tmp16_, boxes_installer_media_new_for_path_ready, _data_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 716 "installer-media.c"
		_state_3:
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp17_ = boxes_os_database_guess_os_from_install_media_path_finish (_data_->_tmp14_, _data_->_res_, &_data_->_inner_error_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp11_ = _data_->_tmp17_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->device);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 732 "installer-media.c"
		}
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->_tmp11_;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp11_ = NULL;
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os_media);
#line 72 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->self->os_media = _data_->_tmp18_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = _data_->self->os_media;
#line 73 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp19_ != NULL) {
#line 74 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp20_ = _data_->self->os_media;
#line 74 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp21_ = osinfo_media_get_os (_data_->_tmp20_);
#line 74 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp22_ = _data_->_tmp21_;
#line 74 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->self->os);
#line 74 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->os = _data_->_tmp22_;
#line 756 "installer-media.c"
		}
#line 68 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->_tmp11_);
#line 760 "installer-media.c"
	}
#line 77 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_label_setup (_data_->self, NULL);
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp24_ = boxes_installer_media_get_architecture (_data_->self);
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp25_ = _data_->_tmp24_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp23_ = _data_->_tmp25_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp23_ == NULL) {
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp26_ = g_strdup ("i686");
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp23_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp23_ = _data_->_tmp26_;
#line 778 "installer-media.c"
	}
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp27_ = _data_->_tmp23_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp23_ = NULL;
#line 80 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->architecture = _data_->_tmp27_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp28_ = _data_->media_manager;
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp29_ = boxes_media_manager_get_os_db (_data_->_tmp28_);
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp30_ = _data_->_tmp29_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp31_ = _data_->self->os;
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp32_ = _data_->architecture;
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp33_ = boxes_os_database_get_resources_for_os (_data_->_tmp30_, _data_->_tmp31_, _data_->_tmp32_);
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self->resources);
#line 81 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self->resources = _data_->_tmp33_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp36_ = _data_->architecture;
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (g_strcmp0 (_data_->_tmp36_, "i686") == 0) {
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp35_ = TRUE;
#line 808 "installer-media.c"
	} else {
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp37_ = _data_->architecture;
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp35_ = g_strcmp0 (_data_->_tmp37_, "i386") == 0;
#line 814 "installer-media.c"
	}
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp35_) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp38_ = _data_->self->resources;
#line 83 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp39_ = osinfo_resources_get_ram (_data_->_tmp38_);
#line 83 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp40_ = _data_->_tmp39_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp41_ = CLAMP (_data_->_tmp40_, (gint64) OSINFO_MEBIBYTES, (gint64) G_MAXUINT32);
#line 83 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp34_ = _data_->_tmp41_;
#line 828 "installer-media.c"
	} else {
#line 84 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp42_ = _data_->self->resources;
#line 84 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp43_ = osinfo_resources_get_ram (_data_->_tmp42_);
#line 84 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp44_ = _data_->_tmp43_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp45_ = CLAMP (_data_->_tmp44_, (gint64) OSINFO_MEBIBYTES, G_MAXINT64);
#line 84 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp34_ = _data_->_tmp45_;
#line 840 "installer-media.c"
	}
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp46_ = _data_->self->resources;
#line 82 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	osinfo_resources_set_ram (_data_->_tmp46_, _data_->_tmp34_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->architecture);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->_tmp23_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->device);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ != 0) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 860 "installer-media.c"
		}
	}
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 867 "installer-media.c"
}


void boxes_installer_media_new_for_path (const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_construct_for_path (BOXES_TYPE_INSTALLER_MEDIA, path, media_manager, cancellable, _callback_, _user_data_);
#line 874 "installer-media.c"
}


BoxesInstallerMedia* boxes_installer_media_new_for_path_finish (GAsyncResult* _res_, GError** error) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return boxes_installer_media_construct_for_path_finish (_res_, error);
#line 881 "installer-media.c"
}


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


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


static void boxes_installer_media_real_prepare_data_free (gpointer _data) {
	BoxesInstallerMediaPrepareData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->progress);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaPrepareData, _data_);
#line 912 "installer-media.c"
}


static void boxes_installer_media_real_prepare (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaPrepareData* _data_;
	BoxesInstallerMedia* _tmp0_;
	BoxesActivityProgress* _tmp1_;
	BoxesActivityProgress* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaPrepareData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_installer_media_real_prepare_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = progress;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->progress);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->progress = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = cancellable;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_real_prepare_co (_data_);
#line 951 "installer-media.c"
}


static gboolean boxes_installer_media_real_prepare_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
	gboolean result;
	BoxesInstallerMediaPrepareData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (NULL == _data_) {
#line 962 "installer-media.c"
		gboolean _tmp0_ = FALSE;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return _tmp0_;
#line 966 "installer-media.c"
	}
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 972 "installer-media.c"
}


static gboolean boxes_installer_media_real_prepare_co (BoxesInstallerMediaPrepareData* _data_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 0:
#line 981 "installer-media.c"
		goto _state_0;
		default:
#line 88 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 986 "installer-media.c"
	}
	_state_0:
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->result = TRUE;
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ != 0) {
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 999 "installer-media.c"
		}
	}
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 90 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 1006 "installer-media.c"
}


void boxes_installer_media_prepare (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare (self, progress, cancellable, _callback_, _user_data_);
#line 1013 "installer-media.c"
}


gboolean boxes_installer_media_prepare_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_finish (self, _res_);
#line 1020 "installer-media.c"
}


static void boxes_installer_media_real_prepare_for_installation_data_free (gpointer _data) {
	BoxesInstallerMediaPrepareForInstallationData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->vm_name);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaPrepareForInstallationData, _data_);
#line 1035 "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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaPrepareForInstallationData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_installer_media_real_prepare_for_installation_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = vm_name;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->vm_name);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->vm_name = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = cancellable;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_real_prepare_for_installation_co (_data_);
#line 1074 "installer-media.c"
}


static void boxes_installer_media_real_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
	BoxesInstallerMediaPrepareForInstallationData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (NULL == _data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return;
#line 1086 "installer-media.c"
	}
}


static gboolean boxes_installer_media_real_prepare_for_installation_co (BoxesInstallerMediaPrepareForInstallationData* _data_) {
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 0:
#line 1096 "installer-media.c"
		goto _state_0;
		default:
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 1101 "installer-media.c"
	}
	_state_0:
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ != 0) {
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1112 "installer-media.c"
		}
	}
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 92 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 1119 "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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_for_installation (self, vm_name, cancellable, _callback_, _user_data_);
#line 1126 "installer-media.c"
}


void boxes_installer_media_prepare_for_installation_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_for_installation_finish (self, _res_);
#line 1133 "installer-media.c"
}


static void boxes_installer_media_real_prepare_to_continue_installation (BoxesInstallerMedia* self, const gchar* vm_name) {
#line 93 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (vm_name != NULL);
#line 1140 "installer-media.c"
}


void boxes_installer_media_prepare_to_continue_installation (BoxesInstallerMedia* self, const gchar* vm_name) {
#line 93 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 93 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->prepare_to_continue_installation (self, vm_name);
#line 1149 "installer-media.c"
}


static void boxes_installer_media_real_clean_up (BoxesInstallerMedia* self) {
#line 95 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_clean_up_preparation_cache (self);
#line 1156 "installer-media.c"
}


void boxes_installer_media_clean_up (BoxesInstallerMedia* self) {
#line 94 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 94 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->clean_up (self);
#line 1165 "installer-media.c"
}


static void boxes_installer_media_real_clean_up_preparation_cache (BoxesInstallerMedia* self) {
}


void boxes_installer_media_clean_up_preparation_cache (BoxesInstallerMedia* self) {
#line 97 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 97 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->clean_up_preparation_cache (self);
#line 1178 "installer-media.c"
}


static void boxes_installer_media_real_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
	GVirConfigDomainDiskType _tmp0_ = 0;
	gboolean _tmp1_;
	GVirConfigDomain* _tmp2_;
	const gchar* _tmp3_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->from_image;
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp1_) {
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_FILE;
#line 1195 "installer-media.c"
	} else {
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_BLOCK;
#line 1199 "installer-media.c"
	}
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = domain;
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = self->device_file;
#line 100 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_add_cd_config (self, _tmp2_, _tmp0_, _tmp3_, "hdc", TRUE);
#line 1207 "installer-media.c"
}


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


static void boxes_installer_media_real_setup_post_install_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
	GVirConfigDomain* _tmp0_;
#line 103 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 104 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = domain;
#line 104 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_eject_cdrom_media (self, _tmp0_);
#line 1228 "installer-media.c"
}


void boxes_installer_media_setup_post_install_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
#line 103 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 103 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->setup_post_install_domain_config (self, domain);
#line 1237 "installer-media.c"
}


static void boxes_installer_media_real_populate_setup_box (BoxesInstallerMedia* self, GtkBox* setup_box) {
#line 107 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (setup_box != NULL);
#line 1244 "installer-media.c"
}


void boxes_installer_media_populate_setup_box (BoxesInstallerMedia* self, GtkBox* setup_box) {
#line 107 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 107 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_GET_CLASS (self)->populate_setup_box (self, setup_box);
#line 1253 "installer-media.c"
}


static void _boxes_pair_unref0_ (gpointer var) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	(var == NULL) ? NULL : (var = (boxes_pair_unref (var), NULL));
#line 1260 "installer-media.c"
}


static inline void _g_list_free__boxes_pair_unref0_ (GList* self) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_list_free_full (self, (GDestroyNotify) _boxes_pair_unref0_);
#line 1267 "installer-media.c"
}


static GList* boxes_installer_media_real_get_vm_properties (BoxesInstallerMedia* self) {
	GList* result = NULL;
	GList* properties = NULL;
	const gchar* _tmp0_;
	BoxesPair* _tmp1_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	properties = NULL;
#line 112 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = self->label;
#line 112 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = boxes_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _ ("System"), _tmp0_);
#line 112 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	properties = g_list_append (properties, _tmp1_);
#line 114 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = properties;
#line 114 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 1288 "installer-media.c"
}


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


gboolean boxes_installer_media_is_architecture_compatible (BoxesInstallerMedia* self, const gchar* architecture) {
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	BoxesCPUArchCompatibility compatibility = 0;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	BoxesCPUArchCompatibility _tmp8_;
	BoxesCPUArchCompatibility _tmp9_;
	BoxesCPUArchCompatibility _tmp10_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 117 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (architecture != NULL, FALSE);
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = boxes_installer_media_get_architecture (self);
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = _tmp0_;
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _tmp1_;
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = _tmp2_ == NULL;
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_tmp2_);
#line 118 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp3_) {
#line 122 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		result = TRUE;
#line 122 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return result;
#line 1335 "installer-media.c"
	}
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = architecture;
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = boxes_installer_media_get_architecture (self);
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp6_ = _tmp5_;
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp7_ = _tmp6_;
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp8_ = boxes_compare_cpu_architectures (_tmp4_, _tmp7_);
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp9_ = _tmp8_;
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_tmp7_);
#line 124 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	compatibility = _tmp9_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp10_ = compatibility;
#line 126 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp10_ != BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
#line 126 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 1359 "installer-media.c"
}


static BoxesVMCreator* boxes_installer_media_real_get_vm_creator (BoxesInstallerMedia* self) {
	BoxesVMCreator* result = NULL;
	BoxesVMCreator* _tmp0_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = boxes_vm_creator_new (self);
#line 130 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp0_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 1372 "installer-media.c"
}


BoxesVMCreator* boxes_installer_media_get_vm_creator (BoxesInstallerMedia* self) {
#line 129 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 129 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_vm_creator (self);
#line 1381 "installer-media.c"
}


void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory) {
	GVirConfigDomainDisk* disk = NULL;
	GVirConfigDomainDisk* _tmp0_;
	GVirConfigDomainDisk* _tmp1_;
	GVirConfigDomainDiskType _tmp2_;
	GVirConfigDomainDisk* _tmp3_;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* _tmp5_;
	GVirConfigDomainDisk* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GVirConfigDomainDisk* _tmp11_;
	gboolean _tmp12_;
	GVirConfigDomain* _tmp14_;
	GVirConfigDomainDisk* _tmp15_;
#line 133 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 133 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 133 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (device_name != NULL);
#line 138 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 138 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	disk = _tmp0_;
#line 140 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = disk;
#line 140 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = type;
#line 140 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_type (_tmp1_, _tmp2_);
#line 141 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = disk;
#line 141 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_guest_device_type (_tmp3_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_CDROM);
#line 142 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = disk;
#line 142 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_name (_tmp4_, "qemu");
#line 143 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = disk;
#line 143 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_driver_format (_tmp5_, GVIR_CONFIG_DOMAIN_DISK_FORMAT_RAW);
#line 144 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp6_ = disk;
#line 144 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp7_ = device_name;
#line 144 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_target_dev (_tmp6_, _tmp7_);
#line 145 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp8_ = iso_path;
#line 145 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp8_ != NULL) {
#line 1438 "installer-media.c"
		GVirConfigDomainDisk* _tmp9_;
		const gchar* _tmp10_;
#line 146 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp9_ = disk;
#line 146 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp10_ = iso_path;
#line 146 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		gvir_config_domain_disk_set_source (_tmp9_, _tmp10_);
#line 1447 "installer-media.c"
	}
#line 147 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp11_ = disk;
#line 147 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_disk_set_target_bus (_tmp11_, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
#line 148 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp12_ = mandatory;
#line 148 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp12_) {
#line 1457 "installer-media.c"
		GVirConfigDomainDisk* _tmp13_;
#line 149 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp13_ = disk;
#line 149 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		gvir_config_domain_disk_set_startup_policy (_tmp13_, GVIR_CONFIG_DOMAIN_DISK_STARTUP_POLICY_MANDATORY);
#line 1463 "installer-media.c"
	}
#line 151 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp14_ = domain;
#line 151 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp15_ = disk;
#line 151 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_add_device (_tmp14_, (GVirConfigDomainDevice*) _tmp15_);
#line 133 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (disk);
#line 1473 "installer-media.c"
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 1019 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 1019 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 1020 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 1020 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 1020 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 1020 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 1022 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 1022 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 1500 "installer-media.c"
		gchar* _tmp4_;
#line 1023 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 1023 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 1023 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1508 "installer-media.c"
	} else {
#line 1025 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		result = -1;
#line 1025 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		return result;
#line 1514 "installer-media.c"
	}
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	glong _tmp2_;
	glong _tmp5_;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_;
	glong _tmp16_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	gchar* _tmp21_;
#line 1363 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1364 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1364 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1364 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	string_length = (glong) _tmp1_;
#line 1365 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = start;
#line 1365 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp2_ < ((glong) 0)) {
#line 1548 "installer-media.c"
		glong _tmp3_;
		glong _tmp4_;
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp3_ = string_length;
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp4_ = start;
#line 1366 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		start = _tmp3_ + _tmp4_;
#line 1557 "installer-media.c"
	}
#line 1368 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp5_ = end;
#line 1368 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp5_ < ((glong) 0)) {
#line 1563 "installer-media.c"
		glong _tmp6_;
		glong _tmp7_;
#line 1369 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp6_ = string_length;
#line 1369 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp7_ = end;
#line 1369 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		end = _tmp6_ + _tmp7_;
#line 1572 "installer-media.c"
	}
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp9_ = start;
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp9_ >= ((glong) 0)) {
#line 1578 "installer-media.c"
		glong _tmp10_;
		glong _tmp11_;
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp10_ = start;
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp11_ = string_length;
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp10_ <= _tmp11_;
#line 1587 "installer-media.c"
	} else {
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp8_ = FALSE;
#line 1591 "installer-media.c"
	}
#line 1371 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp8_, NULL);
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp13_ = end;
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (_tmp13_ >= ((glong) 0)) {
#line 1599 "installer-media.c"
		glong _tmp14_;
		glong _tmp15_;
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp14_ = end;
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp12_ = _tmp14_ <= _tmp15_;
#line 1608 "installer-media.c"
	} else {
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		_tmp12_ = FALSE;
#line 1612 "installer-media.c"
	}
#line 1372 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp12_, NULL);
#line 1373 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp16_ = start;
#line 1373 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp17_ = end;
#line 1373 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp18_ = start;
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp19_ = end;
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp20_ = start;
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp21_;
#line 1374 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 1634 "installer-media.c"
}


void boxes_installer_media_label_setup (BoxesInstallerMedia* self, const gchar* label) {
	const gchar* _tmp0_;
#line 154 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 155 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = label;
#line 155 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp0_ != NULL) {
#line 1646 "installer-media.c"
		const gchar* _tmp1_;
		gchar* _tmp2_;
#line 156 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp1_ = label;
#line 156 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp2_ = g_strdup (_tmp1_);
#line 156 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (self->label);
#line 156 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		self->label = _tmp2_;
#line 1657 "installer-media.c"
	} else {
		gboolean _tmp3_ = FALSE;
		OsinfoOs* _tmp4_;
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp4_ = self->os;
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_tmp4_ != NULL) {
#line 1665 "installer-media.c"
			OsinfoMedia* _tmp5_;
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp5_ = self->os_media;
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp3_ = _tmp5_ != NULL;
#line 1671 "installer-media.c"
		} else {
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp3_ = FALSE;
#line 1675 "installer-media.c"
		}
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_tmp3_) {
#line 1679 "installer-media.c"
			OsinfoOsVariantList* variants = NULL;
			OsinfoMedia* _tmp6_;
			OsinfoOsVariantList* _tmp7_;
			OsinfoOsVariantList* _tmp8_;
			gint _tmp9_;
#line 158 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp6_ = self->os_media;
#line 158 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp7_ = osinfo_media_get_os_variants (_tmp6_);
#line 158 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			variants = _tmp7_;
#line 159 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp8_ = variants;
#line 159 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp9_ = osinfo_list_get_length ((OsinfoList*) _tmp8_);
#line 159 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			if (_tmp9_ > 0) {
#line 1697 "installer-media.c"
				OsinfoOsVariantList* _tmp10_;
				OsinfoEntity* _tmp11_;
				const gchar* _tmp12_;
				gchar* _tmp13_;
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp10_ = variants;
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp11_ = osinfo_list_get_nth ((OsinfoList*) _tmp10_, 0);
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp12_ = osinfo_os_variant_get_name (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, osinfo_os_variant_get_type ()) ? ((OsinfoOsVariant*) _tmp11_) : NULL);
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp13_ = g_strdup (_tmp12_);
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (self->label);
#line 161 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				self->label = _tmp13_;
#line 1714 "installer-media.c"
			} else {
				OsinfoOs* _tmp14_;
				const gchar* _tmp15_;
				gchar* _tmp16_;
#line 163 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp14_ = self->os;
#line 163 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp15_ = osinfo_product_get_name ((OsinfoProduct*) _tmp14_);
#line 163 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp16_ = g_strdup (_tmp15_);
#line 163 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (self->label);
#line 163 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				self->label = _tmp16_;
#line 1729 "installer-media.c"
			}
#line 157 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (variants);
#line 1733 "installer-media.c"
		} else {
			gchar* basename = NULL;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			gint ext_index = 0;
			const gchar* _tmp19_;
			gint _tmp20_;
			gchar* _tmp21_ = NULL;
			gint _tmp22_;
			gchar* _tmp28_;
#line 166 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp17_ = self->device_file;
#line 166 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp18_ = boxes_get_utf8_basename (_tmp17_);
#line 166 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			basename = _tmp18_;
#line 167 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp19_ = basename;
#line 167 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp20_ = string_index_of (_tmp19_, ".", 0);
#line 167 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			ext_index = _tmp20_;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp22_ = ext_index;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			if (_tmp22_ > 0) {
#line 1760 "installer-media.c"
				const gchar* _tmp23_;
				gint _tmp24_;
				gchar* _tmp25_;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp23_ = basename;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp24_ = ext_index;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp25_ = string_slice (_tmp23_, (glong) 0, (glong) _tmp24_);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp21_);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp21_ = _tmp25_;
#line 1774 "installer-media.c"
			} else {
				const gchar* _tmp26_;
				gchar* _tmp27_;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp26_ = basename;
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp27_ = g_strdup (_tmp26_);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp21_);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp21_ = _tmp27_;
#line 1786 "installer-media.c"
			}
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp28_ = g_strdup (_tmp21_);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (self->label);
#line 168 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			self->label = _tmp28_;
#line 170 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_tmp21_);
#line 170 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (basename);
#line 170 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			return;
#line 1800 "installer-media.c"
		}
	}
}


static void boxes_installer_media_get_device_from_path_data_free (gpointer _data) {
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->client);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaGetDeviceFromPathData, _data_);
#line 1821 "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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaGetDeviceFromPathData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_installer_media_get_device_from_path_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = path;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->path = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = client;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->client);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->client = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = cancellable;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->cancellable = _tmp6_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_device_from_path_co (_data_);
#line 1870 "installer-media.c"
}


static GUdevDevice* boxes_installer_media_get_device_from_path_finish (BoxesInstallerMedia* self, GAsyncResult* _res_) {
	GUdevDevice* result;
	BoxesInstallerMediaGetDeviceFromPathData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (NULL == _data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return NULL;
#line 1883 "installer-media.c"
	}
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->result = NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 1891 "installer-media.c"
}


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


static gboolean boxes_installer_media_get_device_from_path_co (BoxesInstallerMediaGetDeviceFromPathData* _data_) {
#line 174 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 174 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 0:
#line 1914 "installer-media.c"
		goto _state_0;
#line 174 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 1:
#line 1918 "installer-media.c"
		goto _state_1;
		default:
#line 174 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 1923 "installer-media.c"
	}
	_state_0:
	{
#line 176 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp0_ = _data_->path;
#line 176 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp1_ = g_file_new_for_path (_data_->_tmp0_);
#line 176 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->mount_dir = _data_->_tmp1_;
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp2_ = _data_->cancellable;
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 1;
#line 177 "/home/fborges/checkout/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 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 1941 "installer-media.c"
		_state_1:
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp3_ = g_file_find_enclosing_mount_finish (_data_->mount_dir, _data_->_res_, &_data_->_inner_error_);
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->mount = _data_->_tmp3_;
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 177 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->mount_dir);
#line 1951 "installer-media.c"
			goto __catch9_g_error;
		}
#line 178 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = g_mount_get_root (_data_->mount);
#line 178 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->root_dir = _data_->_tmp4_;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp5_ = _data_->root_dir;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp6_ = g_file_get_path (_data_->_tmp5_);
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp7_ = _data_->_tmp6_;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp8_ = g_file_get_path (_data_->mount_dir);
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = _data_->_tmp8_;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp10_ = g_strcmp0 (_data_->_tmp7_, _data_->_tmp9_) == 0;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp9_);
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->_tmp7_);
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp10_) {
#line 180 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp11_ = g_mount_get_volume (_data_->mount);
#line 180 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->volume = _data_->_tmp11_;
#line 181 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp12_ = _data_->volume;
#line 181 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp13_ = g_volume_get_identifier (_data_->_tmp12_, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
#line 181 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 181 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp13_;
#line 182 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp14_ = _data_->path;
#line 182 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
#line 182 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->mount_point);
#line 182 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->mount_point = _data_->_tmp15_;
#line 179 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->volume);
#line 1998 "installer-media.c"
		} else {
#line 185 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp16_ = _data_->path;
#line 185 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp17_ = g_strdup (_data_->_tmp16_);
#line 185 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->self->device_file);
#line 185 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->device_file = _data_->_tmp17_;
#line 2008 "installer-media.c"
		}
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->root_dir);
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount);
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->mount_dir);
#line 2016 "installer-media.c"
	}
	goto __finally9;
	__catch9_g_error:
	{
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_inner_error_ = NULL;
#line 188 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->path;
#line 188 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = g_strdup (_data_->_tmp18_);
#line 188 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->self->device_file);
#line 188 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->self->device_file = _data_->_tmp19_;
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_error_free0 (_data_->_error_);
#line 2035 "installer-media.c"
	}
	__finally9:
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 175 "/home/fborges/checkout/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 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_clear_error (&_data_->_inner_error_);
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_object_unref (_data_->_async_result);
#line 175 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 2048 "installer-media.c"
	}
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp20_ = _data_->client;
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp21_ = _data_->self->device_file;
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp22_ = g_udev_client_query_by_device_file (_data_->_tmp20_, _data_->_tmp21_);
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->result = _data_->_tmp22_;
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ != 0) {
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2066 "installer-media.c"
		}
	}
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 191 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 2073 "installer-media.c"
}


static void boxes_installer_media_get_media_info_from_device_data_free (gpointer _data) {
	BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->device);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->os_db);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_slice_free (BoxesInstallerMediaGetMediaInfoFromDeviceData, _data_);
#line 2088 "installer-media.c"
}


static void boxes_installer_media_get_media_info_from_device (BoxesInstallerMedia* self, GUdevDevice* device, BoxesOSDatabase* os_db, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_;
	BoxesInstallerMedia* _tmp0_;
	GUdevDevice* _tmp1_;
	GUdevDevice* _tmp2_;
	BoxesOSDatabase* _tmp3_;
	BoxesOSDatabase* _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_slice_new0 (BoxesInstallerMediaGetMediaInfoFromDeviceData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_installer_media_get_media_info_from_device_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = device;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->device);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->device = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = os_db;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_data_->os_db);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->os_db = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_media_info_from_device_co (_data_);
#line 2127 "installer-media.c"
}


static void boxes_installer_media_get_media_info_from_device_finish (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error) {
	BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (NULL == _data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return;
#line 2139 "installer-media.c"
	}
}


static void boxes_installer_media_get_media_info_from_device_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_ = _user_data_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_source_object_ = source_object;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_res_ = _res_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_get_media_info_from_device_co (_data_);
#line 2154 "installer-media.c"
}


static gboolean boxes_installer_media_get_media_info_from_device_co (BoxesInstallerMediaGetMediaInfoFromDeviceData* _data_) {
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (_data_->_state_) {
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 0:
#line 2163 "installer-media.c"
		goto _state_0;
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 1:
#line 2167 "installer-media.c"
		goto _state_1;
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case 2:
#line 2171 "installer-media.c"
		goto _state_2;
		default:
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_assert_not_reached ();
#line 2176 "installer-media.c"
	}
	_state_0:
#line 195 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp1_ = _data_->device;
#line 195 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp2_ = g_udev_device_get_property (_data_->_tmp1_, "ID_FS_BOOT_SYSTEM_ID");
#line 195 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp2_ == NULL) {
#line 196 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp3_ = _data_->device;
#line 196 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp4_ = g_udev_device_get_property_as_boolean (_data_->_tmp3_, "OSINFO_BOOTABLE");
#line 196 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp0_ = !_data_->_tmp4_;
#line 2191 "installer-media.c"
	} else {
#line 195 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp0_ = FALSE;
#line 2195 "installer-media.c"
	}
#line 195 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp0_) {
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp5_ = _data_->self->device_file;
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp6_ = g_error_new (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_NON_BOOTABLE, "Media %s is not bootable.", _data_->_tmp5_);
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_inner_error_ = _data_->_tmp6_;
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_object_unref (_data_->_async_result);
#line 197 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 2211 "installer-media.c"
	}
#line 199 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp7_ = _data_->device;
#line 199 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp8_ = boxes_installer_media_get_decoded_udev_property (_data_->self, _data_->_tmp7_, "ID_FS_LABEL_ENC");
#line 199 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->self->label);
#line 199 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->self->label = _data_->_tmp8_;
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp10_ = _data_->device;
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp11_ = g_udev_device_get_property (_data_->_tmp10_, "OSINFO_INSTALLER");
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp9_ = _data_->_tmp11_;
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp9_ == NULL) {
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp12_ = _data_->device;
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp13_ = g_udev_device_get_property (_data_->_tmp12_, "OSINFO_LIVE");
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp9_ = _data_->_tmp13_;
#line 2235 "installer-media.c"
	}
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp14_ = g_strdup (_data_->_tmp9_);
#line 201 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->os_id = _data_->_tmp14_;
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_data_->_tmp15_ = _data_->os_id;
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_tmp15_ != NULL) {
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp17_ = _data_->os_db;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp18_ = _data_->os_id;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 1;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_os_database_get_os_by_id (_data_->_tmp17_, _data_->_tmp18_, boxes_installer_media_get_media_info_from_device_ready, _data_);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 2255 "installer-media.c"
		_state_1:
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp19_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp16_ = _data_->_tmp19_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->os_id);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 2271 "installer-media.c"
		}
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp20_ = _data_->_tmp16_;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp16_ = NULL;
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os);
#line 205 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->self->os = _data_->_tmp20_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp21_ = _data_->device;
#line 207 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp22_ = g_udev_device_get_property (_data_->_tmp21_, "OSINFO_MEDIA");
#line 207 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp23_ = g_strdup (_data_->_tmp22_);
#line 207 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->media_id = _data_->_tmp23_;
#line 208 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp24_ = _data_->media_id;
#line 208 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp24_ != NULL) {
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp26_ = _data_->os_db;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp27_ = _data_->self->os;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp28_ = _data_->media_id;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp29_ = boxes_os_database_get_media_by_id (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, &_data_->_inner_error_);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp25_ = _data_->_tmp29_;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (_data_->media_id);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_object_unref0 (_data_->_tmp16_);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (_data_->os_id);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				g_object_unref (_data_->_async_result);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				return FALSE;
#line 2317 "installer-media.c"
			}
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp30_ = _data_->_tmp25_;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp25_ = NULL;
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->self->os_media);
#line 209 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->os_media = _data_->_tmp30_;
#line 208 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->_tmp25_);
#line 2329 "installer-media.c"
		}
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_data_->media_id);
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->_tmp16_);
#line 2335 "installer-media.c"
	} else {
#line 211 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp31_ = _data_->self->device_file;
#line 211 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp32_ = osinfo_media_new (_data_->_tmp31_, OSINFO_ARCHITECTURE_ALL);
#line 211 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->media = _data_->_tmp32_;
#line 212 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp33_ = _data_->media;
#line 212 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp34_ = _data_->self->label;
#line 212 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_object_set (_data_->_tmp33_, "volume-id", _data_->_tmp34_, NULL);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp35_ = _data_->device;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp36_ = g_strdup ("ID_FS_SYSTEM_ID");
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp37_ = g_strdup ("ID_FS_PUBLISHER_ID");
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp38_ = g_strdup ("ID_FS_APPLICATION_ID");
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp39_ = g_new0 (gchar*, 3 + 1);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp39_[0] = _data_->_tmp36_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp39_[1] = _data_->_tmp37_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp39_[2] = _data_->_tmp38_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp40_ = _data_->_tmp39_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp40__length1 = 3;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp41_ = g_strdup (OSINFO_MEDIA_PROP_SYSTEM_ID);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp42_ = g_strdup (OSINFO_MEDIA_PROP_PUBLISHER_ID);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp43_ = g_strdup (OSINFO_MEDIA_PROP_APPLICATION_ID);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp44_ = g_new0 (gchar*, 3 + 1);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp44_[0] = _data_->_tmp41_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp44_[1] = _data_->_tmp42_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp44_[2] = _data_->_tmp43_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp45_ = _data_->_tmp44_;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp45__length1 = 3;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp46_ = _data_->media;
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_installer_media_get_decoded_udev_properties_for_media (_data_->self, _data_->_tmp35_, _data_->_tmp40_, 3, _data_->_tmp45_, 3, _data_->_tmp46_);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp45_ = (_vala_array_free (_data_->_tmp45_, _data_->_tmp45__length1, (GDestroyNotify) g_free), NULL);
#line 213 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp40_ = (_vala_array_free (_data_->_tmp40_, _data_->_tmp40__length1, (GDestroyNotify) g_free), NULL);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp48_ = _data_->os_db;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp49_ = _data_->media;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_state_ = 2;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		boxes_os_database_guess_os_from_install_media (_data_->_tmp48_, _data_->_tmp49_, boxes_installer_media_get_media_info_from_device_ready, _data_);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return FALSE;
#line 2405 "installer-media.c"
		_state_2:
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp50_ = boxes_os_database_guess_os_from_install_media_finish (_data_->_tmp48_, _data_->_res_, &_data_->_inner_error_);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp47_ = _data_->_tmp50_;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->media);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_free0 (_data_->os_id);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_object_unref (_data_->_async_result);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			return FALSE;
#line 2423 "installer-media.c"
		}
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp51_ = _data_->_tmp47_;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp47_ = NULL;
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->self->os_media);
#line 219 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->self->os_media = _data_->_tmp51_;
#line 220 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_data_->_tmp52_ = _data_->self->os_media;
#line 220 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		if (_data_->_tmp52_ != NULL) {
#line 221 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp53_ = _data_->self->os_media;
#line 221 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp54_ = osinfo_media_get_os (_data_->_tmp53_);
#line 221 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->_tmp55_ = _data_->_tmp54_;
#line 221 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_g_object_unref0 (_data_->self->os);
#line 221 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_data_->self->os = _data_->_tmp55_;
#line 2447 "installer-media.c"
		}
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->_tmp47_);
#line 203 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_data_->media);
#line 2453 "installer-media.c"
	}
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (_data_->os_id);
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_data_->_state_ != 0) {
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2465 "installer-media.c"
		}
	}
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_unref (_data_->_async_result);
#line 194 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return FALSE;
#line 2472 "installer-media.c"
}


static void boxes_installer_media_get_decoded_udev_properties_for_media (BoxesInstallerMedia* self, GUdevDevice* device, gchar** udev_props, int udev_props_length1, gchar** media_props, int media_props_length1, OsinfoMedia* media) {
#line 225 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 225 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (device != NULL);
#line 225 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (media != NULL);
#line 2483 "installer-media.c"
	{
		gint i = 0;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		i = 0;
#line 2488 "installer-media.c"
		{
			gboolean _tmp0_ = FALSE;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp0_ = TRUE;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			while (TRUE) {
#line 2495 "installer-media.c"
				gint _tmp2_;
				gchar** _tmp3_;
				gint _tmp3__length1;
				gchar* val = NULL;
				GUdevDevice* _tmp4_;
				gchar** _tmp5_;
				gint _tmp5__length1;
				gint _tmp6_;
				const gchar* _tmp7_;
				gchar* _tmp8_;
				const gchar* _tmp9_;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (!_tmp0_) {
#line 2509 "installer-media.c"
					gint _tmp1_;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp1_ = i;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					i = _tmp1_ + 1;
#line 2515 "installer-media.c"
				}
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp0_ = FALSE;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp2_ = i;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp3_ = udev_props;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp3__length1 = udev_props_length1;
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (!(_tmp2_ < _tmp3__length1)) {
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					break;
#line 2529 "installer-media.c"
				}
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp4_ = device;
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp5_ = udev_props;
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp5__length1 = udev_props_length1;
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp6_ = i;
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp7_ = _tmp5_[_tmp6_];
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp8_ = boxes_installer_media_get_decoded_udev_property (self, _tmp4_, _tmp7_);
#line 230 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				val = _tmp8_;
#line 231 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp9_ = val;
#line 231 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (_tmp9_ != NULL) {
#line 2549 "installer-media.c"
					OsinfoMedia* _tmp10_;
					gchar** _tmp11_;
					gint _tmp11__length1;
					gint _tmp12_;
					const gchar* _tmp13_;
					const gchar* _tmp14_;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp10_ = media;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp11_ = media_props;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp11__length1 = media_props_length1;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp12_ = i;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp13_ = _tmp11_[_tmp12_];
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp14_ = val;
#line 232 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					g_object_set ((GObject*) _tmp10_, _tmp13_, _tmp14_, NULL);
#line 2570 "installer-media.c"
				}
#line 229 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (val);
#line 2574 "installer-media.c"
			}
		}
	}
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_;
	gchar _tmp1_;
#line 1118 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 1119 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 1119 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 1119 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 1119 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 2595 "installer-media.c"
}


static gchar* boxes_installer_media_get_decoded_udev_property (BoxesInstallerMedia* self, GUdevDevice* device, const gchar* property_name) {
	gchar* result = NULL;
	gchar* encoded = NULL;
	GUdevDevice* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* decoded = NULL;
	gchar* _tmp5_;
#line 236 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 236 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (device != NULL, NULL);
#line 236 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (property_name != NULL, NULL);
#line 237 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = device;
#line 237 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = property_name;
#line 237 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = g_udev_device_get_property (_tmp0_, _tmp1_);
#line 237 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 237 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	encoded = _tmp3_;
#line 238 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = encoded;
#line 238 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp4_ == NULL) {
#line 239 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		result = NULL;
#line 239 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (encoded);
#line 239 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		return result;
#line 2635 "installer-media.c"
	}
#line 241 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = g_strdup ("");
#line 241 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	decoded = _tmp5_;
#line 2641 "installer-media.c"
	{
		gint i = 0;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		i = 0;
#line 2646 "installer-media.c"
		{
			gboolean _tmp6_ = FALSE;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp6_ = TRUE;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			while (TRUE) {
#line 2653 "installer-media.c"
				gint _tmp7_;
				const gchar* _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				guint x = 0U;
				const gchar* _tmp11_;
				gint _tmp12_;
				const gchar* _tmp13_;
				gint _tmp14_;
				gint _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				gint _tmp18_;
				gboolean _tmp19_;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (!_tmp6_) {
#line 2670 "installer-media.c"
				}
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp6_ = FALSE;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp7_ = i;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp8_ = encoded;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp9_ = strlen (_tmp8_);
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp10_ = _tmp9_;
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (!(_tmp7_ < _tmp10_)) {
#line 242 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					break;
#line 2686 "installer-media.c"
				}
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp11_ = encoded;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp12_ = i;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp13_ = encoded;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp14_ = strlen (_tmp13_);
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp15_ = _tmp14_;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp16_ = string_slice (_tmp11_, (glong) _tmp12_, (glong) _tmp15_);
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp17_ = _tmp16_;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp18_ = sscanf (_tmp17_, "\\x%02x", &x);
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp19_ = _tmp18_ > 0;
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_free0 (_tmp17_);
#line 245 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (_tmp19_) {
#line 2710 "installer-media.c"
					const gchar* _tmp20_;
					guint _tmp21_;
					gchar* _tmp22_;
					gchar* _tmp23_;
					gchar* _tmp24_;
					gint _tmp25_;
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp20_ = decoded;
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp21_ = x;
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp22_ = g_strdup_printf ("%c", (gchar) _tmp21_);
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp23_ = _tmp22_;
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp24_ = g_strconcat (_tmp20_, _tmp23_, NULL);
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_g_free0 (decoded);
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					decoded = _tmp24_;
#line 246 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp23_);
#line 247 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp25_ = i;
#line 247 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					i = _tmp25_ + 4;
#line 2737 "installer-media.c"
				} else {
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					gint _tmp28_;
					gchar _tmp29_;
					gchar* _tmp30_;
					gchar* _tmp31_;
					gchar* _tmp32_;
					gint _tmp33_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp26_ = decoded;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp27_ = encoded;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp28_ = i;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp29_ = string_get (_tmp27_, (glong) _tmp28_);
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp30_ = g_strdup_printf ("%c", _tmp29_);
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp31_ = _tmp30_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp32_ = g_strconcat (_tmp26_, _tmp31_, NULL);
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_g_free0 (decoded);
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					decoded = _tmp32_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_g_free0 (_tmp31_);
#line 250 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp33_ = i;
#line 250 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					i = _tmp33_ + 1;
#line 2771 "installer-media.c"
				}
			}
		}
	}
#line 254 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = decoded;
#line 254 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (encoded);
#line 254 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 2782 "installer-media.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 257 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 2789 "installer-media.c"
}


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 257 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 2796 "installer-media.c"
}


static void boxes_installer_media_eject_cdrom_media (BoxesInstallerMedia* self, GVirConfigDomain* domain) {
	GList* devices = NULL;
	GVirConfigDomain* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	GVirConfigDomain* _tmp14_;
	GList* _tmp15_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (self != NULL);
#line 257 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_if_fail (domain != NULL);
#line 258 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = domain;
#line 258 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = gvir_config_domain_get_devices (_tmp0_);
#line 258 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	devices = _tmp1_;
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = devices;
#line 2819 "installer-media.c"
	{
		GList* device_collection = NULL;
		GList* device_it = NULL;
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		device_collection = _tmp2_;
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
#line 2827 "installer-media.c"
			GVirConfigDomainDevice* _tmp3_;
			GVirConfigDomainDevice* device = NULL;
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			_tmp3_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_it->data);
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
			device = _tmp3_;
#line 2834 "installer-media.c"
			{
				GVirConfigDomainDevice* _tmp4_;
				GVirConfigDomainDisk* disk = NULL;
				GVirConfigDomainDevice* _tmp5_;
				GVirConfigDomainDisk* _tmp6_;
				GVirConfigDomainDiskGuestDeviceType disk_type = 0;
				GVirConfigDomainDisk* _tmp7_;
				GVirConfigDomainDiskGuestDeviceType _tmp8_;
				GVirConfigDomainDiskGuestDeviceType _tmp9_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp4_ = device;
#line 260 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gvir_config_domain_disk_get_type ())) {
#line 261 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_g_object_unref0 (device);
#line 261 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					continue;
#line 2852 "installer-media.c"
				}
#line 263 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp5_ = device;
#line 263 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gvir_config_domain_disk_get_type ()) ? ((GVirConfigDomainDisk*) _tmp5_) : NULL);
#line 263 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				disk = _tmp6_;
#line 264 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp7_ = disk;
#line 264 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp8_ = gvir_config_domain_disk_get_guest_device_type (_tmp7_);
#line 264 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				disk_type = _tmp8_;
#line 265 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_tmp9_ = disk_type;
#line 265 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				if (_tmp9_ == GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_CDROM) {
#line 2870 "installer-media.c"
					GVirConfigDomainDisk* _tmp10_;
					gboolean _tmp11_;
					gboolean _tmp12_;
#line 267 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp10_ = disk;
#line 267 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					gvir_config_domain_disk_set_startup_policy (_tmp10_, GVIR_CONFIG_DOMAIN_DISK_STARTUP_POLICY_OPTIONAL);
#line 268 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp11_ = boxes_installer_media_get_live (self);
#line 268 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					_tmp12_ = _tmp11_;
#line 268 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
					if (!_tmp12_) {
#line 2884 "installer-media.c"
						GVirConfigDomainDisk* _tmp13_;
#line 270 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
						_tmp13_ = disk;
#line 270 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
						gvir_config_domain_disk_set_source (_tmp13_, "");
#line 2890 "installer-media.c"
					}
				}
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_object_unref0 (disk);
#line 259 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
				_g_object_unref0 (device);
#line 2897 "installer-media.c"
			}
		}
	}
#line 274 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp14_ = domain;
#line 274 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp15_ = devices;
#line 274 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	gvir_config_domain_set_devices (_tmp14_, _tmp15_);
#line 257 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	__g_list_free__g_object_unref0_0 (devices);
#line 2909 "installer-media.c"
}


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


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


OsinfoDeviceList* boxes_installer_media_get_supported_devices (BoxesInstallerMedia* self) {
#line 17 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 17 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_supported_devices (self);
#line 2935 "installer-media.c"
}


static OsinfoDeviceList* boxes_installer_media_real_get_supported_devices (BoxesInstallerMedia* base) {
	OsinfoDeviceList* result;
	BoxesInstallerMedia* self;
	OsinfoDeviceList* _tmp0_ = NULL;
	OsinfoOs* _tmp1_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->os;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp1_ != NULL) {
#line 2950 "installer-media.c"
		OsinfoOs* _tmp2_;
		OsinfoDeviceList* _tmp3_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->os;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp3_ = osinfo_os_get_all_devices (_tmp2_, NULL);
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_tmp0_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp3_;
#line 2961 "installer-media.c"
	} else {
		OsinfoDeviceList* _tmp4_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp4_ = osinfo_devicelist_new ();
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_object_unref0 (_tmp0_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp4_;
#line 2970 "installer-media.c"
	}
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp0_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 2976 "installer-media.c"
}


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


static guint64 boxes_installer_media_real_get_installed_size (BoxesInstallerMedia* base) {
	guint64 result;
	BoxesInstallerMedia* self;
#line 25 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 25 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = (guint64) 0;
#line 25 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 2998 "installer-media.c"
}


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


static gboolean boxes_installer_media_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
#line 26 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 26 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = FALSE;
#line 26 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3020 "installer-media.c"
}


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


static gboolean boxes_installer_media_real_get_ready_to_create (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
#line 27 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 27 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = TRUE;
#line 27 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3042 "installer-media.c"
}


gboolean boxes_installer_media_get_supports_virtio_disk (BoxesInstallerMedia* self) {
	gboolean result;
	OsinfoDeviceList* _tmp0_;
	OsinfoDeviceList* _tmp1_;
	OsinfoDeviceList* _tmp2_;
	OsinfoDevice* _tmp3_;
	OsinfoDevice* _tmp4_;
	gboolean _tmp5_;
#line 30 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = boxes_installer_media_get_supported_devices (self);
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = _tmp0_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _tmp1_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = boxes_find_device_by_prop (_tmp2_, OSINFO_DEVICE_PROP_NAME, "virtio-block");
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _tmp3_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _tmp4_ != NULL;
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_tmp4_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_tmp2_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp5_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3076 "installer-media.c"
}


gboolean boxes_installer_media_get_supports_virtio_net (BoxesInstallerMedia* self) {
	gboolean result;
	OsinfoDeviceList* _tmp0_;
	OsinfoDeviceList* _tmp1_;
	OsinfoDeviceList* _tmp2_;
	OsinfoDevice* _tmp3_;
	OsinfoDevice* _tmp4_;
	gboolean _tmp5_;
#line 36 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp0_ = boxes_installer_media_get_supported_devices (self);
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = _tmp0_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp2_ = _tmp1_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp3_ = boxes_find_device_by_prop (_tmp2_, OSINFO_DEVICE_PROP_NAME, "virtio-net");
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp4_ = _tmp3_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp5_ = _tmp4_ != NULL;
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_tmp4_);
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (_tmp2_);
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp5_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3110 "installer-media.c"
}


gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self) {
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_live (self);
#line 3119 "installer-media.c"
}


static gboolean boxes_installer_media_real_get_live (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstallerMedia* self;
	gboolean _tmp0_ = FALSE;
	OsinfoMedia* _tmp1_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->os_media;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp1_ == NULL) {
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = TRUE;
#line 3136 "installer-media.c"
	} else {
		OsinfoMedia* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->os_media;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp2_, "live", &_tmp3_, NULL);
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp4_ = _tmp3_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp4_;
#line 3149 "installer-media.c"
	}
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp0_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3155 "installer-media.c"
}


gchar* boxes_installer_media_get_architecture (BoxesInstallerMedia* self) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 44 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return BOXES_INSTALLER_MEDIA_GET_CLASS (self)->get_architecture (self);
#line 3164 "installer-media.c"
}


static gchar* boxes_installer_media_real_get_architecture (BoxesInstallerMedia* base) {
	gchar* result;
	BoxesInstallerMedia* self;
	gchar* _tmp0_ = NULL;
	OsinfoMedia* _tmp1_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = base;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_tmp1_ = self->os_media;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	if (_tmp1_ != NULL) {
#line 3179 "installer-media.c"
		OsinfoMedia* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp2_ = self->os_media;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_object_get (_tmp2_, "architecture", &_tmp3_, NULL);
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp4_ = _tmp3_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp0_);
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = _tmp4_;
#line 3193 "installer-media.c"
	} else {
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_g_free0 (_tmp0_);
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		_tmp0_ = NULL;
#line 3199 "installer-media.c"
	}
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	result = _tmp0_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	return result;
#line 3205 "installer-media.c"
}


static void boxes_installer_media_class_init (BoxesInstallerMediaClass * klass) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->set_direct_boot_params = (void (*) (BoxesInstallerMedia *, GVirConfigDomainOs*)) boxes_installer_media_real_set_direct_boot_params;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->prepare = (void (*) (BoxesInstallerMedia *, BoxesActivityProgress*, GCancellable*, GAsyncReadyCallback, gpointer)) boxes_installer_media_real_prepare;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->prepare_finish = (gboolean (*) (BoxesInstallerMedia *, GAsyncResult*)) boxes_installer_media_real_prepare_finish;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->prepare_for_installation = (void (*) (BoxesInstallerMedia *, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)) boxes_installer_media_real_prepare_for_installation;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->prepare_for_installation_finish = (void (*) (BoxesInstallerMedia *, GAsyncResult*)) boxes_installer_media_real_prepare_for_installation_finish;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->prepare_to_continue_installation = (void (*) (BoxesInstallerMedia *, const gchar*)) boxes_installer_media_real_prepare_to_continue_installation;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->clean_up = (void (*) (BoxesInstallerMedia *)) boxes_installer_media_real_clean_up;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->clean_up_preparation_cache = (void (*) (BoxesInstallerMedia *)) boxes_installer_media_real_clean_up_preparation_cache;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->setup_domain_config = (void (*) (BoxesInstallerMedia *, GVirConfigDomain*)) boxes_installer_media_real_setup_domain_config;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->setup_post_install_domain_config = (void (*) (BoxesInstallerMedia *, GVirConfigDomain*)) boxes_installer_media_real_setup_post_install_domain_config;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->populate_setup_box = (void (*) (BoxesInstallerMedia *, GtkBox*)) boxes_installer_media_real_populate_setup_box;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_properties = (GList* (*) (BoxesInstallerMedia *)) boxes_installer_media_real_get_vm_properties;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_creator = (BoxesVMCreator* (*) (BoxesInstallerMedia *)) boxes_installer_media_real_get_vm_creator;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_supported_devices = boxes_installer_media_real_get_supported_devices;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_installed_size = boxes_installer_media_real_get_installed_size;
#line 7 "/home/fborges/checkout/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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_ready_to_create = boxes_installer_media_real_get_ready_to_create;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_live = boxes_installer_media_real_get_live;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_architecture = boxes_installer_media_real_get_architecture;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_installer_media_get_property;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_installer_media_finalize;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_SUPPORTED_DEVICES, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_SUPPORTED_DEVICES] = g_param_spec_object ("supported-devices", "supported-devices", "supported-devices", osinfo_devicelist_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_INSTALLED_SIZE, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_INSTALLED_SIZE] = g_param_spec_uint64 ("installed-size", "installed-size", "installed-size", 0, G_MAXUINT64, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION, boxes_installer_media_properties[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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_READY_TO_CREATE, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_READY_TO_CREATE] = g_param_spec_boolean ("ready-to-create", "ready-to-create", "ready-to-create", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK] = g_param_spec_boolean ("supports-virtio-disk", "supports-virtio-disk", "supports-virtio-disk", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_NET, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_NET] = g_param_spec_boolean ("supports-virtio-net", "supports-virtio-net", "supports-virtio-net", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_LIVE, boxes_installer_media_properties[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 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLER_MEDIA_ARCHITECTURE, boxes_installer_media_properties[BOXES_INSTALLER_MEDIA_ARCHITECTURE] = g_param_spec_string ("architecture", "architecture", "architecture", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	boxes_installer_media_signals[BOXES_INSTALLER_MEDIA_USER_WANTS_TO_CREATE_SIGNAL] = g_signal_new ("user-wants-to-create", BOXES_TYPE_INSTALLER_MEDIA, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 3272 "installer-media.c"
}


static void boxes_installer_media_instance_init (BoxesInstallerMedia * self) {
}


static void boxes_installer_media_finalize (GObject * obj) {
	BoxesInstallerMedia * self;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia);
#line 8 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os);
#line 9 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->resources);
#line 10 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_object_unref0 (self->os_media);
#line 11 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->label);
#line 12 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->device_file);
#line 13 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	_g_free0 (self->mount_point);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	G_OBJECT_CLASS (boxes_installer_media_parent_class)->finalize (obj);
#line 3298 "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 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
	switch (property_id) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_SUPPORTED_DEVICES:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_take_object (value, boxes_installer_media_get_supported_devices (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_INSTALLED_SIZE:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_uint64 (value, boxes_installer_media_get_installed_size (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_need_user_input_for_vm_creation (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_READY_TO_CREATE:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_ready_to_create (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_DISK:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_supports_virtio_disk (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_SUPPORTS_VIRTIO_NET:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_supports_virtio_net (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_LIVE:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_live (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		case BOXES_INSTALLER_MEDIA_ARCHITECTURE:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		g_value_take_string (value, boxes_installer_media_get_architecture (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 3367 "installer-media.c"
		default:
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 7 "/home/fborges/checkout/gnome-boxes/src/installer-media.vala"
		break;
#line 3373 "installer-media.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



