/* installed-media.c generated by valac 0.21.2, the Vala compiler
 * generated from installed-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 <glib/gi18n-lib.h>


#define BOXES_TYPE_INSTALLER_MEDIA (boxes_installer_media_get_type ())
#define BOXES_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia))
#define BOXES_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))
#define BOXES_IS_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_IS_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_INSTALLER_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))

typedef struct _BoxesInstallerMedia BoxesInstallerMedia;
typedef struct _BoxesInstallerMediaClass BoxesInstallerMediaClass;
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

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

#define BOXES_TYPE_INSTALLED_MEDIA (boxes_installed_media_get_type ())
#define BOXES_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMedia))
#define BOXES_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))
#define BOXES_IS_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_IS_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_INSTALLED_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))

typedef struct _BoxesInstalledMedia BoxesInstalledMedia;
typedef struct _BoxesInstalledMediaClass BoxesInstalledMediaClass;
typedef struct _BoxesInstalledMediaPrivate BoxesInstalledMediaPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_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;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesInstalledMediaNewData BoxesInstalledMediaNewData;
typedef struct _BoxesInstalledMediaConvertToNativeFormatData BoxesInstalledMediaConvertToNativeFormatData;
#define __g_list_free__boxes_pair_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__boxes_pair_unref0_ (var), NULL)))

#define BOXES_TYPE_VM_IMPORTER (boxes_vm_importer_get_type ())
#define BOXES_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_IMPORTER, BoxesVMImporter))
#define BOXES_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_IMPORTER, BoxesVMImporterClass))
#define BOXES_IS_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_IMPORTER))
#define BOXES_IS_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_IMPORTER))
#define BOXES_VM_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_IMPORTER, BoxesVMImporterClass))

typedef struct _BoxesVMImporter BoxesVMImporter;
typedef struct _BoxesVMImporterClass BoxesVMImporterClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _BoxesInstalledMediaDecompressData BoxesInstalledMediaDecompressData;

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

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare) (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_vbox) (BoxesInstallerMedia* self, GtkBox* setup_vbox);
	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 _BoxesInstalledMedia {
	BoxesInstallerMedia parent_instance;
	BoxesInstalledMediaPrivate * priv;
};

struct _BoxesInstalledMediaClass {
	BoxesInstallerMediaClass parent_class;
};

typedef enum  {
	BOXES_OS_DATABASE_ERROR_NON_BOOTABLE,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_MEDIA_ID
} BoxesOSDatabaseError;
#define BOXES_OS_DATABASE_ERROR boxes_os_database_error_quark ()
struct _BoxesInstalledMediaNewData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GType object_type;
	BoxesInstalledMedia* self;
	gchar* path;
	BoxesMediaManager* media_manager;
	gboolean supported;
	const gchar** extension_collection;
	gint extension_collection_length1;
	gint _extension_collection_size_;
	gint extension_it;
	const gchar* extension;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	GError* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	OsinfoOs* _tmp15_;
	BoxesMediaManager* _tmp16_;
	BoxesOSDatabase* _tmp17_;
	BoxesOSDatabase* _tmp18_;
	OsinfoOs* _tmp19_;
	GError* _error_;
	GError* _vala1__error_;
	GError* _tmp20_;
	GError* _tmp21_;
	OsinfoResources* _tmp22_;
	OsinfoOs* _tmp23_;
	BoxesMediaManager* _tmp24_;
	BoxesOSDatabase* _tmp25_;
	BoxesOSDatabase* _tmp26_;
	OsinfoOs* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	OsinfoResources* _tmp31_;
	OsinfoResources* _tmp32_;
	OsinfoResources* _tmp33_;
	OsinfoResources* _tmp34_;
	GError * _inner_error_;
};

struct _BoxesInstalledMediaConvertToNativeFormatData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstalledMedia* self;
	gchar* destination_path;
	gboolean decompressed;
	gboolean _tmp0_;
	gchar** argv;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gint argv_length1;
	gint _argv_size_;
	gboolean converting;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gboolean _tmp20_;
	GFile* file;
	const gchar* _tmp21_;
	GFile* _tmp22_;
	GFile* _tmp23_;
	GError * _inner_error_;
};

struct _BoxesInstalledMediaDecompressData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstalledMedia* self;
	gboolean result;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	GFile* compressed;
	const gchar* _tmp2_;
	GFile* _tmp3_;
	GFileInputStream* input_stream;
	GFile* _tmp4_;
	GFileInputStream* _tmp5_;
	gchar* decompressed_path;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	GFile* decompressed;
	const gchar* _tmp13_;
	GFile* _tmp14_;
	GOutputStream* output_stream;
	GFile* _tmp15_;
	GFileOutputStream* _tmp16_;
	GZlibDecompressor* decompressor;
	GZlibDecompressor* _tmp17_;
	GOutputStream* _tmp18_;
	GZlibDecompressor* _tmp19_;
	GConverterOutputStream* _tmp20_;
	const gchar* _tmp21_;
	guint8* buffer;
	guint8* _tmp22_;
	gint buffer_length1;
	gint _buffer_size_;
	gssize length;
	GFileInputStream* _tmp23_;
	guint8* _tmp24_;
	gint _tmp24__length1;
	gssize _tmp25_;
	gssize _tmp26_;
	gssize written;
	gssize i;
	gboolean _tmp27_;
	gboolean _tmp28_;
	gssize _tmp29_;
	gssize _tmp30_;
	gssize _tmp31_;
	GOutputStream* _tmp32_;
	guint8* _tmp33_;
	gint _tmp33__length1;
	gssize _tmp34_;
	gssize _tmp35_;
	gssize _tmp36_;
	gssize _tmp37_;
	gssize _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	gchar* _tmp41_;
	GError * _inner_error_;
};


static gpointer boxes_installed_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;
GType boxes_installed_media_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_INSTALLED_MEDIA_DUMMY_PROPERTY,
	BOXES_INSTALLED_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION,
	BOXES_INSTALLED_MEDIA_READY_TO_CREATE,
	BOXES_INSTALLED_MEDIA_LIVE,
	BOXES_INSTALLED_MEDIA_FORMAT,
	BOXES_INSTALLED_MEDIA_ARCHITECTURE
};
static void boxes_installed_media_construct_data_free (gpointer _data);
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
void boxes_installed_media_new (const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstalledMedia* boxes_installed_media_new_finish (GAsyncResult* _res_, GError** error);
void boxes_installed_media_construct (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstalledMedia* boxes_installed_media_construct_finish (GAsyncResult* _res_, GError** error);
static gboolean boxes_installed_media_construct_co (BoxesInstalledMediaNewData* _data_);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
GType boxes_os_database_get_type (void) G_GNUC_CONST;
BoxesOSDatabase* boxes_media_manager_get_os_db (BoxesMediaManager* self);
void boxes_os_database_get_os_by_id (BoxesOSDatabase* self, const gchar* id, GAsyncReadyCallback _callback_, gpointer _user_data_);
GQuark boxes_os_database_error_quark (void);
OsinfoOs* boxes_os_database_get_os_by_id_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static void boxes_installed_media_new_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
OsinfoResources* boxes_os_database_get_resources_for_os (BoxesOSDatabase* self, OsinfoOs* os, const gchar* architecture);
gchar* boxes_installer_media_get_architecture (BoxesInstallerMedia* self);
OsinfoResources* boxes_os_database_get_default_resources (void);
void boxes_installer_media_label_setup (BoxesInstallerMedia* self, const gchar* label);
static void boxes_installed_media_convert_to_native_format_data_free (gpointer _data);
void boxes_installed_media_convert_to_native_format (BoxesInstalledMedia* self, const gchar* destination_path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installed_media_convert_to_native_format_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_installed_media_convert_to_native_format_co (BoxesInstalledMediaConvertToNativeFormatData* _data_);
static void boxes_installed_media_decompress (BoxesInstalledMedia* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_installed_media_decompress_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error);
static void boxes_installed_media_convert_to_native_format_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_installed_media_real_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain);
static GList* boxes_installed_media_real_get_vm_properties (BoxesInstallerMedia* base);
static void _boxes_pair_unref0_ (gpointer var);
static void _g_list_free__boxes_pair_unref0_ (GList* self);
static BoxesVMCreator* boxes_installed_media_real_get_vm_creator (BoxesInstallerMedia* base);
BoxesVMImporter* boxes_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesVMImporter* boxes_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
GType boxes_vm_importer_get_type (void) G_GNUC_CONST;
static void boxes_installed_media_decompress_data_free (gpointer _data);
static gboolean boxes_installed_media_decompress_co (BoxesInstalledMediaDecompressData* _data_);
static void boxes_installed_media_decompress_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
const gchar* boxes_installed_media_get_format (BoxesInstalledMedia* 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_live (BoxesInstallerMedia* self);
static void _vala_boxes_installed_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);

const gchar* BOXES_INSTALLED_MEDIA_supported_extensions[16] = {".qcow2", ".qcow2.gz", ".qcow", ".qcow.gz", ".img", ".img.gz", ".cow", ".cow.gz", ".vdi", ".vdi.gz", ".vmdk", ".vmdk.gz", ".vpc", ".vpc.gz", ".cloop", ".cloop.gz"};

static void boxes_installed_media_construct_data_free (gpointer _data) {
	BoxesInstalledMediaNewData* _data_;
	_data_ = _data;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->path);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaNewData, _data_);
#line 379 "installed-media.c"
}


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


void boxes_installed_media_construct (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaNewData* _data_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	BoxesMediaManager* _tmp2_ = NULL;
	BoxesMediaManager* _tmp3_ = NULL;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaNewData);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_installed_media_construct);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_construct_data_free);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->object_type = object_type;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = path;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->path);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->path = _tmp1_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = media_manager;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->media_manager = _tmp3_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct_co (_data_);
#line 422 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_construct_finish (GAsyncResult* _res_, GError** error) {
	BoxesInstalledMedia* result;
	BoxesInstalledMediaNewData* _data_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return;
#line 433 "installed-media.c"
	}
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _data_->self;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = NULL;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 443 "installed-media.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1238 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1238 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1239 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1239 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1239 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1239 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	return result;
#line 463 "installed-media.c"
}


static void boxes_installed_media_new_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaNewData* _data_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct_co (_data_);
#line 477 "installed-media.c"
}


static gpointer _g_error_copy0 (gpointer self) {
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self ? g_error_copy (self) : NULL;
#line 484 "installed-media.c"
}


static gboolean boxes_installed_media_construct_co (BoxesInstalledMediaNewData* _data_) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 493 "installed-media.c"
		goto _state_0;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 497 "installed-media.c"
		goto _state_1;
		default:
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 502 "installed-media.c"
	}
	_state_0:
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = (BoxesInstalledMedia*) boxes_installer_media_construct (_data_->object_type);
#line 40 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->supported = FALSE;
#line 509 "installed-media.c"
	{
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->extension_collection_length1 = 0;
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_extension_collection_size_ = 0;
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->extension_collection = BOXES_INSTALLED_MEDIA_supported_extensions;
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->extension_collection_length1 = G_N_ELEMENTS (BOXES_INSTALLED_MEDIA_supported_extensions);
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		for (_data_->extension_it = 0; _data_->extension_it < G_N_ELEMENTS (BOXES_INSTALLED_MEDIA_supported_extensions); _data_->extension_it = _data_->extension_it + 1) {
#line 41 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->extension = _data_->extension_collection[_data_->extension_it];
#line 523 "installed-media.c"
			{
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp0_ = NULL;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp0_ = _data_->path;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp1_ = NULL;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp1_ = _data_->extension;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp2_ = FALSE;
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp2_ = g_str_has_suffix (_data_->_tmp0_, _data_->_tmp1_);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->supported = _data_->_tmp2_;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp3_ = FALSE;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp3_ = _data_->supported;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (_data_->_tmp3_) {
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					break;
#line 547 "installed-media.c"
				}
			}
		}
	}
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = FALSE;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = _data_->supported;
#line 47 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_data_->_tmp4_) {
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp5_ = NULL;
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp5_ = _ ("Unsupported disk image format.");
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp6_ = NULL;
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp6_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _data_->_tmp5_);
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_inner_error_ = _data_->_tmp6_;
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 576 "installed-media.c"
		} else {
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 580 "installed-media.c"
		}
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 48 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 586 "installed-media.c"
	}
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = NULL;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = _data_->path;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = NULL;
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = g_strdup (_data_->_tmp7_);
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (((BoxesInstallerMedia*) _data_->self)->device_file);
#line 50 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->device_file = _data_->_tmp8_;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->from_image = TRUE;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = NULL;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = _data_->path;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = FALSE;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = string_contains (_data_->_tmp10_, "gnome-continuous");
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp11_) {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp9_ = TRUE;
#line 614 "installed-media.c"
	} else {
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = NULL;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = _data_->path;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp13_ = FALSE;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp13_ = string_contains (_data_->_tmp12_, "gnome-ostree");
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp9_ = _data_->_tmp13_;
#line 626 "installed-media.c"
	}
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = FALSE;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = _data_->_tmp9_;
#line 53 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp14_) {
#line 634 "installed-media.c"
		{
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp16_ = NULL;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp16_ = _data_->media_manager;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp17_ = NULL;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp17_ = boxes_media_manager_get_os_db (_data_->_tmp16_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp18_ = NULL;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp18_ = _data_->_tmp17_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_state_ = 1;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			boxes_os_database_get_os_by_id (_data_->_tmp18_, "http://gnome.org/continuous/3.10", boxes_installed_media_new_ready, _data_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 654 "installed-media.c"
			_state_1:
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp19_ = NULL;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp19_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp15_ = _data_->_tmp19_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_inner_error_ != NULL) {
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (g_error_matches (_data_->_inner_error_, BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID)) {
#line 666 "installed-media.c"
					goto __catch9_boxes_os_database_error_unknown_os_id;
				}
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 671 "installed-media.c"
					goto __catch9_boxes_os_database_error;
				}
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_clear_error (&_data_->_inner_error_);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				return NULL;
#line 680 "installed-media.c"
			}
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (((BoxesInstallerMedia*) _data_->self)->os);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			((BoxesInstallerMedia*) _data_->self)->os = _data_->_tmp15_;
#line 686 "installed-media.c"
		}
		goto __finally9;
		__catch9_boxes_os_database_error_unknown_os_id:
		{
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_error_ = _data_->_inner_error_;
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = NULL;
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_debug ("installed-media.vala:57: gnome-continuous definition not found in libo" \
"sinfo db");
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_error_free0 (_data_->_error_);
#line 699 "installed-media.c"
		}
		goto __finally9;
		__catch9_boxes_os_database_error:
		{
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = NULL;
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp20_ = NULL;
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp20_ = _data_->_vala1__error_;
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp21_ = NULL;
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp21_ = _g_error_copy0 (_data_->_tmp20_);
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = _data_->_tmp21_;
#line 59 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 720 "installed-media.c"
			goto __finally9;
		}
		__finally9:
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 734 "installed-media.c"
			} else {
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 738 "installed-media.c"
			}
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 54 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 744 "installed-media.c"
		}
	}
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp23_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp23_ = ((BoxesInstallerMedia*) _data_->self)->os;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp23_ != NULL) {
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = _data_->media_manager;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = boxes_media_manager_get_os_db (_data_->_tmp24_);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = _data_->_tmp25_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp27_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp27_ = ((BoxesInstallerMedia*) _data_->self)->os;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp28_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp28_ = boxes_installer_media_get_architecture ((BoxesInstallerMedia*) _data_->self);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp29_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp29_ = _data_->_tmp28_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp30_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp30_ = _data_->_tmp29_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp31_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp31_ = boxes_os_database_get_resources_for_os (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp30_);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->_tmp22_);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = _data_->_tmp31_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->_tmp30_);
#line 791 "installed-media.c"
	} else {
#line 64 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp32_ = NULL;
#line 64 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp32_ = boxes_os_database_get_default_resources ();
#line 64 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->_tmp22_);
#line 64 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = _data_->_tmp32_;
#line 801 "installed-media.c"
	}
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp33_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp33_ = _data_->_tmp22_;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp34_ = NULL;
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp34_ = _g_object_ref0 (_data_->_tmp33_);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (((BoxesInstallerMedia*) _data_->self)->resources);
#line 63 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->resources = _data_->_tmp34_;
#line 66 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installer_media_label_setup ((BoxesInstallerMedia*) _data_->self, NULL);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->_tmp22_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 823 "installed-media.c"
	} else {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 827 "installed-media.c"
	}
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 833 "installed-media.c"
}


void boxes_installed_media_new (const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct (BOXES_TYPE_INSTALLED_MEDIA, path, media_manager, _callback_, _user_data_);
#line 840 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_new_finish (GAsyncResult* _res_, GError** error) {
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return boxes_installed_media_construct_finish (_res_, error);
#line 847 "installed-media.c"
}


static void boxes_installed_media_convert_to_native_format_data_free (gpointer _data) {
	BoxesInstalledMediaConvertToNativeFormatData* _data_;
	_data_ = _data;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->destination_path);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaConvertToNativeFormatData, _data_);
#line 860 "installed-media.c"
}


void boxes_installed_media_convert_to_native_format (BoxesInstalledMedia* self, const gchar* destination_path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaConvertToNativeFormatData* _data_;
	BoxesInstalledMedia* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaConvertToNativeFormatData);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_installed_media_convert_to_native_format);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_convert_to_native_format_data_free);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = _tmp0_;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = destination_path;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->destination_path);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->destination_path = _tmp2_;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_convert_to_native_format_co (_data_);
#line 889 "installed-media.c"
}


void boxes_installed_media_convert_to_native_format_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error) {
	BoxesInstalledMediaConvertToNativeFormatData* _data_;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return;
#line 899 "installed-media.c"
	}
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 903 "installed-media.c"
}


static void boxes_installed_media_convert_to_native_format_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaConvertToNativeFormatData* _data_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_convert_to_native_format_co (_data_);
#line 917 "installed-media.c"
}


static gboolean boxes_installed_media_convert_to_native_format_co (BoxesInstalledMediaConvertToNativeFormatData* _data_) {
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 926 "installed-media.c"
		goto _state_0;
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 930 "installed-media.c"
		goto _state_1;
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 934 "installed-media.c"
		goto _state_2;
		default:
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 939 "installed-media.c"
	}
	_state_0:
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 1;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_decompress (_data_->self, boxes_installed_media_convert_to_native_format_ready, _data_);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 948 "installed-media.c"
	_state_1:
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = FALSE;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = boxes_installed_media_decompress_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed = _data_->_tmp0_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 966 "installed-media.c"
		} else {
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 970 "installed-media.c"
		}
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 976 "installed-media.c"
	}
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = g_strdup ("qemu-img");
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = g_strdup ("convert");
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = g_strdup ("-O");
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = g_strdup ("qcow2");
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = g_strdup (_data_->_tmp5_);
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = _data_->destination_path;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = g_strdup (_data_->_tmp7_);
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = NULL;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = g_new0 (gchar*, 6 + 1);
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[0] = _data_->_tmp1_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[1] = _data_->_tmp2_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[2] = _data_->_tmp3_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[3] = _data_->_tmp4_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[4] = _data_->_tmp6_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[5] = _data_->_tmp8_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv_length1 = 0;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_argv_size_ = 0;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv = _data_->_tmp9_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv_length1 = 6;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_argv_size_ = _data_->argv_length1;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = NULL;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = FALSE;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = g_str_has_suffix (_data_->_tmp10_, ".qcow2");
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->converting = !_data_->_tmp11_;
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = FALSE;
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = _data_->converting;
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp13_) {
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = " while converting it to 'qcow2' format";
#line 1054 "installed-media.c"
	} else {
#line 79 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = "";
#line 1058 "installed-media.c"
	}
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = NULL;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = _data_->destination_path;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = NULL;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = _data_->_tmp12_;
#line 76 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:76: Copying '%s' to '%s'%s.", _data_->_tmp14_, _data_->_tmp15_, _data_->_tmp16_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = NULL;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17__length1 = 0;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = _data_->argv;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17__length1 = _data_->argv_length1;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_exec (_data_->_tmp17_, _data_->_tmp17__length1, NULL, boxes_installed_media_convert_to_native_format_ready, _data_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1088 "installed-media.c"
	_state_2:
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_exec_finish (_data_->_res_, NULL, NULL, &_data_->_inner_error_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1104 "installed-media.c"
		} else {
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1108 "installed-media.c"
		}
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1114 "installed-media.c"
	}
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = NULL;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = NULL;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = _data_->destination_path;
#line 81 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:81: Finished copying '%s' to '%s'", _data_->_tmp18_, _data_->_tmp19_);
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = FALSE;
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = _data_->decompressed;
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp20_) {
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp21_ = NULL;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp21_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = NULL;
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = g_file_new_for_path (_data_->_tmp21_);
#line 85 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->file = _data_->_tmp22_;
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = NULL;
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = _data_->file;
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		boxes_delete_file (_data_->_tmp23_, &_data_->_inner_error_);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->file);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1162 "installed-media.c"
			} else {
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1166 "installed-media.c"
			}
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 86 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1172 "installed-media.c"
		}
#line 83 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->file);
#line 1176 "installed-media.c"
	}
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1184 "installed-media.c"
	} else {
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1188 "installed-media.c"
	}
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1194 "installed-media.c"
}


static void boxes_installed_media_real_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain) {
	BoxesInstalledMedia * self;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 90 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_return_if_fail (domain != NULL);
#line 1204 "installed-media.c"
}


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


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


static GList* boxes_installed_media_real_get_vm_properties (BoxesInstallerMedia* base) {
	BoxesInstalledMedia * self;
	GList* result = NULL;
	GList* properties = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	BoxesPair* _tmp2_ = NULL;
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 93 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	properties = NULL;
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _ ("System");
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->label;
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = boxes_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_);
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	properties = g_list_append (properties, _tmp2_);
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = properties;
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1247 "installed-media.c"
}


static BoxesVMCreator* boxes_installed_media_real_get_vm_creator (BoxesInstallerMedia* base) {
	BoxesInstalledMedia * self;
	BoxesVMCreator* result = NULL;
	BoxesVMImporter* _tmp0_ = NULL;
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = boxes_vm_importer_new (self);
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = (BoxesVMCreator*) _tmp0_;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1263 "installed-media.c"
}


static void boxes_installed_media_decompress_data_free (gpointer _data) {
	BoxesInstalledMediaDecompressData* _data_;
	_data_ = _data;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaDecompressData, _data_);
#line 1274 "installed-media.c"
}


static void boxes_installed_media_decompress (BoxesInstalledMedia* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaDecompressData* _data_;
	BoxesInstalledMedia* _tmp0_ = NULL;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaDecompressData);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_installed_media_decompress);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_decompress_data_free);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = _tmp0_;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_decompress_co (_data_);
#line 1293 "installed-media.c"
}


static gboolean boxes_installed_media_decompress_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error) {
	gboolean result;
	BoxesInstalledMediaDecompressData* _data_;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1304 "installed-media.c"
	}
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _data_->result;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1312 "installed-media.c"
}


static void boxes_installed_media_decompress_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaDecompressData* _data_;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_decompress_co (_data_);
#line 1326 "installed-media.c"
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 1242 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1242 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1242 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1339 "installed-media.c"
	{
		GRegex* regex = NULL;
		const gchar* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		GRegex* _tmp3_ = NULL;
		GRegex* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		GRegex* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp0_ = old;
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_g_free0 (_tmp2_);
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		regex = _tmp4_;
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		if (_inner_error_ != NULL) {
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1369 "installed-media.c"
				goto __catch10_g_regex_error;
			}
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1244 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			return NULL;
#line 1378 "installed-media.c"
		}
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp6_ = regex;
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp7_ = replacement;
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) (-1), 0, _tmp7_, 0, &_inner_error_);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_tmp5_ = _tmp8_;
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		if (_inner_error_ != NULL) {
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 1394 "installed-media.c"
				goto __catch10_g_regex_error;
			}
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
			return NULL;
#line 1405 "installed-media.c"
		}
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		result = _tmp5_;
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1245 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		return result;
#line 1413 "installed-media.c"
	}
	goto __finally10;
	__catch10_g_regex_error:
	{
		GError* e = NULL;
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1247 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 1427 "installed-media.c"
	}
	__finally10:
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
	if (_inner_error_ != NULL) {
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1243 "/home/zeenix/jhbuild/share/vala-0.22/vapi/glib-2.0.vapi"
		return NULL;
#line 1438 "installed-media.c"
	}
}


static gboolean boxes_installed_media_decompress_co (BoxesInstalledMediaDecompressData* _data_) {
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 1448 "installed-media.c"
		goto _state_0;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 1452 "installed-media.c"
		goto _state_1;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 1456 "installed-media.c"
		goto _state_2;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 3:
#line 1460 "installed-media.c"
		goto _state_3;
		default:
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 1465 "installed-media.c"
	}
	_state_0:
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = NULL;
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = FALSE;
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = g_str_has_suffix (_data_->_tmp0_, ".gz");
#line 106 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_data_->_tmp1_) {
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->result = FALSE;
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1484 "installed-media.c"
		} else {
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1488 "installed-media.c"
		}
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1494 "installed-media.c"
	}
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = NULL;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = NULL;
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = g_file_new_for_path (_data_->_tmp2_);
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->compressed = _data_->_tmp3_;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = NULL;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = _data_->compressed;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 1;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_file_read_async (_data_->_tmp4_, G_PRIORITY_DEFAULT, NULL, boxes_installed_media_decompress_ready, _data_);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1516 "installed-media.c"
	_state_1:
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = NULL;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = g_file_read_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->input_stream = _data_->_tmp5_;
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->compressed);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1536 "installed-media.c"
		} else {
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1540 "installed-media.c"
		}
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 110 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1546 "installed-media.c"
	}
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = g_path_get_basename (_data_->_tmp6_);
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = _data_->_tmp7_;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = string_replace (_data_->_tmp8_, ".gz", "");
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = NULL;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = _data_->_tmp9_;
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->_tmp8_);
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed_path = _data_->_tmp10_;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = NULL;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = _data_->decompressed_path;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = NULL;
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = boxes_get_user_pkgcache (_data_->_tmp11_);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 113 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed_path = _data_->_tmp12_;
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = NULL;
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = _data_->decompressed_path;
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = g_file_new_for_path (_data_->_tmp13_);
#line 114 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed = _data_->_tmp14_;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = NULL;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = _data_->decompressed;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_file_replace_async (_data_->_tmp15_, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, G_PRIORITY_DEFAULT, NULL, boxes_installed_media_decompress_ready, _data_);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1604 "installed-media.c"
	_state_2:
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = NULL;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = g_file_replace_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->output_stream = (GOutputStream*) _data_->_tmp16_;
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_inner_error_ != NULL) {
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->decompressed);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->decompressed_path);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->input_stream);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->compressed);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1630 "installed-media.c"
		} else {
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1634 "installed-media.c"
		}
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 115 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1640 "installed-media.c"
	}
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = NULL;
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP);
#line 118 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressor = _data_->_tmp17_;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = NULL;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = _data_->output_stream;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = NULL;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = _data_->decompressor;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = NULL;
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = (GConverterOutputStream*) g_converter_output_stream_new (_data_->_tmp18_, (GConverter*) _data_->_tmp19_);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 119 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->output_stream = (GOutputStream*) _data_->_tmp20_;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = NULL;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 121 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:121: Decompressing '%s'..", _data_->_tmp21_);
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp22_ = NULL;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp22_ = g_new0 (guint8, 1048576);
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer_length1 = 0;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_buffer_size_ = 0;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = _data_->_tmp22_;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer_length1 = 1048576;
#line 122 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_buffer_size_ = _data_->buffer_length1;
#line 123 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	while (TRUE) {
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = NULL;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = _data_->input_stream;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = NULL;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24__length1 = 0;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = _data_->buffer;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24__length1 = _data_->buffer_length1;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_state_ = 3;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_input_stream_read_async ((GInputStream*) _data_->_tmp23_, _data_->_tmp24_, (gsize) _data_->_tmp24__length1, G_PRIORITY_DEFAULT, NULL, boxes_installed_media_decompress_ready, _data_);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1704 "installed-media.c"
		_state_3:
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = 0L;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = g_input_stream_read_finish ((GInputStream*) _data_->_tmp23_, _data_->_res_, &_data_->_inner_error_);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->length = _data_->_tmp25_;
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_inner_error_ != NULL) {
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->buffer = (g_free (_data_->buffer), NULL);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->decompressor);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->output_stream);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->decompressed);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->decompressed_path);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->input_stream);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->compressed);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1736 "installed-media.c"
			} else {
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1740 "installed-media.c"
			}
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 124 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1746 "installed-media.c"
		}
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = 0L;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = _data_->length;
#line 125 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_tmp26_ <= ((gssize) 0)) {
#line 126 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			break;
#line 1756 "installed-media.c"
		}
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->written = (gssize) 0;
#line 128 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->i = (gssize) 0;
#line 1762 "installed-media.c"
		{
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp27_ = TRUE;
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			while (TRUE) {
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp28_ = FALSE;
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp28_ = _data_->_tmp27_;
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (!_data_->_tmp28_) {
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp29_ = 0L;
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp29_ = _data_->i;
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp30_ = 0L;
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp30_ = _data_->length;
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (!(_data_->_tmp29_ < _data_->_tmp30_)) {
#line 132 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						break;
#line 1786 "installed-media.c"
					}
				}
#line 129 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp27_ = FALSE;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32_ = NULL;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32_ = _data_->output_stream;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33_ = NULL;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33__length1 = 0;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33_ = _data_->buffer;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33__length1 = _data_->buffer_length1;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp34_ = 0L;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp34_ = _data_->i;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp35_ = 0L;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp35_ = _data_->length;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp36_ = 0L;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp36_ = g_output_stream_write (_data_->_tmp32_, _data_->_tmp33_ + ((gint) _data_->_tmp34_), (gsize) (((gint) _data_->_tmp35_) - ((gint) _data_->_tmp34_)), NULL, &_data_->_inner_error_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp31_ = _data_->_tmp36_;
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (_data_->_inner_error_ != NULL) {
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_error_free (_data_->_inner_error_);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->buffer = (g_free (_data_->buffer), NULL);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->decompressor);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->output_stream);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->decompressed);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_free0 (_data_->decompressed_path);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->input_stream);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->compressed);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (_data_->_state_ == 0) {
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1841 "installed-media.c"
					} else {
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						g_simple_async_result_complete (_data_->_async_result);
#line 1845 "installed-media.c"
					}
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_object_unref (_data_->_async_result);
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					return FALSE;
#line 1851 "installed-media.c"
				}
#line 130 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->written = _data_->_tmp31_;
#line 131 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp37_ = 0L;
#line 131 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp37_ = _data_->i;
#line 131 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp38_ = 0L;
#line 131 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp38_ = _data_->written;
#line 131 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->i = _data_->_tmp37_ + _data_->_tmp38_;
#line 1865 "installed-media.c"
			}
		}
	}
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp39_ = NULL;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp39_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 134 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:134: Decompressed '%s'.", _data_->_tmp39_);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp40_ = NULL;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp40_ = _data_->decompressed_path;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp41_ = NULL;
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp41_ = g_strdup (_data_->_tmp40_);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (((BoxesInstallerMedia*) _data_->self)->device_file);
#line 136 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->device_file = _data_->_tmp41_;
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->result = TRUE;
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressor);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressed);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->input_stream);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->compressed);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1907 "installed-media.c"
	} else {
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1911 "installed-media.c"
	}
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 138 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressor);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressed);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->input_stream);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->compressed);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1935 "installed-media.c"
	} else {
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1939 "installed-media.c"
	}
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 105 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1945 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = FALSE;
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1958 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_ready_to_create (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = TRUE;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1971 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_live (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = FALSE;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1984 "installed-media.c"
}


const gchar* boxes_installed_media_get_format (BoxesInstalledMedia* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_ = NULL;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->device_file;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = g_str_has_suffix (_tmp1_, ".qcow2");
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp2_) {
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = "qcow2";
#line 2004 "installed-media.c"
	} else {
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = "raw";
#line 2008 "installed-media.c"
	}
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp3_ = _tmp0_;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _tmp3_;
#line 19 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 2016 "installed-media.c"
}


static gchar* boxes_installed_media_real_get_architecture (BoxesInstallerMedia* base) {
	gchar* result;
	BoxesInstalledMedia* self;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp5_ = FALSE;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->device_file;
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = string_contains (_tmp1_, "amd64");
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp2_) {
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = TRUE;
#line 2037 "installed-media.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp3_ = ((BoxesInstallerMedia*) self)->device_file;
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp4_ = string_contains (_tmp3_, "x86_64");
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = _tmp4_;
#line 2047 "installed-media.c"
	}
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp5_ = _tmp0_;
#line 24 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp5_) {
#line 2053 "installed-media.c"
		gchar* _tmp6_ = NULL;
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp6_ = g_strdup ("x86_64");
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		result = _tmp6_;
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return result;
#line 2061 "installed-media.c"
	} else {
		gchar** arch_list = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar** _tmp11_ = NULL;
		gint arch_list_length1 = 0;
		gint _arch_list_size_ = 0;
		gchar** _tmp12_ = NULL;
		gint _tmp12__length1 = 0;
		const gchar* _tmp17_ = NULL;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp7_ = g_strdup ("i686");
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp8_ = g_strdup ("i586");
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp9_ = g_strdup ("i486");
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_ = g_strdup ("i386");
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_ = g_new0 (gchar*, 4 + 1);
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_[0] = _tmp7_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_[1] = _tmp8_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_[2] = _tmp9_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_[3] = _tmp10_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list = _tmp11_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list_length1 = 4;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_arch_list_size_ = arch_list_length1;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp12_ = arch_list;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp12__length1 = arch_list_length1;
#line 2102 "installed-media.c"
		{
			gchar** arch_collection = NULL;
			gint arch_collection_length1 = 0;
			gint _arch_collection_size_ = 0;
			gint arch_it = 0;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			arch_collection = _tmp12_;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			arch_collection_length1 = _tmp12__length1;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
			for (arch_it = 0; arch_it < _tmp12__length1; arch_it = arch_it + 1) {
#line 2114 "installed-media.c"
				gchar* _tmp13_ = NULL;
				gchar* arch = NULL;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_tmp13_ = g_strdup (arch_collection[arch_it]);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
				arch = _tmp13_;
#line 2121 "installed-media.c"
				{
					const gchar* _tmp14_ = NULL;
					const gchar* _tmp15_ = NULL;
					gboolean _tmp16_ = FALSE;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp14_ = ((BoxesInstallerMedia*) self)->device_file;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp15_ = arch;
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp16_ = string_contains (_tmp14_, _tmp15_);
#line 29 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (_tmp16_) {
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						result = arch;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						arch_list = (_vala_array_free (arch_list, arch_list_length1, (GDestroyNotify) g_free), NULL);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
						return result;
#line 2140 "installed-media.c"
					}
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_free0 (arch);
#line 2144 "installed-media.c"
				}
			}
		}
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp17_ = ((BoxesInstallerMedia*) self)->device_file;
#line 33 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_debug ("installed-media.vala:33: Failed to guess architecture for media '%s'.", _tmp17_);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		result = NULL;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list = (_vala_array_free (arch_list, arch_list_length1, (GDestroyNotify) g_free), NULL);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return result;
#line 2158 "installed-media.c"
	}
}


static void boxes_installed_media_class_init (BoxesInstalledMediaClass * klass) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_parent_class = g_type_class_peek_parent (klass);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->setup_domain_config = boxes_installed_media_real_setup_domain_config;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_vm_properties = boxes_installed_media_real_get_vm_properties;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_vm_creator = boxes_installed_media_real_get_vm_creator;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_need_user_input_for_vm_creation = boxes_installed_media_real_get_need_user_input_for_vm_creation;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_ready_to_create = boxes_installed_media_real_get_ready_to_create;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_live = boxes_installed_media_real_get_live;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_architecture = boxes_installed_media_real_get_architecture;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_installed_media_get_property;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLED_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 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLED_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 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLED_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 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLED_MEDIA_FORMAT, g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_INSTALLED_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 2192 "installed-media.c"
}


static void boxes_installed_media_instance_init (BoxesInstalledMedia * self) {
}


GType boxes_installed_media_get_type (void) {
	static volatile gsize boxes_installed_media_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_installed_media_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesInstalledMediaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_installed_media_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesInstalledMedia), 0, (GInstanceInitFunc) boxes_installed_media_instance_init, NULL };
		GType boxes_installed_media_type_id;
		boxes_installed_media_type_id = g_type_register_static (BOXES_TYPE_INSTALLER_MEDIA, "BoxesInstalledMedia", &g_define_type_info, 0);
		g_once_init_leave (&boxes_installed_media_type_id__volatile, boxes_installed_media_type_id);
	}
	return boxes_installed_media_type_id__volatile;
}


static void _vala_boxes_installed_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesInstalledMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMedia);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (property_id) {
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_need_user_input_for_vm_creation ((BoxesInstallerMedia*) self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_READY_TO_CREATE:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_ready_to_create ((BoxesInstallerMedia*) self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_LIVE:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_live ((BoxesInstallerMedia*) self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_FORMAT:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_string (value, boxes_installed_media_get_format (self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_ARCHITECTURE:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_take_string (value, boxes_installer_media_get_architecture ((BoxesInstallerMedia*) self));
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 2247 "installed-media.c"
		default:
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/extra-data/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 2253 "installed-media.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 2261 "installed-media.c"
		int i;
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
				destroy_func (((gpointer*) array)[i]);
#line 2269 "installed-media.c"
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 10 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala"
	g_free (array);
#line 2281 "installed-media.c"
}



