/* libvirt-system-media.c generated by valac 0.26.0.50-d9a75, the Vala compiler
 * generated from libvirt-system-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_SYSTEM_MEDIA (boxes_libvirt_system_media_get_type ())
#define BOXES_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))

typedef struct _BoxesLibvirtSystemMedia BoxesLibvirtSystemMedia;
typedef struct _BoxesLibvirtSystemMediaClass BoxesLibvirtSystemMediaClass;
typedef struct _BoxesLibvirtSystemMediaPrivate BoxesLibvirtSystemMediaPrivate;
#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_SYSTEM_VM_IMPORTER (boxes_libvirt_system_vm_importer_get_type ())
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporter))
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporterClass))
#define BOXES_IS_LIBVIRT_SYSTEM_VM_IMPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER))
#define BOXES_IS_LIBVIRT_SYSTEM_VM_IMPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER))
#define BOXES_LIBVIRT_SYSTEM_VM_IMPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_VM_IMPORTER, BoxesLibvirtSystemVMImporterClass))

typedef struct _BoxesLibvirtSystemVMImporter BoxesLibvirtSystemVMImporter;
typedef struct _BoxesLibvirtSystemVMImporterClass BoxesLibvirtSystemVMImporterClass;

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 _BoxesLibvirtSystemMedia {
	BoxesInstalledMedia parent_instance;
	BoxesLibvirtSystemMediaPrivate * priv;
};

struct _BoxesLibvirtSystemMediaClass {
	BoxesInstalledMediaClass parent_class;
};

struct _BoxesLibvirtSystemMediaPrivate {
	GVirConfigDomain* _domain_config;
};


static gpointer boxes_libvirt_system_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_system_media_get_type (void) G_GNUC_CONST;
#define BOXES_LIBVIRT_SYSTEM_MEDIA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaPrivate))
enum  {
	BOXES_LIBVIRT_SYSTEM_MEDIA_DUMMY_PROPERTY,
	BOXES_LIBVIRT_SYSTEM_MEDIA_ARCHITECTURE,
	BOXES_LIBVIRT_SYSTEM_MEDIA_DOMAIN_CONFIG
};
BoxesLibvirtSystemMedia* boxes_libvirt_system_media_new (const gchar* path, GVirConfigDomain* domain_config, GError** error);
BoxesLibvirtSystemMedia* boxes_libvirt_system_media_construct (GType object_type, const gchar* path, GVirConfigDomain* domain_config, GError** error);
BoxesInstalledMedia* boxes_installed_media_new (const gchar* path, GError** error);
BoxesInstalledMedia* boxes_installed_media_construct (GType object_type, const gchar* path, GError** error);
static void boxes_libvirt_system_media_set_domain_config (BoxesLibvirtSystemMedia* self, GVirConfigDomain* value);
OsinfoResources* boxes_os_database_get_default_resources (void);
static BoxesVMCreator* boxes_libvirt_system_media_real_get_vm_creator (BoxesInstallerMedia* base);
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_new (BoxesInstalledMedia* source_media);
BoxesLibvirtSystemVMImporter* boxes_libvirt_system_vm_importer_construct (GType object_type, BoxesInstalledMedia* source_media);
GType boxes_vm_importer_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_system_vm_importer_get_type (void) G_GNUC_CONST;
GVirConfigDomain* boxes_libvirt_system_media_get_domain_config (BoxesLibvirtSystemMedia* self);
static void boxes_libvirt_system_media_finalize (GObject* obj);
gchar* boxes_installer_media_get_architecture (BoxesInstallerMedia* self);
static void _vala_boxes_libvirt_system_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_libvirt_system_media_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


BoxesLibvirtSystemMedia* boxes_libvirt_system_media_construct (GType object_type, const gchar* path, GVirConfigDomain* domain_config, GError** error) {
	BoxesLibvirtSystemMedia * self = NULL;
	const gchar* _tmp0_ = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GVirConfigDomain* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp9_ = NULL;
	OsinfoResources* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_return_val_if_fail (domain_config != NULL, NULL);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp0_ = path;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	self = (BoxesLibvirtSystemMedia*) boxes_installed_media_construct (object_type, _tmp0_, &_inner_error_);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		g_propagate_error (error, _inner_error_);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		_g_object_unref0 (self);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		return NULL;
#line 204 "libvirt-system-media.c"
	}
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp1_ = domain_config;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	boxes_libvirt_system_media_set_domain_config (self, _tmp1_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp3_ = domain_config;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp4_ = gvir_config_domain_get_title (_tmp3_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp5_ = _tmp4_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp2_ = _tmp5_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	if (_tmp2_ == NULL) {
#line 220 "libvirt-system-media.c"
		GVirConfigDomain* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		_tmp6_ = domain_config;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		_tmp7_ = gvir_config_domain_get_name (_tmp6_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		_tmp8_ = _tmp7_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		_tmp2_ = _tmp8_;
#line 232 "libvirt-system-media.c"
	}
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp9_ = g_strdup (_tmp2_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_g_free0 (((BoxesInstallerMedia*) self)->label);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	((BoxesInstallerMedia*) self)->label = _tmp9_;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp10_ = boxes_os_database_get_default_resources ();
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_g_object_unref0 (((BoxesInstallerMedia*) self)->resources);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	((BoxesInstallerMedia*) self)->resources = _tmp10_;
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	return self;
#line 248 "libvirt-system-media.c"
}


BoxesLibvirtSystemMedia* boxes_libvirt_system_media_new (const gchar* path, GVirConfigDomain* domain_config, GError** error) {
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	return boxes_libvirt_system_media_construct (BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, path, domain_config, error);
#line 255 "libvirt-system-media.c"
}


static BoxesVMCreator* boxes_libvirt_system_media_real_get_vm_creator (BoxesInstallerMedia* base) {
	BoxesLibvirtSystemMedia * self;
	BoxesVMCreator* result = NULL;
	BoxesLibvirtSystemVMImporter* _tmp0_ = NULL;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	self = (BoxesLibvirtSystemMedia*) base;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp0_ = boxes_libvirt_system_vm_importer_new ((BoxesInstalledMedia*) self);
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	result = (BoxesVMCreator*) _tmp0_;
#line 26 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	return result;
#line 271 "libvirt-system-media.c"
}


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


GVirConfigDomain* boxes_libvirt_system_media_get_domain_config (BoxesLibvirtSystemMedia* self) {
	GVirConfigDomain* result;
	GVirConfigDomain* _tmp0_ = NULL;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp0_ = self->priv->_domain_config;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	result = _tmp0_;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	return result;
#line 319 "libvirt-system-media.c"
}


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


static void boxes_libvirt_system_media_set_domain_config (BoxesLibvirtSystemMedia* self, GVirConfigDomain* value) {
	GVirConfigDomain* _tmp0_ = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_return_if_fail (self != NULL);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp0_ = value;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_g_object_unref0 (self->priv->_domain_config);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	self->priv->_domain_config = _tmp1_;
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_object_notify ((GObject *) self, "domain-config");
#line 345 "libvirt-system-media.c"
}


static void boxes_libvirt_system_media_class_init (BoxesLibvirtSystemMediaClass * klass) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	boxes_libvirt_system_media_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_type_class_add_private (klass, sizeof (BoxesLibvirtSystemMediaPrivate));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	((BoxesInstallerMediaClass *) klass)->get_vm_creator = boxes_libvirt_system_media_real_get_vm_creator;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	BOXES_INSTALLER_MEDIA_CLASS (klass)->get_architecture = boxes_libvirt_system_media_real_get_architecture;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_libvirt_system_media_get_property;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_libvirt_system_media_set_property;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_libvirt_system_media_finalize;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_LIBVIRT_SYSTEM_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/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_LIBVIRT_SYSTEM_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 368 "libvirt-system-media.c"
}


static void boxes_libvirt_system_media_instance_init (BoxesLibvirtSystemMedia * self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	self->priv = BOXES_LIBVIRT_SYSTEM_MEDIA_GET_PRIVATE (self);
#line 375 "libvirt-system-media.c"
}


static void boxes_libvirt_system_media_finalize (GObject* obj) {
	BoxesLibvirtSystemMedia * self;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	_g_object_unref0 (self->priv->_domain_config);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	G_OBJECT_CLASS (boxes_libvirt_system_media_parent_class)->finalize (obj);
#line 387 "libvirt-system-media.c"
}


GType boxes_libvirt_system_media_get_type (void) {
	static volatile gsize boxes_libvirt_system_media_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_libvirt_system_media_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesLibvirtSystemMediaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_libvirt_system_media_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesLibvirtSystemMedia), 0, (GInstanceInitFunc) boxes_libvirt_system_media_instance_init, NULL };
		GType boxes_libvirt_system_media_type_id;
		boxes_libvirt_system_media_type_id = g_type_register_static (BOXES_TYPE_INSTALLED_MEDIA, "BoxesLibvirtSystemMedia", &g_define_type_info, 0);
		g_once_init_leave (&boxes_libvirt_system_media_type_id__volatile, boxes_libvirt_system_media_type_id);
	}
	return boxes_libvirt_system_media_type_id__volatile;
}


static void _vala_boxes_libvirt_system_media_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesLibvirtSystemMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	switch (property_id) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		case BOXES_LIBVIRT_SYSTEM_MEDIA_ARCHITECTURE:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		g_value_take_string (value, boxes_installer_media_get_architecture ((BoxesInstallerMedia*) self));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		break;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		case BOXES_LIBVIRT_SYSTEM_MEDIA_DOMAIN_CONFIG:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		g_value_set_object (value, boxes_libvirt_system_media_get_domain_config (self));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		break;
#line 420 "libvirt-system-media.c"
		default:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		break;
#line 426 "libvirt-system-media.c"
	}
}


static void _vala_boxes_libvirt_system_media_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesLibvirtSystemMedia * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
	switch (property_id) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		case BOXES_LIBVIRT_SYSTEM_MEDIA_DOMAIN_CONFIG:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		boxes_libvirt_system_media_set_domain_config (self, g_value_get_object (value));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		break;
#line 442 "libvirt-system-media.c"
		default:
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-system-media.vala"
		break;
#line 448 "libvirt-system-media.c"
	}
}



