/* media-manager.c generated by valac 0.37.1.4-3591e, the Vala compiler
 * generated from media-manager.vala, do not modify */

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

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


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

typedef struct _BoxesMediaManager BoxesMediaManager;
typedef struct _BoxesMediaManagerClass BoxesMediaManagerClass;
typedef struct _BoxesMediaManagerPrivate BoxesMediaManagerPrivate;

#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;
enum  {
	BOXES_MEDIA_MANAGER_DUMMY_PROPERTY,
	BOXES_MEDIA_MANAGER_OS_DB,
	BOXES_MEDIA_MANAGER_CLIENT,
	BOXES_MEDIA_MANAGER_LAST_PROPERTY
};
static GParamSpec* boxes_media_manager_properties[BOXES_MEDIA_MANAGER_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

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

#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;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesMediaManagerCreateInstallerMediaForPathData BoxesMediaManagerCreateInstallerMediaForPathData;

#define BOXES_TYPE_LIBVIRT_MEDIA (boxes_libvirt_media_get_type ())
#define BOXES_LIBVIRT_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMedia))
#define BOXES_LIBVIRT_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMediaClass))
#define BOXES_IS_LIBVIRT_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MEDIA))
#define BOXES_IS_LIBVIRT_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MEDIA))
#define BOXES_LIBVIRT_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMediaClass))

typedef struct _BoxesLibvirtMedia BoxesLibvirtMedia;
typedef struct _BoxesLibvirtMediaClass BoxesLibvirtMediaClass;

#define BOXES_TYPE_LIBVIRT_CLONED_MEDIA (boxes_libvirt_cloned_media_get_type ())
#define BOXES_LIBVIRT_CLONED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMedia))
#define BOXES_LIBVIRT_CLONED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMediaClass))
#define BOXES_IS_LIBVIRT_CLONED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA))
#define BOXES_IS_LIBVIRT_CLONED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_CLONED_MEDIA))
#define BOXES_LIBVIRT_CLONED_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMediaClass))

typedef struct _BoxesLibvirtClonedMedia BoxesLibvirtClonedMedia;
typedef struct _BoxesLibvirtClonedMediaClass BoxesLibvirtClonedMediaClass;
typedef struct _BoxesMediaManagerCreateInstallerMediaFromConfigData BoxesMediaManagerCreateInstallerMediaFromConfigData;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define BOXES_TYPE_TRACKER_ISO_QUERY (boxes_tracker_iso_query_get_type ())
#define BOXES_TRACKER_ISO_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TRACKER_ISO_QUERY, BoxesTrackerISOQuery))
#define BOXES_TRACKER_ISO_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TRACKER_ISO_QUERY, BoxesTrackerISOQueryClass))
#define BOXES_IS_TRACKER_ISO_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TRACKER_ISO_QUERY))
#define BOXES_IS_TRACKER_ISO_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TRACKER_ISO_QUERY))
#define BOXES_TRACKER_ISO_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TRACKER_ISO_QUERY, BoxesTrackerISOQueryClass))

typedef struct _BoxesTrackerISOQuery BoxesTrackerISOQuery;
typedef struct _BoxesTrackerISOQueryClass BoxesTrackerISOQueryClass;
#define _boxes_tracker_iso_query_unref0(var) ((var == NULL) ? NULL : (var = (boxes_tracker_iso_query_unref (var), NULL)))
typedef struct _BoxesMediaManagerListInstallerMediasData BoxesMediaManagerListInstallerMediasData;
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_UNATTENDED_INSTALLER (boxes_unattended_installer_get_type ())
#define BOXES_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller))
#define BOXES_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))
#define BOXES_IS_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_IS_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_UNATTENDED_INSTALLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))

typedef struct _BoxesUnattendedInstaller BoxesUnattendedInstaller;
typedef struct _BoxesUnattendedInstallerClass BoxesUnattendedInstallerClass;
typedef struct _BoxesMediaManagerCreateInstallerMediaFromIsoInfoData BoxesMediaManagerCreateInstallerMediaFromIsoInfoData;

struct _BoxesMediaManager {
	GObject parent_instance;
	BoxesMediaManagerPrivate * priv;
};

struct _BoxesMediaManagerClass {
	GObjectClass parent_class;
};

struct _BoxesMediaManagerPrivate {
	BoxesOSDatabase* _os_db;
	GUdevClient* _client;
	TrackerSparqlConnection* connection;
};

struct _BoxesMediaManagerCreateInstallerMediaForPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesMediaManager* self;
	gchar* path;
	GCancellable* cancellable;
	BoxesInstallerMedia* result;
	BoxesInstallerMedia* media;
	BoxesInstalledMedia* _tmp0_;
	const gchar* _tmp1_;
	BoxesInstalledMedia* _tmp2_;
	BoxesInstalledMedia* _tmp3_;
	GError* e;
	BoxesInstallerMedia* _tmp4_;
	const gchar* _tmp5_;
	GCancellable* _tmp6_;
	BoxesInstallerMedia* _tmp7_;
	BoxesInstallerMedia* _tmp8_;
	BoxesInstallerMedia* _tmp9_;
	BoxesInstallerMedia* _tmp10_;
	BoxesInstallerMedia* _tmp11_;
	BoxesInstallerMedia* _tmp12_;
	GError * _inner_error_;
};

typedef enum  {
	BOXES_OS_DATABASE_ERROR_NON_BOOTABLE,
	BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_MEDIA_ID
} BoxesOSDatabaseError;
#define BOXES_OS_DATABASE_ERROR boxes_os_database_error_quark ()
struct _BoxesMediaManagerCreateInstallerMediaFromConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesMediaManager* self;
	GVirConfigDomain* config;
	BoxesInstallerMedia* result;
	gchar* path;
	GVirConfigDomain* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	GVirConfigDomain* _tmp3_;
	gboolean _tmp4_;
	BoxesInstalledMedia* _tmp5_;
	const gchar* _tmp6_;
	BoxesInstalledMedia* _tmp7_;
	BoxesInstalledMedia* _tmp8_;
	GVirConfigDomain* _tmp9_;
	gboolean _tmp10_;
	BoxesLibvirtMedia* _tmp11_;
	const gchar* _tmp12_;
	GVirConfigDomain* _tmp13_;
	BoxesLibvirtMedia* _tmp14_;
	BoxesLibvirtMedia* _tmp15_;
	GVirConfigDomain* _tmp16_;
	gboolean _tmp17_;
	BoxesLibvirtClonedMedia* _tmp18_;
	const gchar* _tmp19_;
	GVirConfigDomain* _tmp20_;
	BoxesLibvirtClonedMedia* _tmp21_;
	BoxesLibvirtClonedMedia* _tmp22_;
	GError* _error_;
	GError* _tmp23_;
	const gchar* _tmp24_;
	gchar* label;
	GVirConfigDomain* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	OsinfoOs* os;
	OsinfoMedia* os_media;
	gchar* os_id;
	GVirConfigDomain* _tmp29_;
	gchar* _tmp30_;
	const gchar* _tmp31_;
	OsinfoOs* _tmp32_;
	BoxesOSDatabase* _tmp33_;
	const gchar* _tmp34_;
	OsinfoOs* _tmp35_;
	OsinfoOs* _tmp36_;
	gchar* media_id;
	GVirConfigDomain* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	OsinfoMedia* _tmp40_;
	BoxesOSDatabase* _tmp41_;
	OsinfoOs* _tmp42_;
	const gchar* _tmp43_;
	OsinfoMedia* _tmp44_;
	OsinfoMedia* _tmp45_;
	GError* _vala1__error_;
	GError* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	OsinfoMedia* _tmp49_;
	OsinfoMedia* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* architecture;
	gchar* _tmp53_;
	OsinfoResources* resources;
	BoxesOSDatabase* _tmp54_;
	OsinfoOs* _tmp55_;
	const gchar* _tmp56_;
	OsinfoResources* _tmp57_;
	BoxesInstallerMedia* media;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	OsinfoOs* _tmp60_;
	OsinfoMedia* _tmp61_;
	OsinfoResources* _tmp62_;
	BoxesInstallerMedia* _tmp63_;
	BoxesInstallerMedia* _tmp64_;
	BoxesInstallerMedia* _tmp65_;
	BoxesInstallerMedia* _tmp66_;
	BoxesInstallerMedia* _tmp67_;
	BoxesInstallerMedia* _tmp68_;
	GError* _vala2__error_;
	GError* _tmp69_;
	const gchar* _tmp70_;
	GError * _inner_error_;
};

struct _BoxesMediaManagerListInstallerMediasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesMediaManager* self;
	GList* result;
	GList* list;
	GUdevEnumerator* enumerator;
	GUdevClient* _tmp0_;
	GUdevEnumerator* _tmp1_;
	GUdevEnumerator* _tmp2_;
	GUdevEnumerator* _tmp3_;
	GList* _tmp4_;
	GList* device_collection;
	GList* device_it;
	GUdevDevice* _tmp5_;
	GUdevDevice* device;
	gboolean _tmp6_;
	GUdevDevice* _tmp7_;
	const gchar* _tmp8_;
	GUdevDevice* _tmp9_;
	gboolean _tmp10_;
	gchar* path;
	GUdevDevice* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	GFile* file;
	const gchar* _tmp14_;
	GFile* _tmp15_;
	GFileInfo* info;
	GFile* _tmp16_;
	GFileInfo* _tmp17_;
	GFileInfo* _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	BoxesInstallerMedia* media;
	const gchar* _tmp21_;
	BoxesInstallerMedia* _tmp22_;
	BoxesInstallerMedia* _tmp23_;
	BoxesInstallerMedia* _tmp24_;
	GError* _error_;
	const gchar* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	TrackerSparqlConnection* _tmp28_;
	BoxesTrackerISOQuery* query;
	TrackerSparqlConnection* _tmp29_;
	BoxesTrackerISOQuery* _tmp30_;
	gchar* _vala1_path;
	gchar* title;
	gchar* os_id;
	gchar* media_id;
	gchar** lang_list;
	gint lang_list_length1;
	gint _lang_list_size_;
	gboolean _tmp31_;
	BoxesTrackerISOQuery* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar** _tmp37_;
	gint _tmp38_;
	gboolean _tmp39_;
	BoxesInstallerMedia* _vala1_media;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	gchar** _tmp44_;
	gint _tmp44__length1;
	BoxesInstallerMedia* _tmp45_;
	GList* dup_node;
	GList* _tmp46_;
	BoxesInstallerMedia* _tmp47_;
	GList* _tmp48_;
	GList* _tmp49_;
	BoxesInstallerMedia* dup_media;
	GList* _tmp50_;
	gconstpointer _tmp51_;
	BoxesInstallerMedia* _tmp52_;
	BoxesInstallerMedia* _tmp53_;
	BoxesInstallerMedia* _tmp54_;
	gint _tmp55_;
	BoxesInstallerMedia* _tmp56_;
	BoxesInstallerMedia* _tmp57_;
	BoxesInstallerMedia* _tmp58_;
	GError* _vala1__error_;
	const gchar* _tmp59_;
	GError* _tmp60_;
	const gchar* _tmp61_;
	GError* _vala2__error_;
	GError* _tmp62_;
	const gchar* _tmp63_;
	GError * _inner_error_;
};

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 _BoxesMediaManagerCreateInstallerMediaFromIsoInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesMediaManager* self;
	gchar* path;
	gchar* label;
	gchar* os_id;
	gchar* media_id;
	gchar** lang_list;
	gint lang_list_length1;
	BoxesInstallerMedia* result;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GError* _tmp5_;
	GError* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	BoxesInstallerMedia* _tmp14_;
	const gchar* _tmp15_;
	BoxesInstallerMedia* _tmp16_;
	BoxesInstallerMedia* _tmp17_;
	OsinfoOs* os;
	BoxesOSDatabase* _tmp18_;
	const gchar* _tmp19_;
	OsinfoOs* _tmp20_;
	OsinfoMedia* os_media;
	BoxesOSDatabase* _tmp21_;
	OsinfoOs* _tmp22_;
	const gchar* _tmp23_;
	OsinfoMedia* _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length1;
	gchar** lang_collection;
	gint lang_collection_length1;
	gint _lang_collection_size_;
	gint lang_it;
	gchar* _tmp26_;
	gchar* lang;
	OsinfoMedia* _tmp27_;
	const gchar* _tmp28_;
	OsinfoResources* resources;
	BoxesOSDatabase* _tmp29_;
	OsinfoOs* _tmp30_;
	OsinfoMedia* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	OsinfoResources* _tmp35_;
	OsinfoResources* _tmp36_;
	BoxesInstallerMedia* media;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	OsinfoOs* _tmp39_;
	OsinfoMedia* _tmp40_;
	OsinfoResources* _tmp41_;
	BoxesInstallerMedia* _tmp42_;
	BoxesInstallerMedia* _tmp43_;
	BoxesInstallerMedia* _tmp44_;
	BoxesInstallerMedia* _tmp45_;
	BoxesInstallerMedia* _tmp46_;
	GError * _inner_error_;
};

typedef void (*BoxesMediaManagerInstallerRecognized) (OsinfoMedia* os_media, OsinfoOs* os, void* user_data);

static gpointer boxes_media_manager_parent_class = NULL;
static BoxesMediaManager* boxes_media_manager_media_manager;
static BoxesMediaManager* boxes_media_manager_media_manager = NULL;

GType boxes_media_manager_get_type (void) G_GNUC_CONST;
GType boxes_os_database_get_type (void) G_GNUC_CONST;
#define BOXES_MEDIA_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerPrivate))
BoxesMediaManager* boxes_media_manager_get_instance (void);
static BoxesMediaManager* boxes_media_manager_new (void);
static BoxesMediaManager* boxes_media_manager_construct (GType object_type);
static void boxes_media_manager_create_installer_media_for_path_data_free (gpointer _data);
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
void boxes_media_manager_create_installer_media_for_path (BoxesMediaManager* self, const gchar* path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_media_manager_create_installer_media_for_path_finish (BoxesMediaManager* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_media_manager_create_installer_media_for_path_co (BoxesMediaManagerCreateInstallerMediaForPathData* _data_);
GType boxes_installed_media_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 void boxes_media_manager_create_installer_media_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_installer_media_new_for_path (const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_installer_media_new_for_path_finish (GAsyncResult* _res_, GError** error);
void boxes_installer_media_construct_for_path (GType object_type, const gchar* path, BoxesMediaManager* media_manager, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_installer_media_construct_for_path_finish (GAsyncResult* _res_, GError** error);
BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_media (BoxesMediaManager* self, BoxesInstallerMedia* media, GError** error);
static void boxes_media_manager_create_installer_media_from_config_data_free (gpointer _data);
void boxes_media_manager_create_installer_media_from_config (BoxesMediaManager* self, GVirConfigDomain* config, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_config_finish (BoxesMediaManager* self, GAsyncResult* _res_);
static gboolean boxes_media_manager_create_installer_media_from_config_co (BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_);
gchar* boxes_vm_configurator_get_source_media_path (GVirConfigDomain* domain);
gboolean boxes_vm_configurator_is_import_config (GVirConfigDomain* domain);
static void boxes_media_manager_create_installer_media_from_config_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean boxes_vm_configurator_is_libvirt_system_import_config (GVirConfigDomain* domain);
GType boxes_libvirt_media_get_type (void) G_GNUC_CONST;
BoxesLibvirtMedia* boxes_libvirt_media_new (const gchar* path, GVirConfigDomain* domain_config, gboolean known_qcow2, GError** error);
BoxesLibvirtMedia* boxes_libvirt_media_construct (GType object_type, const gchar* path, GVirConfigDomain* domain_config, gboolean known_qcow2, GError** error);
gboolean boxes_vm_configurator_is_libvirt_cloning_config (GVirConfigDomain* domain);
GType boxes_libvirt_cloned_media_get_type (void) G_GNUC_CONST;
BoxesLibvirtClonedMedia* boxes_libvirt_cloned_media_new (const gchar* path, GVirConfigDomain* domain_config, GError** error);
BoxesLibvirtClonedMedia* boxes_libvirt_cloned_media_construct (GType object_type, const gchar* path, GVirConfigDomain* domain_config, GError** error);
gchar* boxes_vm_configurator_get_os_id (GVirConfigDomain* domain);
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);
gchar* boxes_vm_configurator_get_os_media_id (GVirConfigDomain* domain);
OsinfoMedia* boxes_os_database_get_media_by_id (BoxesOSDatabase* self, OsinfoOs* os, const gchar* id, GError** error);
OsinfoResources* boxes_os_database_get_resources_for_os (BoxesOSDatabase* self, OsinfoOs* os, const gchar* architecture);
BoxesInstallerMedia* boxes_installer_media_new_from_iso_info (const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources);
BoxesInstallerMedia* boxes_installer_media_construct_from_iso_info (GType object_type, const gchar* path, const gchar* label, OsinfoOs* os, OsinfoMedia* media, OsinfoResources* resources);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_media_manager_list_installer_medias_data_free (gpointer _data);
void boxes_media_manager_list_installer_medias (BoxesMediaManager* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* boxes_media_manager_list_installer_medias_finish (BoxesMediaManager* self, GAsyncResult* _res_);
static gboolean boxes_media_manager_list_installer_medias_co (BoxesMediaManagerListInstallerMediasData* _data_);
GUdevClient* boxes_media_manager_get_client (BoxesMediaManager* self);
static void boxes_media_manager_list_installer_medias_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gpointer boxes_tracker_iso_query_ref (gpointer instance);
void boxes_tracker_iso_query_unref (gpointer instance);
GParamSpec* boxes_param_spec_tracker_iso_query (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_tracker_iso_query (GValue* value, gpointer v_object);
void boxes_value_take_tracker_iso_query (GValue* value, gpointer v_object);
gpointer boxes_value_get_tracker_iso_query (const GValue* value);
GType boxes_tracker_iso_query_get_type (void) G_GNUC_CONST;
void boxes_tracker_iso_query_new (TrackerSparqlConnection* connection, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesTrackerISOQuery* boxes_tracker_iso_query_new_finish (GAsyncResult* _res_, GError** error);
void boxes_tracker_iso_query_construct (GType object_type, TrackerSparqlConnection* connection, GAsyncReadyCallback _callback_, gpointer _user_data_);
BoxesTrackerISOQuery* boxes_tracker_iso_query_construct_finish (GAsyncResult* _res_, GError** error);
void boxes_tracker_iso_query_fetch_next_iso_data (BoxesTrackerISOQuery* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean boxes_tracker_iso_query_fetch_next_iso_data_finish (BoxesTrackerISOQuery* self, GAsyncResult* _res_, gchar* * path, gchar* * title, gchar* * os_id, gchar* * media_id, gchar*** lang_list, int* lang_list_length1, GError** error);
static void boxes_media_manager_create_installer_media_from_iso_info (BoxesMediaManager* self, const gchar* path, const gchar* label, const gchar* os_id, const gchar* media_id, gchar** lang_list, int lang_list_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
static BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_iso_info_finish (BoxesMediaManager* self, GAsyncResult* _res_, GError** error);
static gint boxes_media_manager_compare_media_by_label (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b);
static gint _boxes_media_manager_compare_media_by_label_gcompare_func (gconstpointer a, gconstpointer b);
static gint boxes_media_manager_compare_media_by_release_date (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b);
static gint boxes_media_manager_compare_media_by_vendor (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b);
static gint _boxes_media_manager_compare_media_by_vendor_gcompare_func (gconstpointer a, gconstpointer b);
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_unattended_installer_get_type (void) G_GNUC_CONST;
BoxesUnattendedInstaller* boxes_unattended_installer_new_from_media (BoxesInstallerMedia* media, OsinfoInstallScriptList* scripts, GError** error);
BoxesUnattendedInstaller* boxes_unattended_installer_construct_from_media (GType object_type, BoxesInstallerMedia* media, OsinfoInstallScriptList* scripts, GError** error);
static void boxes_media_manager_set_client (BoxesMediaManager* self, GUdevClient* value);
BoxesOSDatabase* boxes_os_database_new (void);
BoxesOSDatabase* boxes_os_database_construct (GType object_type);
static void boxes_media_manager_set_os_db (BoxesMediaManager* self, BoxesOSDatabase* value);
void boxes_os_database_load (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_os_database_load_finish (BoxesOSDatabase* self, GAsyncResult* _res_);
static void boxes_media_manager_create_installer_media_from_iso_info_data_free (gpointer _data);
static gboolean boxes_media_manager_create_installer_media_from_iso_info_co (BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_);
static void boxes_media_manager_create_installer_media_from_iso_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_media_manager_finalize (GObject * obj);
static void _vala_boxes_media_manager_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_media_manager_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gpointer _g_object_ref0 (gpointer self) {
#line 21 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return self ? g_object_ref (self) : NULL;
#line 590 "media-manager.c"
}


BoxesMediaManager* boxes_media_manager_get_instance (void) {
	BoxesMediaManager* result = NULL;
	BoxesMediaManager* _tmp0_;
	BoxesMediaManager* _tmp2_;
	BoxesMediaManager* _tmp3_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = boxes_media_manager_media_manager;
#line 18 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp0_ == NULL) {
#line 603 "media-manager.c"
		BoxesMediaManager* _tmp1_;
#line 19 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp1_ = boxes_media_manager_new ();
#line 19 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (boxes_media_manager_media_manager);
#line 19 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_media_manager_media_manager = _tmp1_;
#line 611 "media-manager.c"
	}
#line 21 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = boxes_media_manager_media_manager;
#line 21 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 21 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _tmp3_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 621 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_for_path_data_free (gpointer _data) {
	BoxesMediaManagerCreateInstallerMediaForPathData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_slice_free (BoxesMediaManagerCreateInstallerMediaForPathData, _data_);
#line 638 "media-manager.c"
}


void boxes_media_manager_create_installer_media_for_path (BoxesMediaManager* self, const gchar* path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaForPathData* _data_;
	BoxesMediaManager* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_slice_new0 (BoxesMediaManagerCreateInstallerMediaForPathData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_media_manager_create_installer_media_for_path_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = path;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->path = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp3_ = cancellable;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->cancellable);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->cancellable = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_for_path_co (_data_);
#line 677 "media-manager.c"
}


BoxesInstallerMedia* boxes_media_manager_create_installer_media_for_path_finish (BoxesMediaManager* self, GAsyncResult* _res_, GError** error) {
	BoxesInstallerMedia* result;
	BoxesMediaManagerCreateInstallerMediaForPathData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (NULL == _data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return NULL;
#line 690 "media-manager.c"
	}
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 698 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_for_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaForPathData* _data_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = _user_data_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_source_object_ = source_object;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_res_ = _res_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_for_path_co (_data_);
#line 712 "media-manager.c"
}


static gboolean boxes_media_manager_create_installer_media_for_path_co (BoxesMediaManagerCreateInstallerMediaForPathData* _data_) {
#line 24 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (_data_->_state_) {
#line 24 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 0:
#line 721 "media-manager.c"
		goto _state_0;
#line 24 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 1:
#line 725 "media-manager.c"
		goto _state_1;
#line 24 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 2:
#line 729 "media-manager.c"
		goto _state_2;
		default:
#line 24 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_assert_not_reached ();
#line 734 "media-manager.c"
	}
	_state_0:
	{
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp1_ = _data_->path;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_state_ = 1;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_installed_media_new_guess_os (_data_->_tmp1_, _data_->self, boxes_media_manager_create_installer_media_for_path_ready, _data_);
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 746 "media-manager.c"
		_state_1:
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp2_ = boxes_installed_media_new_guess_os_finish (_data_->_res_, &_data_->_inner_error_);
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp0_ = _data_->_tmp2_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
#line 756 "media-manager.c"
				goto __catch62_g_io_error_not_supported;
			}
			goto __finally62;
		}
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp3_ = _data_->_tmp0_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp0_ = NULL;
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 29 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->media = (BoxesInstallerMedia*) _data_->_tmp3_;
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->_tmp0_);
#line 771 "media-manager.c"
	}
	goto __finally62;
	__catch62_g_io_error_not_supported:
	{
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->e = _data_->_inner_error_;
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = NULL;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp5_ = _data_->path;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp6_ = _data_->cancellable;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_state_ = 2;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_installer_media_new_for_path (_data_->_tmp5_, _data_->self, _data_->_tmp6_, boxes_media_manager_create_installer_media_for_path_ready, _data_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 790 "media-manager.c"
		_state_2:
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp7_ = boxes_installer_media_new_for_path_finish (_data_->_res_, &_data_->_inner_error_);
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp4_ = _data_->_tmp7_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_error_free0 (_data_->e);
#line 800 "media-manager.c"
			goto __finally62;
		}
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp8_ = _data_->_tmp4_;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp4_ = NULL;
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 31 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->media = _data_->_tmp8_;
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->_tmp4_);
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_data_->e);
#line 815 "media-manager.c"
	}
	__finally62:
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 28 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 828 "media-manager.c"
	}
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp10_ = _data_->media;
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp11_ = boxes_media_manager_create_installer_media_from_media (_data_->self, _data_->_tmp10_, &_data_->_inner_error_);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp9_ = _data_->_tmp11_;
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 846 "media-manager.c"
	}
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp12_ = _data_->_tmp9_;
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp9_ = NULL;
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = _data_->_tmp12_;
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->_tmp9_);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->media);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_state_ != 0) {
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 866 "media-manager.c"
		}
	}
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_unref (_data_->_async_result);
#line 34 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return FALSE;
#line 873 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_from_config_data_free (gpointer _data) {
	BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->config);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_slice_free (BoxesMediaManagerCreateInstallerMediaFromConfigData, _data_);
#line 888 "media-manager.c"
}


void boxes_media_manager_create_installer_media_from_config (BoxesMediaManager* self, GVirConfigDomain* config, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_;
	BoxesMediaManager* _tmp0_;
	GVirConfigDomain* _tmp1_;
	GVirConfigDomain* _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_slice_new0 (BoxesMediaManagerCreateInstallerMediaFromConfigData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_media_manager_create_installer_media_from_config_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = config;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->config);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->config = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_from_config_co (_data_);
#line 917 "media-manager.c"
}


BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_config_finish (BoxesMediaManager* self, GAsyncResult* _res_) {
	BoxesInstallerMedia* result;
	BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 932 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_from_config_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = _user_data_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_source_object_ = source_object;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_res_ = _res_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_from_config_co (_data_);
#line 946 "media-manager.c"
}


static gboolean boxes_media_manager_create_installer_media_from_config_co (BoxesMediaManagerCreateInstallerMediaFromConfigData* _data_) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (_data_->_state_) {
#line 37 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 0:
#line 955 "media-manager.c"
		goto _state_0;
#line 37 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 1:
#line 959 "media-manager.c"
		goto _state_1;
#line 37 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 2:
#line 963 "media-manager.c"
		goto _state_2;
		default:
#line 37 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_assert_not_reached ();
#line 968 "media-manager.c"
	}
	_state_0:
#line 38 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp0_ = _data_->config;
#line 38 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp1_ = boxes_vm_configurator_get_source_media_path (_data_->_tmp0_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->path = _data_->_tmp1_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp2_ = _data_->path;
#line 39 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp2_ == NULL) {
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->result = NULL;
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->path);
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_state_ != 0) {
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 993 "media-manager.c"
			}
		}
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 40 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1000 "media-manager.c"
	}
	{
#line 43 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp3_ = _data_->config;
#line 43 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp4_ = boxes_vm_configurator_is_import_config (_data_->_tmp3_);
#line 43 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_tmp4_) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp6_ = _data_->path;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_state_ = 1;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			boxes_installed_media_new_guess_os (_data_->_tmp6_, _data_->self, boxes_media_manager_create_installer_media_from_config_ready, _data_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return FALSE;
#line 1017 "media-manager.c"
			_state_1:
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp7_ = boxes_installed_media_new_guess_os_finish (_data_->_res_, &_data_->_inner_error_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp5_ = _data_->_tmp7_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1025 "media-manager.c"
				goto __catch63_g_error;
			}
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp8_ = _data_->_tmp5_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp5_ = NULL;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->result = (BoxesInstallerMedia*) _data_->_tmp8_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (_data_->_tmp5_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->path);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (_data_->_state_ != 0) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1046 "media-manager.c"
				}
			}
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_object_unref (_data_->_async_result);
#line 44 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return FALSE;
#line 1053 "media-manager.c"
		} else {
#line 45 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp9_ = _data_->config;
#line 45 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp10_ = boxes_vm_configurator_is_libvirt_system_import_config (_data_->_tmp9_);
#line 45 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (_data_->_tmp10_) {
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp12_ = _data_->path;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp13_ = _data_->config;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp14_ = boxes_libvirt_media_new (_data_->_tmp12_, _data_->_tmp13_, FALSE, &_data_->_inner_error_);
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp11_ = _data_->_tmp14_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1071 "media-manager.c"
					goto __catch63_g_error;
				}
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp15_ = _data_->_tmp11_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp11_ = NULL;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->result = (BoxesInstallerMedia*) _data_->_tmp15_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->_tmp11_);
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->path);
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_state_ != 0) {
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1092 "media-manager.c"
					}
				}
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_object_unref (_data_->_async_result);
#line 46 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				return FALSE;
#line 1099 "media-manager.c"
			} else {
#line 47 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp16_ = _data_->config;
#line 47 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp17_ = boxes_vm_configurator_is_libvirt_cloning_config (_data_->_tmp16_);
#line 47 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_tmp17_) {
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp19_ = _data_->path;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp20_ = _data_->config;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp21_ = boxes_libvirt_cloned_media_new (_data_->_tmp19_, _data_->_tmp20_, &_data_->_inner_error_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp18_ = _data_->_tmp21_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1117 "media-manager.c"
						goto __catch63_g_error;
					}
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp22_ = _data_->_tmp18_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp18_ = NULL;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->result = (BoxesInstallerMedia*) _data_->_tmp22_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->_tmp18_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->path);
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (_data_->_state_ != 0) {
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1138 "media-manager.c"
						}
					}
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_object_unref (_data_->_async_result);
#line 48 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return FALSE;
#line 1145 "media-manager.c"
				}
			}
		}
	}
	goto __finally63;
	__catch63_g_error:
	{
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = NULL;
#line 50 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp23_ = _data_->_error_;
#line 50 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp24_ = _data_->_tmp23_->message;
#line 50 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_debug ("media-manager.vala:50: %s", _data_->_tmp24_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->result = NULL;
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_data_->_error_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->path);
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_state_ != 0) {
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1177 "media-manager.c"
			}
		}
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 52 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1184 "media-manager.c"
	}
	__finally63:
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->path);
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_clear_error (&_data_->_inner_error_);
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 42 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1199 "media-manager.c"
	}
#line 55 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp25_ = _data_->config;
#line 55 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp26_ = gvir_config_domain_get_title (_data_->_tmp25_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp27_ = _data_->_tmp26_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp28_ = g_strdup (_data_->_tmp27_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->label = _data_->_tmp28_;
#line 57 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->os = NULL;
#line 58 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->os_media = NULL;
#line 1215 "media-manager.c"
	{
#line 61 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp29_ = _data_->config;
#line 61 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp30_ = boxes_vm_configurator_get_os_id (_data_->_tmp29_);
#line 61 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->os_id = _data_->_tmp30_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp31_ = _data_->os_id;
#line 62 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_tmp31_ != NULL) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp33_ = _data_->self->priv->_os_db;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp34_ = _data_->os_id;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_state_ = 2;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			boxes_os_database_get_os_by_id (_data_->_tmp33_, _data_->_tmp34_, boxes_media_manager_create_installer_media_from_config_ready, _data_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return FALSE;
#line 1237 "media-manager.c"
			_state_2:
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp35_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp33_, _data_->_res_, &_data_->_inner_error_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp32_ = _data_->_tmp35_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->os_id);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 1249 "media-manager.c"
					goto __catch64_boxes_os_database_error;
				}
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->os_id);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->os_media);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->os);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->label);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->path);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_clear_error (&_data_->_inner_error_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_object_unref (_data_->_async_result);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				return FALSE;
#line 1270 "media-manager.c"
			}
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp36_ = _data_->_tmp32_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp32_ = NULL;
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (_data_->os);
#line 63 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->os = _data_->_tmp36_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp37_ = _data_->config;
#line 65 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp38_ = boxes_vm_configurator_get_os_media_id (_data_->_tmp37_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->media_id = _data_->_tmp38_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp39_ = _data_->media_id;
#line 66 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (_data_->_tmp39_ != NULL) {
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp41_ = _data_->self->priv->_os_db;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp42_ = _data_->os;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp43_ = _data_->media_id;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp44_ = boxes_os_database_get_media_by_id (_data_->_tmp41_, _data_->_tmp42_, _data_->_tmp43_, &_data_->_inner_error_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp40_ = _data_->_tmp44_;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->media_id);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->_tmp32_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->os_id);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 1310 "media-manager.c"
						goto __catch64_boxes_os_database_error;
					}
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->media_id);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->_tmp32_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->os_id);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->os_media);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->os);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->label);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->path);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_clear_error (&_data_->_inner_error_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_object_unref (_data_->_async_result);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return FALSE;
#line 1335 "media-manager.c"
				}
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp45_ = _data_->_tmp40_;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp40_ = NULL;
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->os_media);
#line 67 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->os_media = _data_->_tmp45_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->_tmp40_);
#line 1347 "media-manager.c"
			}
#line 62 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->media_id);
#line 62 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (_data_->_tmp32_);
#line 1353 "media-manager.c"
		}
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->os_id);
#line 1357 "media-manager.c"
	}
	goto __finally64;
	__catch64_boxes_os_database_error:
	{
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_vala1__error_ = _data_->_inner_error_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = NULL;
#line 70 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp46_ = _data_->_vala1__error_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp47_ = _data_->_tmp46_->message;
#line 70 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_warning ("media-manager.vala:70: %s", _data_->_tmp47_);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_data_->_vala1__error_);
#line 1374 "media-manager.c"
	}
	__finally64:
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os_media);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->label);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->path);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_clear_error (&_data_->_inner_error_);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 60 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1395 "media-manager.c"
	}
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp49_ = _data_->os_media;
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp49_ != NULL) {
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp50_ = _data_->os_media;
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_get (_data_->_tmp50_, "architecture", &_data_->_tmp51_, NULL);
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp52_ = _data_->_tmp51_;
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->_tmp48_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp48_ = _data_->_tmp52_;
#line 1411 "media-manager.c"
	} else {
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->_tmp48_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp48_ = NULL;
#line 1417 "media-manager.c"
	}
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp53_ = g_strdup (_data_->_tmp48_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->architecture = _data_->_tmp53_;
#line 74 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp54_ = _data_->self->priv->_os_db;
#line 74 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp55_ = _data_->os;
#line 74 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp56_ = _data_->architecture;
#line 74 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp57_ = boxes_os_database_get_resources_for_os (_data_->_tmp54_, _data_->_tmp55_, _data_->_tmp56_);
#line 74 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->resources = _data_->_tmp57_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp58_ = _data_->path;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp59_ = _data_->label;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp60_ = _data_->os;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp61_ = _data_->os_media;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp62_ = _data_->resources;
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp63_ = boxes_installer_media_new_from_iso_info (_data_->_tmp58_, _data_->_tmp59_, _data_->_tmp60_, _data_->_tmp61_, _data_->_tmp62_);
#line 76 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->media = _data_->_tmp63_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp64_ = _data_->media;
#line 77 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (_data_->_tmp64_ != NULL, NULL);
#line 1451 "media-manager.c"
	{
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp66_ = _data_->media;
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp67_ = boxes_media_manager_create_installer_media_from_media (_data_->self, _data_->_tmp66_, &_data_->_inner_error_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp65_ = _data_->_tmp67_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1461 "media-manager.c"
			goto __catch65_g_error;
		}
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp68_ = _data_->_tmp65_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp65_ = NULL;
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 80 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->media = _data_->_tmp68_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->_tmp65_);
#line 1474 "media-manager.c"
	}
	goto __finally65;
	__catch65_g_error:
	{
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_vala2__error_ = _data_->_inner_error_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = NULL;
#line 82 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp69_ = _data_->_vala2__error_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp70_ = _data_->_tmp69_->message;
#line 82 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_debug ("media-manager.vala:82: %s", _data_->_tmp70_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_data_->_vala2__error_);
#line 1491 "media-manager.c"
	}
	__finally65:
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->resources);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->architecture);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->_tmp48_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os_media);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->label);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->path);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_clear_error (&_data_->_inner_error_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 79 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1520 "media-manager.c"
	}
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = _data_->media;
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->resources);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->architecture);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->_tmp48_);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->os_media);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->os);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->label);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->path);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_state_ != 0) {
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1546 "media-manager.c"
		}
	}
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_unref (_data_->_async_result);
#line 85 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return FALSE;
#line 1553 "media-manager.c"
}


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


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


static void boxes_media_manager_list_installer_medias_data_free (gpointer _data) {
	BoxesMediaManagerListInstallerMediasData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_slice_free (BoxesMediaManagerListInstallerMediasData, _data_);
#line 1580 "media-manager.c"
}


void boxes_media_manager_list_installer_medias (BoxesMediaManager* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMediaManagerListInstallerMediasData* _data_;
	BoxesMediaManager* _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_slice_new0 (BoxesMediaManagerListInstallerMediasData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_media_manager_list_installer_medias_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_list_installer_medias_co (_data_);
#line 1599 "media-manager.c"
}


GList* boxes_media_manager_list_installer_medias_finish (BoxesMediaManager* self, GAsyncResult* _res_) {
	GList* result;
	BoxesMediaManagerListInstallerMediasData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 1614 "media-manager.c"
}


static void boxes_media_manager_list_installer_medias_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesMediaManagerListInstallerMediasData* _data_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = _user_data_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_source_object_ = source_object;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_res_ = _res_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_list_installer_medias_co (_data_);
#line 1628 "media-manager.c"
}


static gint _boxes_media_manager_compare_media_by_label_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = boxes_media_manager_compare_media_by_label ((BoxesInstallerMedia*) a, (BoxesInstallerMedia*) b);
#line 137 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 1637 "media-manager.c"
}


static gint _boxes_media_manager_compare_media_by_vendor_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = boxes_media_manager_compare_media_by_vendor ((BoxesInstallerMedia*) a, (BoxesInstallerMedia*) b);
#line 150 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 1646 "media-manager.c"
}


static gboolean boxes_media_manager_list_installer_medias_co (BoxesMediaManagerListInstallerMediasData* _data_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (_data_->_state_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 0:
#line 1655 "media-manager.c"
		goto _state_0;
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 1:
#line 1659 "media-manager.c"
		goto _state_1;
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 2:
#line 1663 "media-manager.c"
		goto _state_2;
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 3:
#line 1667 "media-manager.c"
		goto _state_3;
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 4:
#line 1671 "media-manager.c"
		goto _state_4;
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 5:
#line 1675 "media-manager.c"
		goto _state_5;
		default:
#line 88 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_assert_not_reached ();
#line 1680 "media-manager.c"
	}
	_state_0:
#line 89 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->list = NULL;
#line 92 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp0_ = _data_->self->priv->_client;
#line 92 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp1_ = g_udev_enumerator_new (_data_->_tmp0_);
#line 92 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->enumerator = _data_->_tmp1_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp2_ = _data_->enumerator;
#line 94 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_udev_enumerator_add_match_property (_data_->_tmp2_, "DEVTYPE", "disk");
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp3_ = _data_->enumerator;
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp4_ = g_udev_enumerator_execute (_data_->_tmp3_);
#line 1699 "media-manager.c"
	{
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->device_collection = _data_->_tmp4_;
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		for (_data_->device_it = _data_->device_collection; _data_->device_it != NULL; _data_->device_it = _data_->device_it->next) {
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp5_ = _g_object_ref0 ((GUdevDevice*) _data_->device_it->data);
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->device = _data_->_tmp5_;
#line 1709 "media-manager.c"
			{
#line 97 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp7_ = _data_->device;
#line 97 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp8_ = g_udev_device_get_property (_data_->_tmp7_, "ID_FS_BOOT_SYSTEM_ID");
#line 97 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_tmp8_ == NULL) {
#line 98 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp9_ = _data_->device;
#line 98 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp10_ = g_udev_device_get_property_as_boolean (_data_->_tmp9_, "OSINFO_BOOTABLE");
#line 98 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp6_ = !_data_->_tmp10_;
#line 1723 "media-manager.c"
				} else {
#line 97 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp6_ = FALSE;
#line 1727 "media-manager.c"
				}
#line 97 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_tmp6_) {
#line 99 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->device);
#line 99 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					continue;
#line 1735 "media-manager.c"
				}
#line 101 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp11_ = _data_->device;
#line 101 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp12_ = g_udev_device_get_device_file (_data_->_tmp11_);
#line 101 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp13_ = g_strdup (_data_->_tmp12_);
#line 101 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->path = _data_->_tmp13_;
#line 102 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp14_ = _data_->path;
#line 102 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp15_ = g_file_new_for_path (_data_->_tmp14_);
#line 102 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->file = _data_->_tmp15_;
#line 1751 "media-manager.c"
				{
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp16_ = _data_->file;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_state_ = 1;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_file_query_info_async (_data_->_tmp16_, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, NULL, boxes_media_manager_list_installer_medias_ready, _data_);
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return FALSE;
#line 1761 "media-manager.c"
					_state_1:
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp17_ = g_file_query_info_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error_);
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->info = _data_->_tmp17_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1769 "media-manager.c"
						goto __catch66_g_error;
					}
#line 108 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp18_ = _data_->info;
#line 108 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp19_ = g_file_info_get_attribute_boolean (_data_->_tmp18_, G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
#line 108 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (!_data_->_tmp19_) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_data_->_tmp20_ = _data_->path;
#line 109 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						g_debug ("media-manager.vala:109: No read access to '%s', ignoring..", _data_->_tmp20_);
#line 110 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->info);
#line 110 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->file);
#line 110 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_free0 (_data_->path);
#line 110 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->device);
#line 110 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						continue;
#line 1792 "media-manager.c"
					}
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp21_ = _data_->path;
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_state_ = 2;
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					boxes_media_manager_create_installer_media_for_path (_data_->self, _data_->_tmp21_, NULL, boxes_media_manager_list_installer_medias_ready, _data_);
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return FALSE;
#line 1802 "media-manager.c"
					_state_2:
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp22_ = boxes_media_manager_create_installer_media_for_path_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->media = _data_->_tmp22_;
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 113 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->info);
#line 1812 "media-manager.c"
						goto __catch66_g_error;
					}
#line 115 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp23_ = _data_->media;
#line 115 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp24_ = _g_object_ref0 (_data_->_tmp23_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->list = g_list_append (_data_->list, _data_->_tmp24_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->media);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->info);
#line 1825 "media-manager.c"
				}
				goto __finally66;
				__catch66_g_error:
				{
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_error_ = _data_->_inner_error_;
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_inner_error_ = NULL;
#line 117 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp25_ = _data_->path;
#line 117 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp26_ = _data_->_error_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp27_ = _data_->_tmp26_->message;
#line 117 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_warning ("media-manager.vala:117: Failed to get information on device '%s': %s. " \
"Ignoring..", _data_->_tmp25_, _data_->_tmp27_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_error_free0 (_data_->_error_);
#line 1844 "media-manager.c"
				}
				__finally66:
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->file);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (_data_->path);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->device);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					__g_list_free__g_object_unref0_0 (_data_->device_collection);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->enumerator);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					__g_list_free__g_object_unref0_0 (_data_->list);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_clear_error (&_data_->_inner_error_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					g_object_unref (_data_->_async_result);
#line 103 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return FALSE;
#line 1869 "media-manager.c"
				}
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->file);
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->path);
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->device);
#line 1877 "media-manager.c"
			}
		}
#line 96 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		__g_list_free__g_object_unref0_0 (_data_->device_collection);
#line 1882 "media-manager.c"
	}
#line 121 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp28_ = _data_->self->priv->connection;
#line 121 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp28_ == NULL) {
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->result = _data_->list;
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->enumerator);
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_state_ != 0) {
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1900 "media-manager.c"
			}
		}
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 122 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1907 "media-manager.c"
	}
	{
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp29_ = _data_->self->priv->connection;
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_state_ = 3;
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_tracker_iso_query_new (_data_->_tmp29_, boxes_media_manager_list_installer_medias_ready, _data_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 1918 "media-manager.c"
		_state_3:
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp30_ = boxes_tracker_iso_query_new_finish (_data_->_res_, &_data_->_inner_error_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->query = _data_->_tmp30_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1926 "media-manager.c"
			goto __catch67_g_error;
		}
#line 128 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->lang_list_length1 = 0;
#line 128 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_lang_list_size_ = 0;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		while (TRUE) {
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp32_ = _data_->query;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp33_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp34_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp35_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp36_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp37_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_state_ = 4;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			boxes_tracker_iso_query_fetch_next_iso_data (_data_->_tmp32_, boxes_media_manager_list_installer_medias_ready, _data_);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return FALSE;
#line 1953 "media-manager.c"
			_state_4:
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp39_ = boxes_tracker_iso_query_fetch_next_iso_data_finish (_data_->_tmp32_, _data_->_res_, &_data_->_tmp33_, &_data_->_tmp34_, &_data_->_tmp35_, &_data_->_tmp36_, &_data_->_tmp37_, &_data_->_tmp38_, &_data_->_inner_error_);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->_vala1_path);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_vala1_path = _data_->_tmp33_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->title);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->title = _data_->_tmp34_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->os_id);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->os_id = _data_->_tmp35_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (_data_->media_id);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->media_id = _data_->_tmp36_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->lang_list = (_vala_array_free (_data_->lang_list, _data_->lang_list_length1, (GDestroyNotify) g_free), NULL);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->lang_list = _data_->_tmp37_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->lang_list_length1 = _data_->_tmp38_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_lang_list_size_ = _data_->lang_list_length1;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp31_ = _data_->_tmp39_;
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->lang_list = (_vala_array_free (_data_->lang_list, _data_->lang_list_length1, (GDestroyNotify) g_free), NULL);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->media_id);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->os_id);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->title);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->_vala1_path);
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_boxes_tracker_iso_query_unref0 (_data_->query);
#line 1997 "media-manager.c"
				goto __catch67_g_error;
			}
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (!_data_->_tmp31_) {
#line 130 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				break;
#line 2004 "media-manager.c"
			}
			{
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp40_ = _data_->_vala1_path;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp41_ = _data_->title;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp42_ = _data_->os_id;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp43_ = _data_->media_id;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp44_ = _data_->lang_list;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp44__length1 = _data_->lang_list_length1;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_state_ = 5;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				boxes_media_manager_create_installer_media_from_iso_info (_data_->self, _data_->_tmp40_, _data_->_tmp41_, _data_->_tmp42_, _data_->_tmp43_, _data_->_tmp44_, _data_->_tmp44__length1, boxes_media_manager_list_installer_medias_ready, _data_);
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				return FALSE;
#line 2025 "media-manager.c"
				_state_5:
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp45_ = boxes_media_manager_create_installer_media_from_iso_info_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_vala1_media = _data_->_tmp45_;
#line 136 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 2033 "media-manager.c"
					goto __catch68_g_error;
				}
#line 137 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp46_ = _data_->list;
#line 137 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp47_ = _data_->_vala1_media;
#line 137 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp48_ = g_list_find_custom (_data_->_tmp46_, _data_->_tmp47_, _boxes_media_manager_compare_media_by_label_gcompare_func);
#line 137 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->dup_node = _data_->_tmp48_;
#line 138 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp49_ = _data_->dup_node;
#line 138 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_data_->_tmp49_ != NULL) {
#line 143 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp50_ = _data_->dup_node;
#line 143 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp51_ = _data_->_tmp50_->data;
#line 143 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp52_ = _g_object_ref0 ((BoxesInstallerMedia*) _data_->_tmp51_);
#line 143 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->dup_media = _data_->_tmp52_;
#line 144 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp53_ = _data_->_vala1_media;
#line 144 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp54_ = _data_->dup_media;
#line 144 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_data_->_tmp55_ = boxes_media_manager_compare_media_by_release_date (_data_->_tmp53_, _data_->_tmp54_);
#line 144 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					if (_data_->_tmp55_ <= 0) {
#line 145 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_data_->_tmp56_ = _data_->dup_media;
#line 145 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_data_->list = g_list_remove (_data_->list, _data_->_tmp56_);
#line 2068 "media-manager.c"
					} else {
#line 147 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->dup_media);
#line 147 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						_g_object_unref0 (_data_->_vala1_media);
#line 147 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
						continue;
#line 2076 "media-manager.c"
					}
#line 138 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_object_unref0 (_data_->dup_media);
#line 2080 "media-manager.c"
				}
#line 150 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp57_ = _data_->_vala1_media;
#line 150 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp58_ = _g_object_ref0 (_data_->_tmp57_);
#line 150 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->list = g_list_insert_sorted (_data_->list, _data_->_tmp58_, _boxes_media_manager_compare_media_by_vendor_gcompare_func);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_object_unref0 (_data_->_vala1_media);
#line 2090 "media-manager.c"
			}
			goto __finally68;
			__catch68_g_error:
			{
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_vala1__error_ = _data_->_inner_error_;
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_inner_error_ = NULL;
#line 152 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp59_ = _data_->_vala1_path;
#line 152 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp60_ = _data_->_vala1__error_;
#line 152 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp61_ = _data_->_tmp60_->message;
#line 152 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_warning ("media-manager.vala:152: Failed to use ISO '%s': %s", _data_->_tmp59_, _data_->_tmp61_);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_error_free0 (_data_->_vala1__error_);
#line 2109 "media-manager.c"
			}
			__finally68:
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->lang_list = (_vala_array_free (_data_->lang_list, _data_->lang_list_length1, (GDestroyNotify) g_free), NULL);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->media_id);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->os_id);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->title);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->_vala1_path);
#line 135 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_boxes_tracker_iso_query_unref0 (_data_->query);
#line 2126 "media-manager.c"
				goto __catch67_g_error;
			}
		}
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->lang_list = (_vala_array_free (_data_->lang_list, _data_->lang_list_length1, (GDestroyNotify) g_free), NULL);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->media_id);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->os_id);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->title);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->_vala1_path);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_boxes_tracker_iso_query_unref0 (_data_->query);
#line 2142 "media-manager.c"
	}
	goto __finally67;
	__catch67_g_error:
	{
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_vala2__error_ = _data_->_inner_error_;
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = NULL;
#line 156 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp62_ = _data_->_vala2__error_;
#line 156 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp63_ = _data_->_tmp62_->message;
#line 156 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_warning ("media-manager.vala:156: Failed to fetch list of ISOs from Tracker: %s.", _data_->_tmp63_);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_data_->_vala2__error_);
#line 2159 "media-manager.c"
	}
	__finally67:
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->enumerator);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		__g_list_free__g_object_unref0_0 (_data_->list);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.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 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_clear_error (&_data_->_inner_error_);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 125 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 2176 "media-manager.c"
	}
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = _data_->list;
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->enumerator);
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_state_ != 0) {
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2190 "media-manager.c"
		}
	}
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_unref (_data_->_async_result);
#line 159 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return FALSE;
#line 2197 "media-manager.c"
}


BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_media (BoxesMediaManager* self, BoxesInstallerMedia* media, GError** error) {
	BoxesInstallerMedia* result = NULL;
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
	OsinfoInstallScriptList* install_scripts = NULL;
	BoxesInstallerMedia* _tmp4_;
	OsinfoOs* _tmp5_;
	OsinfoInstallScriptList* _tmp6_;
	OsinfoFilter* filter = NULL;
	OsinfoFilter* _tmp7_;
	OsinfoFilter* _tmp8_;
	OsinfoInstallScriptList* _tmp9_;
	OsinfoFilter* _tmp10_;
	OsinfoList* _tmp11_;
	OsinfoInstallScriptList* _tmp12_;
	BoxesInstallerMedia* install_media = NULL;
	BoxesInstallerMedia* _tmp13_;
	BoxesInstallerMedia* _tmp14_;
	OsinfoInstallScriptList* _tmp15_;
	gint _tmp16_;
	GError * _inner_error_ = NULL;
#line 162 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 162 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media != NULL, NULL);
#line 163 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = media;
#line 163 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = _tmp0_->os;
#line 163 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp1_ == NULL) {
#line 2232 "media-manager.c"
		BoxesInstallerMedia* _tmp2_;
		BoxesInstallerMedia* _tmp3_;
#line 164 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp2_ = media;
#line 164 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp3_ = _g_object_ref0 (_tmp2_);
#line 164 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		result = _tmp3_;
#line 164 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return result;
#line 2243 "media-manager.c"
	}
#line 166 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp4_ = media;
#line 166 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp5_ = _tmp4_->os;
#line 166 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp6_ = osinfo_os_get_install_script_list (_tmp5_);
#line 166 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	install_scripts = _tmp6_;
#line 167 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp7_ = osinfo_filter_new ();
#line 167 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	filter = _tmp7_;
#line 168 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp8_ = filter;
#line 168 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	osinfo_filter_add_constraint (_tmp8_, OSINFO_INSTALL_SCRIPT_PROP_PROFILE, OSINFO_INSTALL_SCRIPT_PROFILE_DESKTOP);
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp9_ = install_scripts;
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp10_ = filter;
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp11_ = osinfo_list_new_filtered (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, osinfo_list_get_type ()) ? ((OsinfoList*) _tmp9_) : NULL, _tmp10_);
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp12_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, osinfo_install_scriptlist_get_type ()) ? ((OsinfoInstallScriptList*) _tmp11_) : NULL;
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp12_ == NULL) {
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_tmp11_);
#line 2273 "media-manager.c"
	}
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (install_scripts);
#line 169 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	install_scripts = _tmp12_;
#line 171 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp13_ = media;
#line 171 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp14_ = _g_object_ref0 (_tmp13_);
#line 171 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	install_media = _tmp14_;
#line 172 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp15_ = install_scripts;
#line 172 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp16_ = osinfo_list_get_length ((OsinfoList*) _tmp15_);
#line 172 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp16_ > 0) {
#line 2291 "media-manager.c"
		{
			BoxesUnattendedInstaller* _tmp17_ = NULL;
			BoxesInstallerMedia* _tmp18_;
			OsinfoInstallScriptList* _tmp19_;
			BoxesUnattendedInstaller* _tmp20_;
			BoxesUnattendedInstaller* _tmp21_;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp18_ = media;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp19_ = install_scripts;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp20_ = boxes_unattended_installer_new_from_media (_tmp18_, _tmp19_, &_inner_error_);
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp17_ = _tmp20_;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (g_error_matches (_inner_error_, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
#line 2310 "media-manager.c"
					goto __catch69_g_io_error_not_supported;
				}
				goto __finally69;
			}
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp21_ = _tmp17_;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp17_ = NULL;
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (install_media);
#line 174 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			install_media = (BoxesInstallerMedia*) _tmp21_;
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (_tmp17_);
#line 2325 "media-manager.c"
		}
		goto __finally69;
		__catch69_g_io_error_not_supported:
		{
			GError* e = NULL;
			GError* _tmp22_;
			const gchar* _tmp23_;
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			e = _inner_error_;
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_inner_error_ = NULL;
#line 176 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp22_ = e;
#line 176 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp23_ = _tmp22_->message;
#line 176 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_debug ("media-manager.vala:176: Unattended installer setup failed: %s", _tmp23_);
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_error_free0 (e);
#line 2345 "media-manager.c"
		}
		__finally69:
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_propagate_error (error, _inner_error_);
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (install_media);
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (filter);
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_object_unref0 (install_scripts);
#line 173 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return NULL;
#line 2360 "media-manager.c"
		}
	}
#line 180 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = install_media;
#line 180 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (filter);
#line 180 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (install_scripts);
#line 180 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 2371 "media-manager.c"
}


static BoxesMediaManager* boxes_media_manager_construct (GType object_type) {
	BoxesMediaManager * self = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	GUdevClient* _tmp3_;
	GUdevClient* _tmp4_;
	BoxesOSDatabase* _tmp5_;
	BoxesOSDatabase* _tmp6_;
	BoxesOSDatabase* _tmp7_;
	GError * _inner_error_ = NULL;
#line 183 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	self = (BoxesMediaManager*) g_object_new (object_type, NULL);
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = g_strdup ("block");
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = g_new0 (gchar*, 1 + 1);
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_[0] = _tmp0_;
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = _tmp1_;
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2__length1 = 1;
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp3_ = g_udev_client_new (_tmp2_);
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp4_ = _tmp3_;
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_set_client (self, _tmp4_);
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_tmp4_);
#line 184 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
#line 185 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp5_ = boxes_os_database_new ();
#line 185 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp6_ = _tmp5_;
#line 185 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_set_os_db (self, _tmp6_);
#line 185 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_tmp6_);
#line 186 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp7_ = self->priv->_os_db;
#line 186 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_os_database_load (_tmp7_, NULL, NULL);
#line 2421 "media-manager.c"
	{
		TrackerSparqlConnection* _tmp8_ = NULL;
		TrackerSparqlConnection* _tmp9_;
		TrackerSparqlConnection* _tmp10_;
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp9_ = tracker_sparql_connection_get (NULL, &_inner_error_);
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp8_ = _tmp9_;
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2432 "media-manager.c"
			goto __catch70_g_error;
		}
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp10_ = _tmp8_;
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp8_ = NULL;
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (self->priv->connection);
#line 188 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		self->priv->connection = _tmp10_;
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_tmp8_);
#line 2445 "media-manager.c"
	}
	goto __finally70;
	__catch70_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp11_;
		const gchar* _tmp12_;
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_error_ = _inner_error_;
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_inner_error_ = NULL;
#line 190 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp11_ = _error_;
#line 190 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp12_ = _tmp11_->message;
#line 190 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_critical ("media-manager.vala:190: Error connecting to Tracker: %s", _tmp12_);
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_error_free0 (_error_);
#line 2465 "media-manager.c"
	}
	__finally70:
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_clear_error (&_inner_error_);
#line 187 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return NULL;
#line 2476 "media-manager.c"
	}
#line 183 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return self;
#line 2480 "media-manager.c"
}


static BoxesMediaManager* boxes_media_manager_new (void) {
#line 183 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return boxes_media_manager_construct (BOXES_TYPE_MEDIA_MANAGER);
#line 2487 "media-manager.c"
}


static gint boxes_media_manager_compare_media_by_label (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	const gchar* _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
#line 194 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_a != NULL, 0);
#line 194 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_b != NULL, 0);
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = g_strcmp0;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = media_a;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = _tmp1_->label;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp3_ = media_b;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp4_ = _tmp3_->label;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp5_ = _tmp0_ (_tmp2_, _tmp4_);
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _tmp5_;
#line 195 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 2519 "media-manager.c"
}


static gint boxes_media_manager_compare_media_by_release_date (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b) {
	gint result = 0;
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
#line 198 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_a != NULL, 0);
#line 198 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_b != NULL, 0);
#line 199 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = media_a;
#line 199 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = _tmp0_->os;
#line 199 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp1_ == NULL) {
#line 2537 "media-manager.c"
		BoxesInstallerMedia* _tmp2_;
		OsinfoOs* _tmp3_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp2_ = media_b;
#line 200 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp3_ = _tmp2_->os;
#line 200 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_tmp3_ == NULL) {
#line 201 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = 0;
#line 201 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2550 "media-manager.c"
		} else {
#line 203 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = -1;
#line 203 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2556 "media-manager.c"
		}
	} else {
		BoxesInstallerMedia* _tmp4_;
		OsinfoOs* _tmp5_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp4_ = media_b;
#line 204 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp5_ = _tmp4_->os;
#line 204 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_tmp5_ == NULL) {
#line 205 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = 1;
#line 205 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2571 "media-manager.c"
		} else {
			GDate* release_a = NULL;
			BoxesInstallerMedia* _tmp6_;
			OsinfoOs* _tmp7_;
			GDate* _tmp8_;
			GDate* release_b = NULL;
			BoxesInstallerMedia* _tmp9_;
			OsinfoOs* _tmp10_;
			GDate* _tmp11_;
			GDate* _tmp12_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp6_ = media_a;
#line 207 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp7_ = _tmp6_->os;
#line 207 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp8_ = osinfo_product_get_release_date ((OsinfoProduct*) _tmp7_);
#line 207 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			release_a = _tmp8_;
#line 208 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp9_ = media_b;
#line 208 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp10_ = _tmp9_->os;
#line 208 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp11_ = osinfo_product_get_release_date ((OsinfoProduct*) _tmp10_);
#line 208 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			release_b = _tmp11_;
#line 210 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp12_ = release_a;
#line 210 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (_tmp12_ == NULL) {
#line 2602 "media-manager.c"
				GDate* _tmp13_;
#line 211 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_tmp13_ = release_b;
#line 211 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_tmp13_ == NULL) {
#line 212 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					result = 0;
#line 212 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_b);
#line 212 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_a);
#line 212 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return result;
#line 2616 "media-manager.c"
				} else {
#line 214 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					result = -1;
#line 214 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_b);
#line 214 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_a);
#line 214 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return result;
#line 2626 "media-manager.c"
				}
			} else {
				GDate* _tmp14_;
#line 215 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_tmp14_ = release_b;
#line 215 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				if (_tmp14_ == NULL) {
#line 216 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					result = 1;
#line 216 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_b);
#line 216 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_a);
#line 216 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return result;
#line 2642 "media-manager.c"
				} else {
					GDate* _tmp15_;
					GDate* _tmp16_;
					GDate _tmp17_;
					gint _tmp18_;
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_tmp15_ = release_a;
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_tmp16_ = release_b;
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_tmp17_ = *_tmp16_;
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_tmp18_ = g_date_compare (_tmp15_, &_tmp17_);
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					result = -_tmp18_;
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_b);
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					_g_free0 (release_a);
#line 218 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
					return result;
#line 2664 "media-manager.c"
				}
			}
#line 204 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (release_b);
#line 204 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_g_free0 (release_a);
#line 2671 "media-manager.c"
		}
	}
}


static gint boxes_media_manager_compare_media_by_vendor (BoxesInstallerMedia* media_a, BoxesInstallerMedia* media_b) {
	gint result = 0;
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
#line 222 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_a != NULL, 0);
#line 222 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (media_b != NULL, 0);
#line 223 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = media_a;
#line 223 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = _tmp0_->os;
#line 223 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_tmp1_ == NULL) {
#line 2691 "media-manager.c"
		BoxesInstallerMedia* _tmp2_;
		OsinfoOs* _tmp3_;
#line 224 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp2_ = media_b;
#line 224 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp3_ = _tmp2_->os;
#line 224 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_tmp3_ == NULL) {
#line 225 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = 0;
#line 225 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2704 "media-manager.c"
		} else {
#line 227 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = 1;
#line 227 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2710 "media-manager.c"
		}
	} else {
		BoxesInstallerMedia* _tmp4_;
		OsinfoOs* _tmp5_;
#line 228 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp4_ = media_b;
#line 228 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp5_ = _tmp4_->os;
#line 228 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_tmp5_ == NULL) {
#line 229 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			result = -1;
#line 229 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return result;
#line 2725 "media-manager.c"
		} else {
			gint vendor_comparison = 0;
			GCompareFunc _tmp6_;
			BoxesInstallerMedia* _tmp7_;
			OsinfoOs* _tmp8_;
			const gchar* _tmp9_;
			BoxesInstallerMedia* _tmp10_;
			OsinfoOs* _tmp11_;
			const gchar* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp6_ = g_strcmp0;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp7_ = media_a;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp8_ = _tmp7_->os;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp9_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp8_);
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp10_ = media_b;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp11_ = _tmp10_->os;
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp12_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp11_);
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp13_ = _tmp6_ (_tmp9_, _tmp12_);
#line 231 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			vendor_comparison = _tmp13_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_tmp14_ = vendor_comparison;
#line 233 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			if (_tmp14_ == 0) {
#line 2759 "media-manager.c"
				BoxesInstallerMedia* _tmp15_;
				BoxesInstallerMedia* _tmp16_;
				gint _tmp17_;
#line 235 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_tmp15_ = media_a;
#line 235 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_tmp16_ = media_b;
#line 235 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_tmp17_ = boxes_media_manager_compare_media_by_release_date (_tmp15_, _tmp16_);
#line 235 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				result = _tmp17_;
#line 235 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				return result;
#line 2773 "media-manager.c"
			} else {
#line 237 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				result = vendor_comparison;
#line 237 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				return result;
#line 2779 "media-manager.c"
			}
		}
	}
}


static void boxes_media_manager_create_installer_media_from_iso_info_data_free (gpointer _data) {
	BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_;
	_data_ = _data;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->label);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->os_id);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->media_id);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->result);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_slice_free (BoxesMediaManagerCreateInstallerMediaFromIsoInfoData, _data_);
#line 2803 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_from_iso_info (BoxesMediaManager* self, const gchar* path, const gchar* label, const gchar* os_id, const gchar* media_id, gchar** lang_list, int lang_list_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_;
	BoxesMediaManager* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_slice_new0 (BoxesMediaManagerCreateInstallerMediaFromIsoInfoData);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_media_manager_create_installer_media_from_iso_info_data_free);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->self = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp1_ = path;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->path);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->path = _tmp2_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp3_ = label;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->label);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->label = _tmp4_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp5_ = os_id;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->os_id);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->os_id = _tmp6_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp7_ = media_id;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp8_ = g_strdup (_tmp7_);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->media_id);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->media_id = _tmp8_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp9_ = lang_list;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp9__length1 = lang_list_length1;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->lang_list = _tmp9_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->lang_list_length1 = _tmp9__length1;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_from_iso_info_co (_data_);
#line 2872 "media-manager.c"
}


static BoxesInstallerMedia* boxes_media_manager_create_installer_media_from_iso_info_finish (BoxesMediaManager* self, GAsyncResult* _res_, GError** error) {
	BoxesInstallerMedia* result;
	BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (NULL == _data_) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return NULL;
#line 2885 "media-manager.c"
	}
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _data_->result;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = NULL;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 2893 "media-manager.c"
}


static void boxes_media_manager_create_installer_media_from_iso_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_ = _user_data_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_source_object_ = source_object;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_res_ = _res_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_create_installer_media_from_iso_info_co (_data_);
#line 2907 "media-manager.c"
}


static gboolean boxes_media_manager_create_installer_media_from_iso_info_co (BoxesMediaManagerCreateInstallerMediaFromIsoInfoData* _data_) {
#line 241 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (_data_->_state_) {
#line 241 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 0:
#line 2916 "media-manager.c"
		goto _state_0;
#line 241 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 1:
#line 2920 "media-manager.c"
		goto _state_1;
#line 241 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case 2:
#line 2924 "media-manager.c"
		goto _state_2;
		default:
#line 241 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_assert_not_reached ();
#line 2929 "media-manager.c"
	}
	_state_0:
#line 247 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp0_ = _data_->path;
#line 247 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp1_ = g_file_test (_data_->_tmp0_, G_FILE_TEST_EXISTS);
#line 247 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (!_data_->_tmp1_) {
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp2_ = _data_->path;
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp3_ = g_strdup_printf (_ ("No such file %s"), _data_->_tmp2_);
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp4_ = _data_->_tmp3_;
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp5_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _data_->_tmp4_);
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_free0 (_data_->_tmp4_);
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_inner_error_ = _data_->_tmp6_;
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 248 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 2958 "media-manager.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp10_ = _data_->label;
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp10_ == NULL) {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp9_ = TRUE;
#line 2966 "media-manager.c"
	} else {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp11_ = _data_->os_id;
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp9_ = _data_->_tmp11_ == NULL;
#line 2972 "media-manager.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp9_) {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp8_ = TRUE;
#line 2978 "media-manager.c"
	} else {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp12_ = _data_->media_id;
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp8_ = _data_->_tmp12_ == NULL;
#line 2984 "media-manager.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp8_) {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp7_ = TRUE;
#line 2990 "media-manager.c"
	} else {
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp13_ = _data_->lang_list;
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp13__length1 = _data_->lang_list_length1;
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp7_ = _data_->_tmp13_ == NULL;
#line 2998 "media-manager.c"
	}
#line 250 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_tmp7_) {
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp15_ = _data_->path;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_state_ = 1;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_media_manager_create_installer_media_for_path (_data_->self, _data_->_tmp15_, NULL, boxes_media_manager_create_installer_media_from_iso_info_ready, _data_);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 3010 "media-manager.c"
		_state_1:
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp16_ = boxes_media_manager_create_installer_media_for_path_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp14_ = _data_->_tmp16_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_object_unref (_data_->_async_result);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			return FALSE;
#line 3024 "media-manager.c"
		}
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp17_ = _data_->_tmp14_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_tmp14_ = NULL;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->result = _data_->_tmp17_;
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->_tmp14_);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		if (_data_->_state_ != 0) {
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 3042 "media-manager.c"
			}
		}
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 251 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 3049 "media-manager.c"
	}
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp18_ = _data_->self->priv->_os_db;
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp19_ = _data_->os_id;
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_state_ = 2;
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_os_database_get_os_by_id (_data_->_tmp18_, _data_->_tmp19_, boxes_media_manager_create_installer_media_from_iso_info_ready, _data_);
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return FALSE;
#line 3061 "media-manager.c"
	_state_2:
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp20_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->os = _data_->_tmp20_;
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 253 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 3075 "media-manager.c"
	}
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp21_ = _data_->self->priv->_os_db;
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp22_ = _data_->os;
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp23_ = _data_->media_id;
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp24_ = boxes_os_database_get_media_by_id (_data_->_tmp21_, _data_->_tmp22_, _data_->_tmp23_, &_data_->_inner_error_);
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->os_media = _data_->_tmp24_;
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os);
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 254 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 3097 "media-manager.c"
	}
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp25_ = _data_->lang_list;
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp25__length1 = _data_->lang_list_length1;
#line 3103 "media-manager.c"
	{
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->lang_collection_length1 = 0;
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->_lang_collection_size_ = 0;
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->lang_collection = _data_->_tmp25_;
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_data_->lang_collection_length1 = _data_->_tmp25__length1;
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		for (_data_->lang_it = 0; _data_->lang_it < _data_->_tmp25__length1; _data_->lang_it = _data_->lang_it + 1) {
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->_tmp26_ = g_strdup (_data_->lang_collection[_data_->lang_it]);
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			_data_->lang = _data_->_tmp26_;
#line 3119 "media-manager.c"
			{
#line 256 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp27_ = _data_->os_media;
#line 256 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_data_->_tmp28_ = _data_->lang;
#line 256 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				osinfo_entity_add_param ((OsinfoEntity*) _data_->_tmp27_, OSINFO_MEDIA_PROP_LANG, _data_->_tmp28_);
#line 255 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
				_g_free0 (_data_->lang);
#line 3129 "media-manager.c"
			}
		}
	}
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp29_ = _data_->self->priv->_os_db;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp30_ = _data_->os;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp31_ = _data_->os_media;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_get (_data_->_tmp31_, "architecture", &_data_->_tmp32_, NULL);
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp33_ = _data_->_tmp32_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp34_ = _data_->_tmp33_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp35_ = boxes_os_database_get_resources_for_os (_data_->_tmp29_, _data_->_tmp30_, _data_->_tmp34_);
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp36_ = _data_->_tmp35_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_free0 (_data_->_tmp34_);
#line 257 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->resources = _data_->_tmp36_;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp37_ = _data_->path;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp38_ = _data_->label;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp39_ = _data_->os;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp40_ = _data_->os_media;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp41_ = _data_->resources;
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp42_ = boxes_installer_media_new_from_iso_info (_data_->_tmp37_, _data_->_tmp38_, _data_->_tmp39_, _data_->_tmp40_, _data_->_tmp41_);
#line 258 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->media = _data_->_tmp42_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp44_ = _data_->media;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp45_ = boxes_media_manager_create_installer_media_from_media (_data_->self, _data_->_tmp44_, &_data_->_inner_error_);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp43_ = _data_->_tmp45_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->media);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->resources);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os_media);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (_data_->os);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_unref (_data_->_async_result);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		return FALSE;
#line 3189 "media-manager.c"
	}
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp46_ = _data_->_tmp43_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->_tmp43_ = NULL;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_data_->result = _data_->_tmp46_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->_tmp43_);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->media);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->resources);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->os_media);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (_data_->os);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (_data_->_state_ != 0) {
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 3215 "media-manager.c"
		}
	}
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_unref (_data_->_async_result);
#line 260 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return FALSE;
#line 3222 "media-manager.c"
}


BoxesOSDatabase* boxes_media_manager_get_os_db (BoxesMediaManager* self) {
	BoxesOSDatabase* result;
	BoxesOSDatabase* _tmp0_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = self->priv->_os_db;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _tmp0_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 3237 "media-manager.c"
}


static void boxes_media_manager_set_os_db (BoxesMediaManager* self, BoxesOSDatabase* value) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_if_fail (self != NULL);
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (boxes_media_manager_get_os_db (self) != value) {
#line 3246 "media-manager.c"
		BoxesOSDatabase* _tmp0_;
		BoxesOSDatabase* _tmp1_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp0_ = value;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (self->priv->_os_db);
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		self->priv->_os_db = _tmp1_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_media_manager_properties[BOXES_MEDIA_MANAGER_OS_DB]);
#line 3259 "media-manager.c"
	}
}


GUdevClient* boxes_media_manager_get_client (BoxesMediaManager* self) {
	GUdevClient* result;
	GUdevClient* _tmp0_;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_tmp0_ = self->priv->_client;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	result = _tmp0_;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	return result;
#line 3275 "media-manager.c"
}


static void boxes_media_manager_set_client (BoxesMediaManager* self, GUdevClient* value) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_return_if_fail (self != NULL);
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	if (boxes_media_manager_get_client (self) != value) {
#line 3284 "media-manager.c"
		GUdevClient* _tmp0_;
		GUdevClient* _tmp1_;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp0_ = value;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		_g_object_unref0 (self->priv->_client);
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		self->priv->_client = _tmp1_;
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_media_manager_properties[BOXES_MEDIA_MANAGER_CLIENT]);
#line 3297 "media-manager.c"
	}
}


static void boxes_media_manager_class_init (BoxesMediaManagerClass * klass) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	boxes_media_manager_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_type_class_add_private (klass, sizeof (BoxesMediaManagerPrivate));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_media_manager_get_property;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_media_manager_set_property;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_media_manager_finalize;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_MEDIA_MANAGER_OS_DB, boxes_media_manager_properties[BOXES_MEDIA_MANAGER_OS_DB] = g_param_spec_object ("os-db", "os-db", "os-db", BOXES_TYPE_OS_DATABASE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_MEDIA_MANAGER_CLIENT, boxes_media_manager_properties[BOXES_MEDIA_MANAGER_CLIENT] = g_param_spec_object ("client", "client", "client", g_udev_client_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 3317 "media-manager.c"
}


static void boxes_media_manager_instance_init (BoxesMediaManager * self) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	self->priv = BOXES_MEDIA_MANAGER_GET_PRIVATE (self);
#line 3324 "media-manager.c"
}


static void boxes_media_manager_finalize (GObject * obj) {
	BoxesMediaManager * self;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager);
#line 10 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (self->priv->_os_db);
#line 11 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (self->priv->_client);
#line 15 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	_g_object_unref0 (self->priv->connection);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	G_OBJECT_CLASS (boxes_media_manager_parent_class)->finalize (obj);
#line 3340 "media-manager.c"
}


GType boxes_media_manager_get_type (void) {
	static volatile gsize boxes_media_manager_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_media_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesMediaManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_media_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesMediaManager), 0, (GInstanceInitFunc) boxes_media_manager_instance_init, NULL };
		GType boxes_media_manager_type_id;
		boxes_media_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesMediaManager", &g_define_type_info, 0);
		g_once_init_leave (&boxes_media_manager_type_id__volatile, boxes_media_manager_type_id);
	}
	return boxes_media_manager_type_id__volatile;
}


static void _vala_boxes_media_manager_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesMediaManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (property_id) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case BOXES_MEDIA_MANAGER_OS_DB:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_value_set_object (value, boxes_media_manager_get_os_db (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case BOXES_MEDIA_MANAGER_CLIENT:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		g_value_set_object (value, boxes_media_manager_get_client (self));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 3373 "media-manager.c"
		default:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 3379 "media-manager.c"
	}
}


static void _vala_boxes_media_manager_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesMediaManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
	switch (property_id) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case BOXES_MEDIA_MANAGER_OS_DB:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_media_manager_set_os_db (self, g_value_get_object (value));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		case BOXES_MEDIA_MANAGER_CLIENT:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		boxes_media_manager_set_client (self, g_value_get_object (value));
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 3401 "media-manager.c"
		default:
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 7 "/home/fborges/checkout/gnome-boxes/src/media-manager.vala"
		break;
#line 3407 "media-manager.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 3415 "media-manager.c"
		int i;
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
				destroy_func (((gpointer*) array)[i]);
#line 3423 "media-manager.c"
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	g_free (array);
#line 3435 "media-manager.c"
}



