/* libvirt-media.c generated by valac 0.36.1.38-6532, the Vala compiler
 * generated from libvirt-media.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <libcommon.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.h>


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

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

#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;

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

typedef struct _BoxesInstalledMedia BoxesInstalledMedia;
typedef struct _BoxesInstalledMediaClass BoxesInstalledMediaClass;
typedef struct _BoxesInstalledMediaPrivate BoxesInstalledMediaPrivate;

#define 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;
typedef struct _BoxesLibvirtMediaPrivate BoxesLibvirtMediaPrivate;
enum  {
	BOXES_LIBVIRT_MEDIA_DUMMY_PROPERTY,
	BOXES_LIBVIRT_MEDIA_ARCHITECTURE,
	BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG,
	BOXES_LIBVIRT_MEDIA_LAST_PROPERTY
};
static GParamSpec* boxes_libvirt_media_properties[BOXES_LIBVIRT_MEDIA_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

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

typedef struct _BoxesVMImporter BoxesVMImporter;
typedef struct _BoxesVMImporterClass BoxesVMImporterClass;

#define BOXES_TYPE_LIBVIRT_VM_IMPORTER (boxes_libvirt_vm_importer_get_type ())
#define BOXES_LIBVIRT_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_VM_IMPORTER, BoxesLibvirtVMImporter))
#define BOXES_LIBVIRT_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_VM_IMPORTER, BoxesLibvirtVMImporterClass))
#define BOXES_IS_LIBVIRT_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_VM_IMPORTER))
#define BOXES_IS_LIBVIRT_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_VM_IMPORTER))
#define BOXES_LIBVIRT_VM_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_VM_IMPORTER, BoxesLibvirtVMImporterClass))

typedef struct _BoxesLibvirtVMImporter BoxesLibvirtVMImporter;
typedef struct _BoxesLibvirtVMImporterClass BoxesLibvirtVMImporterClass;

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

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

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

struct _BoxesInstalledMediaClass {
	BoxesInstallerMediaClass parent_class;
};

struct _BoxesLibvirtMedia {
	BoxesInstalledMedia parent_instance;
	BoxesLibvirtMediaPrivate * priv;
};

struct _BoxesLibvirtMediaClass {
	BoxesInstalledMediaClass parent_class;
};

struct _BoxesLibvirtMediaPrivate {
	GVirConfigDomain* _domain_config;
};


static gpointer boxes_libvirt_media_parent_class = NULL;

GType boxes_installer_media_get_type (void) G_GNUC_CONST;
gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
GType boxes_installed_media_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_media_get_type (void) G_GNUC_CONST;
#define BOXES_LIBVIRT_MEDIA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMediaPrivate))
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);
BoxesInstalledMedia* boxes_installed_media_new (const gchar* path, gboolean known_qcow2, GError** error);
BoxesInstalledMedia* boxes_installed_media_construct (GType object_type, const gchar* path, gboolean known_qcow2, GError** error);
static void boxes_libvirt_media_set_domain_config (BoxesLibvirtMedia* self, GVirConfigDomain* value);
OsinfoResources* boxes_os_database_get_default_resources (void);
static BoxesVMCreator* boxes_libvirt_media_real_get_vm_creator (BoxesInstallerMedia* base);
BoxesLibvirtVMImporter* boxes_libvirt_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesLibvirtVMImporter* boxes_libvirt_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
GType boxes_vm_importer_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_vm_importer_get_type (void) G_GNUC_CONST;
GVirConfigDomain* boxes_libvirt_media_get_domain_config (BoxesLibvirtMedia* self);
static void boxes_libvirt_media_finalize (GObject * obj);
gchar* boxes_installer_media_get_architecture (BoxesInstallerMedia* self);
static void _vala_boxes_libvirt_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_libvirt_media_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


BoxesLibvirtMedia* boxes_libvirt_media_construct (GType object_type, const gchar* path, GVirConfigDomain* domain_config, gboolean known_qcow2, GError** error) {
	BoxesLibvirtMedia * self = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	GVirConfigDomain* _tmp2_;
	const gchar* _tmp3_ = NULL;
	GVirConfigDomain* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp10_;
	OsinfoResources* _tmp11_;
	GError * _inner_error_ = NULL;
#line 14 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 14 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_return_val_if_fail (domain_config != NULL, NULL);
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp0_ = path;
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp1_ = known_qcow2;
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	self = (BoxesLibvirtMedia*) boxes_installed_media_construct (object_type, _tmp0_, _tmp1_, &_inner_error_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		g_propagate_error (error, _inner_error_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_g_object_unref0 (self);
#line 15 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		return NULL;
#line 209 "libvirt-media.c"
	}
#line 17 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp2_ = domain_config;
#line 17 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	boxes_libvirt_media_set_domain_config (self, _tmp2_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp4_ = domain_config;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp5_ = gvir_config_domain_get_title (_tmp4_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp6_ = _tmp5_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp3_ = _tmp6_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	if (_tmp3_ == NULL) {
#line 225 "libvirt-media.c"
		GVirConfigDomain* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp7_ = domain_config;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp8_ = gvir_config_domain_get_name (_tmp7_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp9_ = _tmp8_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp3_ = _tmp9_;
#line 237 "libvirt-media.c"
	}
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp10_ = g_strdup (_tmp3_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_g_free0 (((BoxesInstallerMedia*) self)->label);
#line 18 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	((BoxesInstallerMedia*) self)->label = _tmp10_;
#line 22 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp11_ = boxes_os_database_get_default_resources ();
#line 22 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_g_object_unref0 (((BoxesInstallerMedia*) self)->resources);
#line 22 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	((BoxesInstallerMedia*) self)->resources = _tmp11_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	return self;
#line 253 "libvirt-media.c"
}


BoxesLibvirtMedia* boxes_libvirt_media_new (const gchar* path, GVirConfigDomain* domain_config, gboolean known_qcow2, GError** error) {
#line 14 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	return boxes_libvirt_media_construct (BOXES_TYPE_LIBVIRT_MEDIA, path, domain_config, known_qcow2, error);
#line 260 "libvirt-media.c"
}


static BoxesVMCreator* boxes_libvirt_media_real_get_vm_creator (BoxesInstallerMedia* base) {
	BoxesLibvirtMedia * self;
	BoxesVMCreator* result = NULL;
	BoxesLibvirtVMImporter* _tmp0_;
#line 25 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	self = (BoxesLibvirtMedia*) base;
#line 26 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp0_ = boxes_libvirt_vm_importer_new ((BoxesInstalledMedia*) self);
#line 26 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	result = (BoxesVMCreator*) _tmp0_;
#line 26 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	return result;
#line 276 "libvirt-media.c"
}


static gchar* boxes_libvirt_media_real_get_architecture (BoxesInstallerMedia* base) {
	gchar* result;
	BoxesLibvirtMedia* self;
	GVirConfigDomain* _tmp0_;
	GVirConfigDomainOs* _tmp1_;
	GVirConfigDomainOs* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	self = (BoxesLibvirtMedia*) base;
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp0_ = self->priv->_domain_config;
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp1_ = gvir_config_domain_get_os (_tmp0_);
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp2_ = _tmp1_;
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp3_ = gvir_config_domain_os_get_arch (_tmp2_);
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp5_ = _tmp4_;
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_g_object_unref0 (_tmp2_);
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	result = _tmp5_;
#line 8 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	return result;
#line 309 "libvirt-media.c"
}


GVirConfigDomain* boxes_libvirt_media_get_domain_config (BoxesLibvirtMedia* self) {
	GVirConfigDomain* result;
	GVirConfigDomain* _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_tmp0_ = self->priv->_domain_config;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	result = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	return result;
#line 324 "libvirt-media.c"
}


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


static void boxes_libvirt_media_set_domain_config (BoxesLibvirtMedia* self, GVirConfigDomain* value) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_return_if_fail (self != NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	if (boxes_libvirt_media_get_domain_config (self) != value) {
#line 340 "libvirt-media.c"
		GVirConfigDomain* _tmp0_;
		GVirConfigDomain* _tmp1_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp0_ = value;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		_g_object_unref0 (self->priv->_domain_config);
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		self->priv->_domain_config = _tmp1_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_libvirt_media_properties[BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG]);
#line 353 "libvirt-media.c"
	}
}


static void boxes_libvirt_media_class_init (BoxesLibvirtMediaClass * klass) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	boxes_libvirt_media_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_type_class_add_private (klass, sizeof (BoxesLibvirtMediaPrivate));
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_creator = (BoxesVMCreator* (*) (BoxesInstallerMedia *)) boxes_libvirt_media_real_get_vm_creator;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_architecture = boxes_libvirt_media_real_get_architecture;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_libvirt_media_get_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_libvirt_media_set_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_libvirt_media_finalize;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_LIBVIRT_MEDIA_ARCHITECTURE, boxes_libvirt_media_properties[BOXES_LIBVIRT_MEDIA_ARCHITECTURE] = g_param_spec_string ("architecture", "architecture", "architecture", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG, boxes_libvirt_media_properties[BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG] = g_param_spec_object ("domain-config", "domain-config", "domain-config", gvir_config_domain_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 377 "libvirt-media.c"
}


static void boxes_libvirt_media_instance_init (BoxesLibvirtMedia * self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	self->priv = BOXES_LIBVIRT_MEDIA_GET_PRIVATE (self);
#line 384 "libvirt-media.c"
}


static void boxes_libvirt_media_finalize (GObject * obj) {
	BoxesLibvirtMedia * self;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMedia);
#line 12 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	_g_object_unref0 (self->priv->_domain_config);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	G_OBJECT_CLASS (boxes_libvirt_media_parent_class)->finalize (obj);
#line 396 "libvirt-media.c"
}


GType boxes_libvirt_media_get_type (void) {
	static volatile gsize boxes_libvirt_media_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_libvirt_media_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesLibvirtMediaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_libvirt_media_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesLibvirtMedia), 0, (GInstanceInitFunc) boxes_libvirt_media_instance_init, NULL };
		GType boxes_libvirt_media_type_id;
		boxes_libvirt_media_type_id = g_type_register_static (BOXES_TYPE_INSTALLED_MEDIA, "BoxesLibvirtMedia", &g_define_type_info, 0);
		g_once_init_leave (&boxes_libvirt_media_type_id__volatile, boxes_libvirt_media_type_id);
	}
	return boxes_libvirt_media_type_id__volatile;
}


static void _vala_boxes_libvirt_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesLibvirtMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMedia);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		case BOXES_LIBVIRT_MEDIA_ARCHITECTURE:
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		g_value_take_string (value, boxes_installer_media_get_architecture ((BoxesInstallerMedia*) self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		break;
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		case BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG:
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		g_value_set_object (value, boxes_libvirt_media_get_domain_config (self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		break;
#line 429 "libvirt-media.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		break;
#line 435 "libvirt-media.c"
	}
}


static void _vala_boxes_libvirt_media_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesLibvirtMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMedia);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		case BOXES_LIBVIRT_MEDIA_DOMAIN_CONFIG:
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		boxes_libvirt_media_set_domain_config (self, g_value_get_object (value));
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		break;
#line 451 "libvirt-media.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/libvirt-media.vala"
		break;
#line 457 "libvirt-media.c"
	}
}



