/* installed-media.c generated by valac 0.34.0.71-0c51, 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_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_MEDIA_MANAGER (boxes_media_manager_get_type ())
#define BOXES_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager))
#define BOXES_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))
#define BOXES_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))

typedef struct _BoxesMediaManager BoxesMediaManager;
typedef struct _BoxesMediaManagerClass BoxesMediaManagerClass;

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

typedef struct _BoxesOSDatabase BoxesOSDatabase;
typedef struct _BoxesOSDatabaseClass BoxesOSDatabaseClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesInstalledMediaNewGuessOsData BoxesInstalledMediaNewGuessOsData;
typedef struct _BoxesInstalledMediaCopyData BoxesInstalledMediaCopyData;
#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_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesInstalledMediaGuessOsFromFilenameData BoxesInstalledMediaGuessOsFromFilenameData;
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
#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_);
	gboolean (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_box) (BoxesInstallerMedia* self, GtkBox* setup_box);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	BoxesVMCreator* (*get_vm_creator) (BoxesInstallerMedia* self);
	OsinfoDeviceList* (*get_supported_devices) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_ready_to_create) (BoxesInstallerMedia* self);
	gboolean (*get_live) (BoxesInstallerMedia* self);
	gchar* (*get_architecture) (BoxesInstallerMedia* self);
};

struct _BoxesInstalledMedia {
	BoxesInstallerMedia parent_instance;
	BoxesInstalledMediaPrivate * priv;
};

struct _BoxesInstalledMediaClass {
	BoxesInstallerMediaClass parent_class;
};

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

struct _BoxesInstalledMediaCopyData {
	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_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gboolean _tmp19_;
	GFile* file;
	const gchar* _tmp20_;
	GFile* _tmp21_;
	GFile* _tmp22_;
	GError * _inner_error_;
};

struct _BoxesInstalledMediaGuessOsFromFilenameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesInstalledMedia* self;
	BoxesOSDatabase* os_db;
	OsinfoOs* result;
	gboolean _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	GDate* date;
	GDate* _tmp5_;
	GDate* _tmp6_;
	OsinfoOs* _tmp7_;
	BoxesOSDatabase* _tmp8_;
	OsinfoOs* _tmp9_;
	OsinfoOs* _tmp10_;
	GError* _error_;
	GList* os_list;
	BoxesOSDatabase* _tmp11_;
	GDate* _tmp12_;
	GList* _tmp13_;
	GList* _tmp14_;
	guint _tmp15_;
	GList* _tmp16_;
	gconstpointer _tmp17_;
	OsinfoOs* _tmp18_;
	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_;
	gssize _tmp28_;
	gssize _tmp29_;
	gssize _tmp30_;
	GOutputStream* _tmp31_;
	guint8* _tmp32_;
	gint _tmp32__length1;
	gssize _tmp33_;
	gssize _tmp34_;
	gssize _tmp35_;
	gssize _tmp36_;
	gssize _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	GError * _inner_error_;
};


static gpointer boxes_installed_media_parent_class = NULL;
static GRegex* boxes_installed_media_date_regex;
static GRegex* boxes_installed_media_date_regex = 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_ARCHITECTURE
};
BoxesInstalledMedia* boxes_installed_media_new (const gchar* path, gboolean known_qcow2, GError** error);
BoxesInstalledMedia* boxes_installed_media_construct (GType object_type, const gchar* path, gboolean known_qcow2, GError** error);
BoxesInstallerMedia* boxes_installer_media_new (void);
BoxesInstallerMedia* boxes_installer_media_construct (GType object_type);
void boxes_installer_media_label_setup (BoxesInstallerMedia* self, const gchar* label);
static void boxes_installed_media_construct_guess_os_data_free (gpointer _data);
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
void boxes_installed_media_new_guess_os (const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstalledMedia* boxes_installed_media_new_guess_os_finish (GAsyncResult* _res_, GError** error);
void boxes_installed_media_construct_guess_os (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstalledMedia* boxes_installed_media_construct_guess_os_finish (GAsyncResult* _res_, GError** error);
static gboolean boxes_installed_media_construct_guess_os_co (BoxesInstalledMediaNewGuessOsData* _data_);
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_guess_os_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_installed_media_guess_os_from_filename (BoxesInstalledMedia* self, BoxesOSDatabase* os_db, GAsyncReadyCallback _callback_, gpointer _user_data_);
static OsinfoOs* boxes_installed_media_guess_os_from_filename_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error);
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);
static void boxes_installed_media_copy_data_free (gpointer _data);
void boxes_installed_media_copy (BoxesInstalledMedia* self, const gchar* destination_path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_installed_media_copy_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_installed_media_copy_co (BoxesInstalledMediaCopyData* _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_copy_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_installed_media_real_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain);
void boxes_installer_media_add_cd_config (BoxesInstallerMedia* self, GVirConfigDomain* domain, GVirConfigDomainDiskType type, const gchar* iso_path, const gchar* device_name, gboolean mandatory);
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_guess_os_from_filename_data_free (gpointer _data);
static gboolean boxes_installed_media_guess_os_from_filename_co (BoxesInstalledMediaGuessOsFromFilenameData* _data_);
static GDate* boxes_installed_media_get_date_from_filename (BoxesInstalledMedia* self);
static void boxes_installed_media_guess_os_from_filename_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_os_database_list_os_by_distro (BoxesOSDatabase* self, const gchar* distro, GDate* after, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* boxes_os_database_list_os_by_distro_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static GDate* _g_date_dup (GDate* self);
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_);
static void boxes_installed_media_finalize (GObject* obj);
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);

static GRegex* _tmp_regex_0 = NULL;
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 inline GRegex* _thread_safe_regex_init (GRegex** re, const gchar * pattern, GRegexMatchFlags match_options) {
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_once_init_enter ((volatile gsize*) re)) {
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		GRegex* val = g_regex_new (pattern, match_options, 0, NULL);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
#line 417 "installed-media.c"
	}
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return *re;
#line 421 "installed-media.c"
}


static gpointer _g_regex_ref0 (gpointer self) {
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self ? g_regex_ref (self) : NULL;
#line 428 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_construct (GType object_type, const gchar* path, gboolean known_qcow2, GError** error) {
	BoxesInstalledMedia * self = NULL;
	gboolean supported = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	GError * _inner_error_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) boxes_installer_media_construct (object_type);
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	supported = FALSE;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = known_qcow2;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp1_) {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = TRUE;
#line 453 "installed-media.c"
	} else {
		const gchar* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp2_ = path;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp3_ = g_str_has_prefix (_tmp2_, "/dev/");
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = _tmp3_;
#line 463 "installed-media.c"
	}
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp0_) {
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		supported = TRUE;
#line 469 "installed-media.c"
	} else {
		{
			const gchar** extension_collection = NULL;
			gint extension_collection_length1 = 0;
			gint _extension_collection_size_ = 0;
			gint extension_it = 0;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			extension_collection = BOXES_INSTALLED_MEDIA_supported_extensions;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			extension_collection_length1 = G_N_ELEMENTS (BOXES_INSTALLED_MEDIA_supported_extensions);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			for (extension_it = 0; extension_it < G_N_ELEMENTS (BOXES_INSTALLED_MEDIA_supported_extensions); extension_it = extension_it + 1) {
#line 482 "installed-media.c"
				const gchar* extension = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				extension = extension_collection[extension_it];
#line 486 "installed-media.c"
				{
					const gchar* _tmp4_ = NULL;
					const gchar* _tmp5_ = NULL;
					gboolean _tmp6_ = FALSE;
					gboolean _tmp7_ = FALSE;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp4_ = path;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp5_ = extension;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp6_ = g_str_has_suffix (_tmp4_, _tmp5_);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					supported = _tmp6_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp7_ = supported;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (_tmp7_) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						break;
#line 506 "installed-media.c"
					}
				}
			}
		}
	}
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp8_ = supported;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_tmp8_) {
#line 516 "installed-media.c"
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp9_ = _ ("Unsupported disk image format.");
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _tmp9_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_inner_error_ = _tmp10_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_propagate_error (error, _inner_error_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (self);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return NULL;
#line 531 "installed-media.c"
	}
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp11_ = path;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp12_ = g_strdup (_tmp11_);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (((BoxesInstallerMedia*) self)->device_file);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) self)->device_file = _tmp12_;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) self)->from_image = TRUE;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installer_media_label_setup ((BoxesInstallerMedia*) self, NULL);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self;
#line 547 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_new (const gchar* path, gboolean known_qcow2, GError** error) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return boxes_installed_media_construct (BOXES_TYPE_INSTALLED_MEDIA, path, known_qcow2, error);
#line 554 "installed-media.c"
}


static void boxes_installed_media_construct_guess_os_data_free (gpointer _data) {
	BoxesInstalledMediaNewGuessOsData* _data_;
	_data_ = _data;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->path);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaNewGuessOsData, _data_);
#line 569 "installed-media.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self ? g_object_ref (self) : NULL;
#line 576 "installed-media.c"
}


void boxes_installed_media_construct_guess_os (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaNewGuessOsData* _data_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	BoxesMediaManager* _tmp2_ = NULL;
	BoxesMediaManager* _tmp3_ = NULL;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaNewGuessOsData);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_installed_media_construct_guess_os);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_construct_guess_os_data_free);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->object_type = object_type;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = path;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->path);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->path = _tmp1_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = media_manager;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->media_manager);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->media_manager = _tmp3_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct_guess_os_co (_data_);
#line 612 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_construct_guess_os_finish (GAsyncResult* _res_, GError** error) {
	BoxesInstalledMedia* result;
	BoxesInstalledMediaNewGuessOsData* _data_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return;
#line 623 "installed-media.c"
	}
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _data_->self;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = NULL;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 633 "installed-media.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1395 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1395 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1396 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1396 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1396 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1396 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 653 "installed-media.c"
}


static void boxes_installed_media_new_guess_os_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaNewGuessOsData* _data_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct_guess_os_co (_data_);
#line 667 "installed-media.c"
}


static gpointer _g_error_copy0 (gpointer self) {
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self ? g_error_copy (self) : NULL;
#line 674 "installed-media.c"
}


static gboolean boxes_installed_media_construct_guess_os_co (BoxesInstalledMediaNewGuessOsData* _data_) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 683 "installed-media.c"
		goto _state_0;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 687 "installed-media.c"
		goto _state_1;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 691 "installed-media.c"
		goto _state_2;
		default:
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 696 "installed-media.c"
	}
	_state_0:
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = NULL;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = _data_->path;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = (BoxesInstalledMedia*) boxes_installed_media_construct (_data_->object_type, _data_->_tmp0_, FALSE, &_data_->_inner_error_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 715 "installed-media.c"
		} else {
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 719 "installed-media.c"
		}
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 725 "installed-media.c"
	}
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = _data_->path;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = FALSE;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = string_contains (_data_->_tmp2_, "gnome-continuous");
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp3_) {
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp1_ = TRUE;
#line 739 "installed-media.c"
	} else {
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp4_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp4_ = _data_->path;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp5_ = FALSE;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp5_ = string_contains (_data_->_tmp4_, "gnome-ostree");
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp1_ = _data_->_tmp5_;
#line 751 "installed-media.c"
	}
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp1_) {
#line 755 "installed-media.c"
		{
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp7_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp7_ = _data_->media_manager;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp8_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp8_ = boxes_media_manager_get_os_db (_data_->_tmp7_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp9_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp9_ = _data_->_tmp8_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_state_ = 1;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			boxes_os_database_get_os_by_id (_data_->_tmp9_, "http://gnome.org/continuous/3.10", boxes_installed_media_new_guess_os_ready, _data_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 775 "installed-media.c"
			_state_1:
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp10_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp10_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp6_ = _data_->_tmp10_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 64 "/home/zeenix/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 787 "installed-media.c"
					goto __catch9_boxes_os_database_error_unknown_os_id;
				}
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 792 "installed-media.c"
					goto __catch9_boxes_os_database_error;
				}
#line 64 "/home/zeenix/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 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_clear_error (&_data_->_inner_error_);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				return NULL;
#line 801 "installed-media.c"
			}
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp11_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp11_ = _data_->_tmp6_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp6_ = NULL;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (((BoxesInstallerMedia*) _data_->self)->os);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			((BoxesInstallerMedia*) _data_->self)->os = _data_->_tmp11_;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->_tmp6_);
#line 815 "installed-media.c"
		}
		goto __finally9;
		__catch9_boxes_os_database_error_unknown_os_id:
		{
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_error_ = _data_->_inner_error_;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = NULL;
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_debug ("installed-media.vala:66: gnome-continuous definition not found in libo" \
"sinfo db");
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_error_free0 (_data_->_error_);
#line 828 "installed-media.c"
		}
		goto __finally9;
		__catch9_boxes_os_database_error:
		{
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_vala1__error_ = _data_->_inner_error_;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = NULL;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp12_ = NULL;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp12_ = _data_->_vala1__error_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp13_ = NULL;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp13_ = _g_error_copy0 (_data_->_tmp12_);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = _data_->_tmp13_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_error_free0 (_data_->_vala1__error_);
#line 849 "installed-media.c"
			goto __finally9;
		}
		__finally9:
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 863 "installed-media.c"
			} else {
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 867 "installed-media.c"
			}
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 873 "installed-media.c"
		}
	}
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = _data_->media_manager;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = boxes_media_manager_get_os_db (_data_->_tmp15_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = _data_->_tmp16_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_guess_os_from_filename (_data_->self, _data_->_tmp17_, boxes_installed_media_new_guess_os_ready, _data_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 894 "installed-media.c"
	_state_2:
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = boxes_installed_media_guess_os_from_filename_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = _data_->_tmp18_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 912 "installed-media.c"
		} else {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 916 "installed-media.c"
		}
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 922 "installed-media.c"
	}
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = _data_->_tmp14_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (((BoxesInstallerMedia*) _data_->self)->os);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->os = _data_->_tmp19_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = ((BoxesInstallerMedia*) _data_->self)->os;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp21_ != NULL) {
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = _data_->media_manager;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = boxes_media_manager_get_os_db (_data_->_tmp22_);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = _data_->_tmp23_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = ((BoxesInstallerMedia*) _data_->self)->os;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = boxes_installer_media_get_architecture ((BoxesInstallerMedia*) _data_->self);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp27_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp27_ = _data_->_tmp26_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp28_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp28_ = _data_->_tmp27_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp29_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp29_ = boxes_os_database_get_resources_for_os (_data_->_tmp24_, _data_->_tmp25_, _data_->_tmp28_);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->_tmp20_);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp20_ = _data_->_tmp29_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->_tmp28_);
#line 978 "installed-media.c"
	} else {
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp30_ = NULL;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp30_ = boxes_os_database_get_default_resources ();
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->_tmp20_);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp20_ = _data_->_tmp30_;
#line 988 "installed-media.c"
	}
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp31_ = NULL;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp31_ = _g_object_ref0 (_data_->_tmp20_);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (((BoxesInstallerMedia*) _data_->self)->resources);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->resources = _data_->_tmp31_;
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installer_media_label_setup ((BoxesInstallerMedia*) _data_->self, NULL);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->_tmp20_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->_tmp14_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1008 "installed-media.c"
	} else {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1012 "installed-media.c"
	}
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1018 "installed-media.c"
}


void boxes_installed_media_new_guess_os (const gchar* path, BoxesMediaManager* media_manager, GAsyncReadyCallback _callback_, gpointer _user_data_) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_construct_guess_os (BOXES_TYPE_INSTALLED_MEDIA, path, media_manager, _callback_, _user_data_);
#line 1025 "installed-media.c"
}


BoxesInstalledMedia* boxes_installed_media_new_guess_os_finish (GAsyncResult* _res_, GError** error) {
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return boxes_installed_media_construct_guess_os_finish (_res_, error);
#line 1032 "installed-media.c"
}


static void boxes_installed_media_copy_data_free (gpointer _data) {
	BoxesInstalledMediaCopyData* _data_;
	_data_ = _data;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->destination_path);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaCopyData, _data_);
#line 1045 "installed-media.c"
}


void boxes_installed_media_copy (BoxesInstalledMedia* self, const gchar* destination_path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaCopyData* _data_;
	BoxesInstalledMedia* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaCopyData);
#line 5 "/home/zeenix/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_copy);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_copy_data_free);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = _tmp0_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = destination_path;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->destination_path);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->destination_path = _tmp2_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_copy_co (_data_);
#line 1074 "installed-media.c"
}


void boxes_installed_media_copy_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error) {
	BoxesInstalledMediaCopyData* _data_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return;
#line 1084 "installed-media.c"
	}
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1088 "installed-media.c"
}


static void boxes_installed_media_copy_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaCopyData* _data_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_copy_co (_data_);
#line 1102 "installed-media.c"
}


static gboolean boxes_installed_media_copy_co (BoxesInstalledMediaCopyData* _data_) {
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 1111 "installed-media.c"
		goto _state_0;
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 1115 "installed-media.c"
		goto _state_1;
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 1119 "installed-media.c"
		goto _state_2;
		default:
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 1124 "installed-media.c"
	}
	_state_0:
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 1;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_decompress (_data_->self, boxes_installed_media_copy_ready, _data_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1133 "installed-media.c"
	_state_1:
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = FALSE;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = boxes_installed_media_decompress_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed = _data_->_tmp0_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1151 "installed-media.c"
		} else {
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1155 "installed-media.c"
		}
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1161 "installed-media.c"
	}
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = g_strdup ("qemu-img");
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = g_strdup ("convert");
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = g_strdup ("-O");
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = g_strdup ("qcow2");
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = g_strdup (_data_->_tmp5_);
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = _data_->destination_path;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = g_strdup (_data_->_tmp7_);
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = g_new0 (gchar*, 6 + 1);
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[0] = _data_->_tmp1_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[1] = _data_->_tmp2_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[2] = _data_->_tmp3_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[3] = _data_->_tmp4_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[4] = _data_->_tmp6_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_[5] = _data_->_tmp8_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv_length1 = 0;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_argv_size_ = 0;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv = _data_->_tmp9_;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv_length1 = 6;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_argv_size_ = _data_->argv_length1;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = NULL;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = FALSE;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = g_str_has_suffix (_data_->_tmp10_, ".qcow2");
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->converting = !_data_->_tmp11_;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = FALSE;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = _data_->converting;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp13_) {
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = " while converting it to 'qcow2' format";
#line 1239 "installed-media.c"
	} else {
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp12_ = "";
#line 1243 "installed-media.c"
	}
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = NULL;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = _data_->destination_path;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:87: Copying '%s' to '%s'%s.", _data_->_tmp14_, _data_->_tmp15_, _data_->_tmp12_);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = NULL;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16__length1 = 0;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = _data_->argv;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16__length1 = _data_->argv_length1;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_exec (_data_->_tmp16_, _data_->_tmp16__length1, NULL, boxes_installed_media_copy_ready, _data_);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1269 "installed-media.c"
	_state_2:
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_exec_finish (_data_->_res_, NULL, NULL, &_data_->_inner_error_);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1285 "installed-media.c"
		} else {
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1289 "installed-media.c"
		}
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1295 "installed-media.c"
	}
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = NULL;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = NULL;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = _data_->destination_path;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:92: Finished copying '%s' to '%s'", _data_->_tmp17_, _data_->_tmp18_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = FALSE;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = _data_->decompressed;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp19_) {
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp20_ = NULL;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp20_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp21_ = NULL;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp21_ = g_file_new_for_path (_data_->_tmp20_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->file = _data_->_tmp21_;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = NULL;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp22_ = _data_->file;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		boxes_delete_file (_data_->_tmp22_, &_data_->_inner_error_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->file);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1343 "installed-media.c"
			} else {
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1347 "installed-media.c"
			}
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1353 "installed-media.c"
		}
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->file);
#line 1357 "installed-media.c"
	}
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1365 "installed-media.c"
	} else {
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1369 "installed-media.c"
	}
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1375 "installed-media.c"
}


static void boxes_installed_media_real_setup_domain_config (BoxesInstallerMedia* base, GVirConfigDomain* domain) {
	BoxesInstalledMedia * self;
	GVirConfigDomainDiskType _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	GVirConfigDomain* _tmp2_ = NULL;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_return_if_fail (domain != NULL);
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->from_image;
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp1_) {
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_FILE;
#line 1394 "installed-media.c"
	} else {
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = GVIR_CONFIG_DOMAIN_DISK_BLOCK;
#line 1398 "installed-media.c"
	}
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = domain;
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installer_media_add_cd_config ((BoxesInstallerMedia*) self, _tmp2_, _tmp0_, NULL, "hdc", FALSE);
#line 1404 "installed-media.c"
}


static void _boxes_pair_unref0_ (gpointer var) {
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	(var == NULL) ? NULL : (var = (boxes_pair_unref (var), NULL));
#line 1411 "installed-media.c"
}


static void _g_list_free__boxes_pair_unref0_ (GList* self) {
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_list_foreach (self, (GFunc) _boxes_pair_unref0_, NULL);
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_list_free (self);
#line 1420 "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 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	properties = NULL;
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _ ("System");
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->label;
#line 108 "/home/zeenix/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 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	properties = g_list_append (properties, _tmp2_);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = properties;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1447 "installed-media.c"
}


static BoxesVMCreator* boxes_installed_media_real_get_vm_creator (BoxesInstallerMedia* base) {
	BoxesInstalledMedia * self;
	BoxesVMCreator* result = NULL;
	BoxesVMImporter* _tmp0_ = NULL;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = boxes_vm_importer_new (self);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = (BoxesVMCreator*) _tmp0_;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1463 "installed-media.c"
}


static void boxes_installed_media_guess_os_from_filename_data_free (gpointer _data) {
	BoxesInstalledMediaGuessOsFromFilenameData* _data_;
	_data_ = _data;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->os_db);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->result);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_slice_free (BoxesInstalledMediaGuessOsFromFilenameData, _data_);
#line 1478 "installed-media.c"
}


static void boxes_installed_media_guess_os_from_filename (BoxesInstalledMedia* self, BoxesOSDatabase* os_db, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaGuessOsFromFilenameData* _data_;
	BoxesInstalledMedia* _tmp0_ = NULL;
	BoxesOSDatabase* _tmp1_ = NULL;
	BoxesOSDatabase* _tmp2_ = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaGuessOsFromFilenameData);
#line 5 "/home/zeenix/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_guess_os_from_filename);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_installed_media_guess_os_from_filename_data_free);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = _tmp0_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = os_db;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->os_db);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->os_db = _tmp2_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_guess_os_from_filename_co (_data_);
#line 1507 "installed-media.c"
}


static OsinfoOs* boxes_installed_media_guess_os_from_filename_finish (BoxesInstalledMedia* self, GAsyncResult* _res_, GError** error) {
	OsinfoOs* result;
	BoxesInstalledMediaGuessOsFromFilenameData* _data_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return NULL;
#line 1518 "installed-media.c"
	}
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _data_->result;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->result = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 1528 "installed-media.c"
}


static void boxes_installed_media_guess_os_from_filename_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesInstalledMediaGuessOsFromFilenameData* _data_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = _user_data_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_source_object_ = source_object;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_res_ = _res_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_guess_os_from_filename_co (_data_);
#line 1542 "installed-media.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1549 "installed-media.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_list_free (self);
#line 1558 "installed-media.c"
}


static gboolean boxes_installed_media_guess_os_from_filename_co (BoxesInstalledMediaGuessOsFromFilenameData* _data_) {
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 1567 "installed-media.c"
		goto _state_0;
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 1571 "installed-media.c"
		goto _state_1;
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 1575 "installed-media.c"
		goto _state_2;
		default:
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 1580 "installed-media.c"
	}
	_state_0:
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = NULL;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = FALSE;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = string_contains (_data_->_tmp1_, "gnome-continuous");
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_data_->_tmp2_) {
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp3_ = NULL;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp3_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp4_ = FALSE;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp4_ = string_contains (_data_->_tmp3_, "gnome-ostree");
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp0_ = !_data_->_tmp4_;
#line 1603 "installed-media.c"
	} else {
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp0_ = FALSE;
#line 1607 "installed-media.c"
	}
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp0_) {
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->result = NULL;
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1617 "installed-media.c"
		} else {
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1621 "installed-media.c"
		}
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1627 "installed-media.c"
	}
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = NULL;
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = boxes_installed_media_get_date_from_filename (_data_->self);
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->date = _data_->_tmp5_;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = NULL;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = _data_->date;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp6_ == NULL) {
#line 1641 "installed-media.c"
		{
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp8_ = NULL;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp8_ = _data_->os_db;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_state_ = 1;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			boxes_os_database_get_os_by_id (_data_->_tmp8_, "http://gnome.org/continuous/3.10", boxes_installed_media_guess_os_from_filename_ready, _data_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1653 "installed-media.c"
			_state_1:
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp9_ = NULL;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp9_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp7_ = _data_->_tmp9_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 127 "/home/zeenix/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 1665 "installed-media.c"
					goto __catch10_boxes_os_database_error_unknown_os_id;
				}
				goto __finally10;
			}
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp10_ = NULL;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp10_ = _data_->_tmp7_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp7_ = NULL;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->result = _data_->_tmp10_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->_tmp7_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1686 "installed-media.c"
			} else {
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1690 "installed-media.c"
			}
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1696 "installed-media.c"
		}
		goto __finally10;
		__catch10_boxes_os_database_error_unknown_os_id:
		{
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_error_ = _data_->_inner_error_;
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_inner_error_ = NULL;
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_debug ("installed-media.vala:129: gnome-continuous definition not found in lib" \
"osinfo db");
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->result = NULL;
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_error_free0 (_data_->_error_);
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1717 "installed-media.c"
			} else {
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1721 "installed-media.c"
			}
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1727 "installed-media.c"
		}
		__finally10:
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1742 "installed-media.c"
			} else {
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1746 "installed-media.c"
			}
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1752 "installed-media.c"
		} else {
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_clear_error (&_data_->_inner_error_);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1762 "installed-media.c"
		}
	}
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = NULL;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = _data_->os_db;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = NULL;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = _data_->date;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_os_database_list_os_by_distro (_data_->_tmp11_, "gnome", _data_->_tmp12_, boxes_installed_media_guess_os_from_filename_ready, _data_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1779 "installed-media.c"
	_state_2:
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = NULL;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = boxes_os_database_list_os_by_distro_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->os_list = _data_->_tmp13_;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1801 "installed-media.c"
			} else {
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1805 "installed-media.c"
			}
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1811 "installed-media.c"
		} else {
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->date);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_clear_error (&_data_->_inner_error_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 1821 "installed-media.c"
		}
	}
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = _data_->os_list;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = 0U;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = g_list_length (_data_->_tmp14_);
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_tmp15_ > ((guint) 0)) {
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp16_ = NULL;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp16_ = _data_->os_list;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp17_ = NULL;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp17_ = _data_->_tmp16_->data;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp18_ = NULL;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp18_ = _g_object_ref0 ((OsinfoOs*) _data_->_tmp17_);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->result = _data_->_tmp18_;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		__g_list_free__g_object_unref0_0 (_data_->os_list);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->date);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1856 "installed-media.c"
		} else {
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1860 "installed-media.c"
		}
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1866 "installed-media.c"
	} else {
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->result = NULL;
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		__g_list_free__g_object_unref0_0 (_data_->os_list);
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->date);
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1878 "installed-media.c"
		} else {
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1882 "installed-media.c"
		}
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 1888 "installed-media.c"
	}
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	__g_list_free__g_object_unref0_0 (_data_->os_list);
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->date);
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1898 "installed-media.c"
	} else {
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1902 "installed-media.c"
	}
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 1908 "installed-media.c"
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length = 0L;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	glong _tmp2_ = 0L;
	glong _tmp5_ = 0L;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_ = 0L;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_ = 0L;
	glong _tmp16_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	gchar* _tmp21_ = NULL;
#line 1347 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1348 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1348 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1348 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	string_length = (glong) _tmp1_;
#line 1349 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = start;
#line 1349 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp2_ < ((glong) 0)) {
#line 1941 "installed-media.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
#line 1350 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = string_length;
#line 1350 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = start;
#line 1350 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		start = _tmp3_ + _tmp4_;
#line 1950 "installed-media.c"
	}
#line 1352 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp5_ = end;
#line 1352 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp5_ < ((glong) 0)) {
#line 1956 "installed-media.c"
		glong _tmp6_ = 0L;
		glong _tmp7_ = 0L;
#line 1353 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = string_length;
#line 1353 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = end;
#line 1353 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		end = _tmp6_ + _tmp7_;
#line 1965 "installed-media.c"
	}
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp9_ = start;
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp9_ >= ((glong) 0)) {
#line 1971 "installed-media.c"
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = start;
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = string_length;
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp10_ <= _tmp11_;
#line 1980 "installed-media.c"
	} else {
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = FALSE;
#line 1984 "installed-media.c"
	}
#line 1355 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp8_, NULL);
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp13_ = end;
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp13_ >= ((glong) 0)) {
#line 1992 "installed-media.c"
		glong _tmp14_ = 0L;
		glong _tmp15_ = 0L;
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp14_ = end;
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = _tmp14_ <= _tmp15_;
#line 2001 "installed-media.c"
	} else {
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = FALSE;
#line 2005 "installed-media.c"
	}
#line 1356 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp12_, NULL);
#line 1357 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp16_ = start;
#line 1357 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp17_ = end;
#line 1357 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp18_ = start;
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp19_ = end;
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp20_ = start;
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp21_;
#line 1358 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 2027 "installed-media.c"
}


static GDate* _g_date_dup (GDate* self) {
	GDate* dup;
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	dup = g_new0 (GDate, 1);
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	memcpy (dup, self, sizeof (GDate));
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return dup;
#line 2039 "installed-media.c"
}


static gpointer __g_date_dup0 (gpointer self) {
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return self ? _g_date_dup (self) : NULL;
#line 2046 "installed-media.c"
}


static GDate* boxes_installed_media_get_date_from_filename (BoxesInstalledMedia* self) {
	GDate* result = NULL;
	GMatchInfo* match_info = NULL;
	GRegex* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GMatchInfo* _tmp2_ = NULL;
	GMatchInfo* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gchar* date_str = NULL;
	GMatchInfo* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	GDate date = {0};
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	GDate* _tmp19_ = NULL;
#line 142 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = boxes_installed_media_date_regex;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->device_file;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_regex_match (_tmp0_, _tmp1_, 0, &_tmp2_);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_match_info_unref0 (match_info);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	match_info = _tmp2_;
#line 146 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp3_ = match_info;
#line 146 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp4_ = g_match_info_matches (_tmp3_);
#line 146 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_tmp4_) {
#line 147 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		result = NULL;
#line 147 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_match_info_unref0 (match_info);
#line 147 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return result;
#line 2099 "installed-media.c"
	}
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp5_ = match_info;
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp6_ = g_match_info_fetch (_tmp5_, 0);
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	date_str = _tmp6_;
#line 150 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	memset (&date, 0, sizeof (GDate));
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp7_ = date_str;
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp8_ = string_slice (_tmp7_, (glong) 0, (glong) 4);
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp9_ = _tmp8_;
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp10_ = atoi (_tmp9_);
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_date_set_year (&date, (GDateYear) _tmp10_);
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_tmp9_);
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp11_ = date_str;
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp12_ = string_slice (_tmp11_, (glong) 4, (glong) 6);
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp13_ = _tmp12_;
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp14_ = atoi (_tmp13_);
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_date_set_month (&date, (GDateMonth) _tmp14_);
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_tmp13_);
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp15_ = date_str;
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp16_ = string_slice (_tmp15_, (glong) 6, (glong) 8);
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp17_ = _tmp16_;
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp18_ = atoi (_tmp17_);
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_date_set_day (&date, (GDateDay) _tmp18_);
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_tmp17_);
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp19_ = __g_date_dup0 (&date);
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = _tmp19_;
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (date_str);
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_match_info_unref0 (match_info);
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 2155 "installed-media.c"
}


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


static void boxes_installed_media_decompress (BoxesInstalledMedia* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesInstalledMediaDecompressData* _data_;
	BoxesInstalledMedia* _tmp0_ = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_ = g_slice_new0 (BoxesInstalledMediaDecompressData);
#line 5 "/home/zeenix/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 "/home/zeenix/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 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->self = _tmp0_;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_decompress_co (_data_);
#line 2185 "installed-media.c"
}


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


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


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 1399 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1399 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1399 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 2231 "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;
		gchar* _tmp9_ = NULL;
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = old;
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_free0 (_tmp2_);
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		regex = _tmp4_;
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 2262 "installed-media.c"
				goto __catch11_g_regex_error;
			}
#line 1401 "/jhbuild/share/vala-0.36/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 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1401 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			return NULL;
#line 2271 "installed-media.c"
		}
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = regex;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = replacement;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_);
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = _tmp8_;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 2287 "installed-media.c"
				goto __catch11_g_regex_error;
			}
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1402 "/jhbuild/share/vala-0.36/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 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
			return NULL;
#line 2298 "installed-media.c"
		}
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp9_ = _tmp5_;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = NULL;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp9_;
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_free0 (_tmp5_);
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1402 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 2312 "installed-media.c"
	}
	goto __finally11;
	__catch11_g_regex_error:
	{
		GError* e = NULL;
#line 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1404 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 2326 "installed-media.c"
	}
	__finally11:
#line 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1400 "/jhbuild/share/vala-0.36/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 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1400 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
		return NULL;
#line 2337 "installed-media.c"
	}
}


static gboolean boxes_installed_media_decompress_co (BoxesInstalledMediaDecompressData* _data_) {
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (_data_->_state_) {
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 0:
#line 2347 "installed-media.c"
		goto _state_0;
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 1:
#line 2351 "installed-media.c"
		goto _state_1;
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 2:
#line 2355 "installed-media.c"
		goto _state_2;
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case 3:
#line 2359 "installed-media.c"
		goto _state_3;
		default:
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_assert_not_reached ();
#line 2364 "installed-media.c"
	}
	_state_0:
#line 159 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = NULL;
#line 159 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp0_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 159 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = FALSE;
#line 159 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp1_ = g_str_has_suffix (_data_->_tmp0_, ".gz");
#line 159 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (!_data_->_tmp1_) {
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->result = FALSE;
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2383 "installed-media.c"
		} else {
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2387 "installed-media.c"
		}
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 2393 "installed-media.c"
	}
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = NULL;
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp2_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = NULL;
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp3_ = g_file_new_for_path (_data_->_tmp2_);
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->compressed = _data_->_tmp3_;
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = NULL;
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp4_ = _data_->compressed;
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 1;
#line 163 "/home/zeenix/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 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 2415 "installed-media.c"
	_state_1:
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = NULL;
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp5_ = g_file_read_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->input_stream = _data_->_tmp5_;
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->compressed);
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2435 "installed-media.c"
		} else {
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2439 "installed-media.c"
		}
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 163 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 2445 "installed-media.c"
	}
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = NULL;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp6_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = NULL;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp7_ = g_path_get_basename (_data_->_tmp6_);
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = NULL;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp8_ = _data_->_tmp7_;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = NULL;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp9_ = string_replace (_data_->_tmp8_, ".gz", "");
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = NULL;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp10_ = _data_->_tmp9_;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->_tmp8_);
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed_path = _data_->_tmp10_;
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = NULL;
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp11_ = _data_->decompressed_path;
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = NULL;
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp12_ = boxes_get_user_pkgcache (_data_->_tmp11_);
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed_path = _data_->_tmp12_;
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = NULL;
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp13_ = _data_->decompressed_path;
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = NULL;
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp14_ = g_file_new_for_path (_data_->_tmp13_);
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressed = _data_->_tmp14_;
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = NULL;
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp15_ = _data_->decompressed;
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_state_ = 2;
#line 168 "/home/zeenix/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 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 2503 "installed-media.c"
	_state_2:
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = NULL;
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp16_ = g_file_replace_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->output_stream = (GOutputStream*) _data_->_tmp16_;
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_error_free (_data_->_inner_error_);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->decompressed);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_free0 (_data_->decompressed_path);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->input_stream);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_g_object_unref0 (_data_->compressed);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_state_ == 0) {
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2529 "installed-media.c"
		} else {
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2533 "installed-media.c"
		}
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_object_unref (_data_->_async_result);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 2539 "installed-media.c"
	}
#line 171 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = NULL;
#line 171 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp17_ = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP);
#line 171 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->decompressor = _data_->_tmp17_;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = NULL;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp18_ = _data_->output_stream;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = NULL;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp19_ = _data_->decompressor;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = NULL;
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp20_ = (GConverterOutputStream*) g_converter_output_stream_new (_data_->_tmp18_, (GConverter*) _data_->_tmp19_);
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->output_stream = (GOutputStream*) _data_->_tmp20_;
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = NULL;
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp21_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:174: Decompressing '%s'..", _data_->_tmp21_);
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp22_ = NULL;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp22_ = g_new0 (guint8, 1048576);
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer_length1 = 0;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_buffer_size_ = 0;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = _data_->_tmp22_;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer_length1 = 1048576;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_buffer_size_ = _data_->buffer_length1;
#line 176 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	while (TRUE) {
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = NULL;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp23_ = _data_->input_stream;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = NULL;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24__length1 = 0;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24_ = _data_->buffer;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp24__length1 = _data_->buffer_length1;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_state_ = 3;
#line 177 "/home/zeenix/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 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return FALSE;
#line 2603 "installed-media.c"
		_state_3:
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = 0L;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp25_ = g_input_stream_read_finish ((GInputStream*) _data_->_tmp23_, _data_->_res_, &_data_->_inner_error_);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->length = _data_->_tmp25_;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_error_free (_data_->_inner_error_);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->buffer = (g_free (_data_->buffer), NULL);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->decompressor);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->output_stream);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->decompressed);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_free0 (_data_->decompressed_path);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->input_stream);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_g_object_unref0 (_data_->compressed);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			if (_data_->_state_ == 0) {
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2635 "installed-media.c"
			} else {
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 2639 "installed-media.c"
			}
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			g_object_unref (_data_->_async_result);
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			return FALSE;
#line 2645 "installed-media.c"
		}
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = 0L;
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->_tmp26_ = _data_->length;
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		if (_data_->_tmp26_ <= ((gssize) 0)) {
#line 179 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			break;
#line 2655 "installed-media.c"
		}
#line 181 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->written = (gssize) 0;
#line 181 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_data_->i = (gssize) 0;
#line 2661 "installed-media.c"
		{
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			_data_->_tmp27_ = TRUE;
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			while (TRUE) {
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (!_data_->_tmp27_) {
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp28_ = 0L;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp28_ = _data_->i;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp29_ = 0L;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->_tmp29_ = _data_->length;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (!(_data_->_tmp28_ < _data_->_tmp29_)) {
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						break;
#line 2681 "installed-media.c"
					}
				}
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp27_ = FALSE;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp31_ = NULL;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp31_ = _data_->output_stream;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32_ = NULL;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32__length1 = 0;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32_ = _data_->buffer;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp32__length1 = _data_->buffer_length1;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33_ = 0L;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp33_ = _data_->i;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp34_ = 0L;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp34_ = _data_->length;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp35_ = 0L;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp35_ = g_output_stream_write (_data_->_tmp31_, _data_->_tmp32_ + ((gint) _data_->_tmp33_), (gsize) (((gint) _data_->_tmp34_) - ((gint) _data_->_tmp33_)), NULL, &_data_->_inner_error_);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp30_ = _data_->_tmp35_;
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_error_free (_data_->_inner_error_);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_data_->buffer = (g_free (_data_->buffer), NULL);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->decompressor);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->output_stream);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->decompressed);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_free0 (_data_->decompressed_path);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->input_stream);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_object_unref0 (_data_->compressed);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (_data_->_state_ == 0) {
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2736 "installed-media.c"
					} else {
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						g_simple_async_result_complete (_data_->_async_result);
#line 2740 "installed-media.c"
					}
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					g_object_unref (_data_->_async_result);
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					return FALSE;
#line 2746 "installed-media.c"
				}
#line 183 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->written = _data_->_tmp30_;
#line 184 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp36_ = 0L;
#line 184 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp36_ = _data_->i;
#line 184 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp37_ = 0L;
#line 184 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->_tmp37_ = _data_->written;
#line 184 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_data_->i = _data_->_tmp36_ + _data_->_tmp37_;
#line 2760 "installed-media.c"
			}
		}
	}
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp38_ = NULL;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp38_ = ((BoxesInstallerMedia*) _data_->self)->device_file;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_debug ("installed-media.vala:187: Decompressed '%s'.", _data_->_tmp38_);
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp39_ = NULL;
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp39_ = _data_->decompressed_path;
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp40_ = NULL;
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->_tmp40_ = g_strdup (_data_->_tmp39_);
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (((BoxesInstallerMedia*) _data_->self)->device_file);
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMedia*) _data_->self)->device_file = _data_->_tmp40_;
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->result = TRUE;
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressor);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressed);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->input_stream);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->compressed);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2802 "installed-media.c"
	} else {
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2806 "installed-media.c"
	}
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressor);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->output_stream);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->decompressed);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_free0 (_data_->decompressed_path);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->input_stream);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_g_object_unref0 (_data_->compressed);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_data_->_state_ == 0) {
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2830 "installed-media.c"
	} else {
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2834 "installed-media.c"
	}
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	g_object_unref (_data_->_async_result);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return FALSE;
#line 2840 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_need_user_input_for_vm_creation (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = FALSE;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 2853 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_ready_to_create (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = TRUE;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 2866 "installed-media.c"
}


static gboolean boxes_installed_media_real_get_live (BoxesInstallerMedia* base) {
	gboolean result;
	BoxesInstalledMedia* self;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	result = FALSE;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	return result;
#line 2879 "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;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = (BoxesInstalledMedia*) base;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp1_ = ((BoxesInstallerMedia*) self)->device_file;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp2_ = string_contains (_tmp1_, "amd64");
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp2_) {
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = TRUE;
#line 2899 "installed-media.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp3_ = ((BoxesInstallerMedia*) self)->device_file;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp4_ = string_contains (_tmp3_, "x86_64");
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp0_ = _tmp4_;
#line 2909 "installed-media.c"
	}
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	if (_tmp0_) {
#line 2913 "installed-media.c"
		gchar* _tmp5_ = NULL;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp5_ = g_strdup ("x86_64");
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		result = _tmp5_;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return result;
#line 2921 "installed-media.c"
	} else {
		gchar** arch_list = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar** _tmp10_ = NULL;
		gint arch_list_length1 = 0;
		gint _arch_list_size_ = 0;
		gchar** _tmp11_ = NULL;
		gint _tmp11__length1 = 0;
		const gchar* _tmp16_ = NULL;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp6_ = g_strdup ("i686");
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp7_ = g_strdup ("i586");
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp8_ = g_strdup ("i486");
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp9_ = g_strdup ("i386");
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_ = g_new0 (gchar*, 4 + 1);
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_[0] = _tmp6_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_[1] = _tmp7_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_[2] = _tmp8_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp10_[3] = _tmp9_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list = _tmp10_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list_length1 = 4;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_arch_list_size_ = arch_list_length1;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11_ = arch_list;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp11__length1 = arch_list_length1;
#line 2962 "installed-media.c"
		{
			gchar** arch_collection = NULL;
			gint arch_collection_length1 = 0;
			gint _arch_collection_size_ = 0;
			gint arch_it = 0;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			arch_collection = _tmp11_;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			arch_collection_length1 = _tmp11__length1;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
			for (arch_it = 0; arch_it < _tmp11__length1; arch_it = arch_it + 1) {
#line 2974 "installed-media.c"
				gchar* _tmp12_ = NULL;
				gchar* arch = NULL;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				_tmp12_ = g_strdup (arch_collection[arch_it]);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
				arch = _tmp12_;
#line 2981 "installed-media.c"
				{
					const gchar* _tmp13_ = NULL;
					const gchar* _tmp14_ = NULL;
					gboolean _tmp15_ = FALSE;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp13_ = ((BoxesInstallerMedia*) self)->device_file;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp14_ = arch;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_tmp15_ = string_contains (_tmp13_, _tmp14_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					if (_tmp15_) {
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						result = arch;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						arch_list = (_vala_array_free (arch_list, arch_list_length1, (GDestroyNotify) g_free), NULL);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
						return result;
#line 3000 "installed-media.c"
					}
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
					_g_free0 (arch);
#line 3004 "installed-media.c"
				}
			}
		}
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		_tmp16_ = ((BoxesInstallerMedia*) self)->device_file;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_debug ("installed-media.vala:32: Failed to guess architecture for media '%s'.", _tmp16_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		result = NULL;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		arch_list = (_vala_array_free (arch_list, arch_list_length1, (GDestroyNotify) g_free), NULL);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		return result;
#line 3018 "installed-media.c"
	}
}


static void boxes_installed_media_class_init (BoxesInstalledMediaClass * klass) {
	GRegex* _tmp0_ = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMediaClass *) klass)->setup_domain_config = boxes_installed_media_real_setup_domain_config;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_properties = boxes_installed_media_real_get_vm_properties;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_creator = boxes_installed_media_real_get_vm_creator;
#line 5 "/home/zeenix/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 "/home/zeenix/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 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_live = boxes_installed_media_real_get_live;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_architecture = boxes_installed_media_real_get_architecture;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_installed_media_get_property;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_installed_media_finalize;
#line 5 "/home/zeenix/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 "/home/zeenix/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 "/home/zeenix/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 "/home/zeenix/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 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	_tmp0_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_0, "20[0-9]{6,6}", 0));
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	boxes_installed_media_date_regex = _tmp0_;
#line 3057 "installed-media.c"
}


static void boxes_installed_media_instance_init (BoxesInstalledMedia * self) {
}


static void boxes_installed_media_finalize (GObject* obj) {
	BoxesInstalledMedia * self;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMedia);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	G_OBJECT_CLASS (boxes_installed_media_parent_class)->finalize (obj);
#line 3071 "installed-media.c"
}


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 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
	switch (property_id) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_NEED_USER_INPUT_FOR_VM_CREATION:
#line 5 "/home/zeenix/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 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_READY_TO_CREATE:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_ready_to_create ((BoxesInstallerMedia*) self));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_LIVE:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_set_boolean (value, boxes_installer_media_get_live ((BoxesInstallerMedia*) self));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		case BOXES_INSTALLED_MEDIA_ARCHITECTURE:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		g_value_take_string (value, boxes_installer_media_get_architecture ((BoxesInstallerMedia*) self));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 3116 "installed-media.c"
		default:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/installed-media.vala"
		break;
#line 3122 "installed-media.c"
	}
}


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


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



