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

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

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>


#define BOXES_TYPE_ICONFIG (boxes_iconfig_get_type ())
#define BOXES_ICONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ICONFIG, BoxesIConfig))
#define BOXES_IS_ICONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ICONFIG))
#define BOXES_ICONFIG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_ICONFIG, BoxesIConfigIface))

typedef struct _BoxesIConfig BoxesIConfig;
typedef struct _BoxesIConfigIface BoxesIConfigIface;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define BOXES_TYPE_COLLECTION_SOURCE (boxes_collection_source_get_type ())
#define BOXES_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource))
#define BOXES_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))
#define BOXES_IS_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_IS_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_COLLECTION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))

typedef struct _BoxesCollectionSource BoxesCollectionSource;
typedef struct _BoxesCollectionSourceClass BoxesCollectionSourceClass;
typedef struct _BoxesCollectionSourcePrivate BoxesCollectionSourcePrivate;
enum  {
	BOXES_COLLECTION_SOURCE_DUMMY_PROPERTY,
	BOXES_COLLECTION_SOURCE_NAME,
	BOXES_COLLECTION_SOURCE_SOURCE_TYPE,
	BOXES_COLLECTION_SOURCE_URI,
	BOXES_COLLECTION_SOURCE_ENABLED,
	BOXES_COLLECTION_SOURCE_LAST_PROPERTY
};
static GParamSpec* boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_LAST_PROPERTY];
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_BOX_CONFIG (boxes_box_config_get_type ())
#define BOXES_BOX_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_BOX_CONFIG, BoxesBoxConfig))
#define BOXES_BOX_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_BOX_CONFIG, BoxesBoxConfigClass))
#define BOXES_IS_BOX_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_BOX_CONFIG))
#define BOXES_IS_BOX_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_BOX_CONFIG))
#define BOXES_BOX_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_BOX_CONFIG, BoxesBoxConfigClass))

typedef struct _BoxesBoxConfig BoxesBoxConfig;
typedef struct _BoxesBoxConfigClass BoxesBoxConfigClass;

struct _BoxesIConfigIface {
	GTypeInterface parent_iface;
	GKeyFile* (*get_keyfile) (BoxesIConfig* self);
	const gchar* (*get_filename) (BoxesIConfig* self);
	void (*set_filename) (BoxesIConfig* self, const gchar* value);
	gboolean (*get_has_file) (BoxesIConfig* self);
	void (*set_has_file) (BoxesIConfig* self, gboolean value);
};

typedef enum  {
	BOXES_ERROR_INVALID,
	BOXES_ERROR_RESTORE_FAILED,
	BOXES_ERROR_START_FAILED,
	BOXES_ERROR_COMMAND_FAILED
} BoxesError;
#define BOXES_ERROR boxes_error_quark ()
struct _BoxesCollectionSource {
	GObject parent_instance;
	BoxesCollectionSourcePrivate * priv;
};

struct _BoxesCollectionSourceClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionSourcePrivate {
	GKeyFile* _keyfile;
	gboolean _has_file;
	gchar* _filename;
};


static gpointer boxes_collection_source_parent_class = NULL;
static BoxesIConfigIface * boxes_collection_source_boxes_iconfig_parent_iface = NULL;

GType boxes_iconfig_get_type (void) G_GNUC_CONST;
void boxes_iconfig_save (BoxesIConfig* self);
gboolean boxes_keyfile_save (GKeyFile* key_file, const gchar* file_name, gboolean overwrite);
GKeyFile* boxes_iconfig_get_keyfile (BoxesIConfig* self);
gchar* boxes_get_user_pkgconfig_source (const gchar* file_name);
const gchar* boxes_iconfig_get_filename (BoxesIConfig* self);
gboolean boxes_iconfig_get_has_file (BoxesIConfig* self);
void boxes_iconfig_set_has_file (BoxesIConfig* self, gboolean value);
gboolean boxes_iconfig_get_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean default_value);
void boxes_iconfig_set_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean value);
void boxes_iconfig_load (BoxesIConfig* self, GError** error);
GQuark boxes_error_quark (void);
gchar* boxes_iconfig_get_string (BoxesIConfig* self, const gchar* group, const gchar* key);
gchar** boxes_iconfig_get_string_list (BoxesIConfig* self, const gchar* group, const gchar* key, int* result_length1);
gchar** boxes_iconfig_get_groups (BoxesIConfig* self, const gchar* with_prefix, int* result_length1);
static void _vala_array_add3 (gchar** * array, int* length, int* size, gchar* value);
void boxes_iconfig_set_filename (BoxesIConfig* self, const gchar* value);
GType boxes_collection_source_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourcePrivate))
BoxesCollectionSource* boxes_collection_source_new (const gchar* name, const gchar* source_type, const gchar* uri);
BoxesCollectionSource* boxes_collection_source_construct (GType object_type, const gchar* name, const gchar* source_type, const gchar* uri);
void boxes_collection_source_set_name (BoxesCollectionSource* self, const gchar* value);
void boxes_collection_source_set_source_type (BoxesCollectionSource* self, const gchar* value);
void boxes_collection_source_set_uri (BoxesCollectionSource* self, const gchar* value);
BoxesCollectionSource* boxes_collection_source_new_with_file (const gchar* filename, GError** error);
BoxesCollectionSource* boxes_collection_source_construct_with_file (GType object_type, const gchar* filename, GError** error);
void boxes_collection_source_delete (BoxesCollectionSource* self);
GType boxes_box_config_get_type (void) G_GNUC_CONST;
void boxes_collection_source_purge_stale_box_configs (BoxesCollectionSource* self, GList* used_configs);
const gchar* boxes_box_config_get_group (BoxesBoxConfig* self);
gchar* boxes_make_filename (const gchar* name);
gchar* boxes_collection_source_get_name (BoxesCollectionSource* self);
gchar* boxes_collection_source_get_source_type (BoxesCollectionSource* self);
gchar* boxes_collection_source_get_uri (BoxesCollectionSource* self);
gboolean boxes_collection_source_get_enabled (BoxesCollectionSource* self);
void boxes_collection_source_set_enabled (BoxesCollectionSource* self, gboolean value);
static GObject * boxes_collection_source_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_collection_source_finalize (GObject * obj);
static void _vala_boxes_collection_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_collection_source_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);


void boxes_iconfig_save (BoxesIConfig* self) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = boxes_iconfig_get_filename (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = boxes_get_user_pkgconfig_source (_tmp3_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp5_ = _tmp4_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp6_ = boxes_iconfig_get_has_file (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp7_ = _tmp6_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_keyfile_save (_tmp1_, _tmp5_, _tmp7_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (_tmp5_);
#line 13 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_has_file (self, TRUE);
#line 166 "collection-source.c"
}


gboolean boxes_iconfig_get_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean default_value) {
	gboolean result = FALSE;
	gboolean _tmp8_ = FALSE;
	GError * _inner_error_ = NULL;
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, FALSE);
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, FALSE);
#line 178 "collection-source.c"
	{
		gboolean _tmp0_ = FALSE;
		GKeyFile* _tmp1_;
		GKeyFile* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gboolean _tmp5_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp1_ = boxes_iconfig_get_keyfile (self);
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp2_ = _tmp1_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp3_ = group;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp4_ = key;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp5_ = g_key_file_get_boolean (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = _tmp5_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 200 "collection-source.c"
			gboolean _tmp6_ = FALSE;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 204 "collection-source.c"
				goto __catch3_g_key_file_error;
			}
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			return _tmp6_;
#line 213 "collection-source.c"
		}
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = _tmp0_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 219 "collection-source.c"
	}
	goto __finally3;
	__catch3_g_key_file_error:
	{
		GError* _error_ = NULL;
		gboolean _tmp7_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp7_ = default_value;
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = _tmp7_;
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 238 "collection-source.c"
	}
	__finally3:
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection-source.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 17 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return _tmp8_;
#line 247 "collection-source.c"
}


void boxes_iconfig_set_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (group != NULL);
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (key != NULL);
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = group;
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = key;
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = value;
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_key_file_set_boolean (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 273 "collection-source.c"
}


void boxes_iconfig_load (BoxesIConfig* self, GError** error) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	GKeyFile* _tmp3_;
	GKeyFile* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GError * _inner_error_ = NULL;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_has_file (self);
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (!_tmp1_) {
#line 293 "collection-source.c"
		GError* _tmp2_;
#line 30 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp2_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, "has_file is false");
#line 30 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_inner_error_ = _tmp2_;
#line 30 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 30 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return;
#line 303 "collection-source.c"
	}
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = boxes_iconfig_get_keyfile (self);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = _tmp3_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp5_ = boxes_iconfig_get_filename (self);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp6_ = _tmp5_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp7_ = boxes_get_user_pkgconfig_source (_tmp6_);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp8_ = _tmp7_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_key_file_load_from_file (_tmp4_, _tmp8_, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &_inner_error_);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (_tmp8_);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return;
#line 327 "collection-source.c"
	}
}


gchar* boxes_iconfig_get_string (BoxesIConfig* self, const gchar* group, const gchar* key) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 36 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, NULL);
#line 36 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 339 "collection-source.c"
	{
		gchar* _tmp0_ = NULL;
		GKeyFile* _tmp1_;
		GKeyFile* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp1_ = boxes_iconfig_get_keyfile (self);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp2_ = _tmp1_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp3_ = group;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp4_ = key;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp5_ = g_key_file_get_string (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = _tmp5_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 364 "collection-source.c"
				goto __catch4_g_key_file_error;
			}
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			return NULL;
#line 373 "collection-source.c"
		}
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp6_ = _tmp0_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = NULL;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = _tmp6_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_free0 (_tmp0_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 385 "collection-source.c"
	}
	goto __finally4;
	__catch4_g_key_file_error:
	{
		GError* _error_ = NULL;
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 40 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = NULL;
#line 40 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 40 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 401 "collection-source.c"
	}
	__finally4:
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-source.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 37 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return NULL;
#line 410 "collection-source.c"
}


gchar** boxes_iconfig_get_string_list (BoxesIConfig* self, const gchar* group, const gchar* key, int* result_length1) {
	gchar** result = NULL;
	GError * _inner_error_ = NULL;
#line 44 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, NULL);
#line 44 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 421 "collection-source.c"
	{
		gchar** _tmp0_ = NULL;
		GKeyFile* _tmp1_;
		GKeyFile* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gsize _tmp5_;
		gchar** _tmp6_;
		gint _tmp0__length1;
		gint __tmp0__size_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gchar** _tmp8_;
		gint _tmp8__length1;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp1_ = boxes_iconfig_get_keyfile (self);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp2_ = _tmp1_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp3_ = group;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp4_ = key;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp6_ = g_key_file_get_string_list (_tmp2_, _tmp3_, _tmp4_, &_tmp5_, &_inner_error_);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = _tmp6_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0__length1 = _tmp5_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		__tmp0__size_ = _tmp0__length1;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 456 "collection-source.c"
				goto __catch5_g_key_file_error;
			}
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			return NULL;
#line 465 "collection-source.c"
		}
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp7_ = _tmp0_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp7__length1 = _tmp0__length1;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = NULL;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0__length1 = 0;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp8_ = _tmp7_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp8__length1 = _tmp7__length1;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		if (result_length1) {
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			*result_length1 = _tmp8__length1;
#line 483 "collection-source.c"
		}
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = _tmp8_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp0_ = (_vala_array_free (_tmp0_, _tmp0__length1, (GDestroyNotify) g_free), NULL);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 491 "collection-source.c"
	}
	goto __finally5;
	__catch5_g_key_file_error:
	{
		GError* _error_ = NULL;
		gchar** _tmp9_;
		gint _tmp9__length1;
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp9_ = NULL;
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp9__length1 = 0;
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		if (result_length1) {
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			*result_length1 = _tmp9__length1;
#line 511 "collection-source.c"
		}
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		result = _tmp9_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 48 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return result;
#line 519 "collection-source.c"
	}
	__finally5:
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection-source.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 45 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return NULL;
#line 528 "collection-source.c"
}


static void _vala_array_add3 (gchar** * array, int* length, int* size, gchar* value) {
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if ((*length) == (*size)) {
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 539 "collection-source.c"
	}
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	(*array)[(*length)++] = value;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	(*array)[*length] = NULL;
#line 545 "collection-source.c"
}


gchar** boxes_iconfig_get_groups (BoxesIConfig* self, const gchar* with_prefix, int* result_length1) {
	gchar** result = NULL;
	gchar** groups = NULL;
	gchar** _tmp0_;
	gint groups_length1;
	gint _groups_size_;
	GKeyFile* _tmp1_;
	GKeyFile* _tmp2_;
	gsize _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp12_;
	gint _tmp12__length1;
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (with_prefix != NULL, NULL);
#line 53 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 53 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	groups = _tmp0_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	groups_length1 = 0;
#line 53 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_groups_size_ = groups_length1;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = boxes_iconfig_get_keyfile (self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = _tmp1_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = g_key_file_get_groups (_tmp2_, &_tmp3_);
#line 577 "collection-source.c"
	{
		gchar** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection = _tmp4_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection_length1 = _tmp3_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		for (group_it = 0; group_it < _tmp3_; group_it = group_it + 1) {
#line 589 "collection-source.c"
			gchar* _tmp5_;
			gchar* group = NULL;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			_tmp5_ = g_strdup (group_collection[group_it]);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			group = _tmp5_;
#line 596 "collection-source.c"
			{
				const gchar* _tmp6_;
				const gchar* _tmp7_;
				gboolean _tmp8_;
				gchar** _tmp9_;
				gint _tmp9__length1;
				const gchar* _tmp10_;
				gchar* _tmp11_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp6_ = group;
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp7_ = with_prefix;
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp8_ = g_str_has_prefix (_tmp6_, _tmp7_);
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				if (!_tmp8_) {
#line 57 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					_g_free0 (group);
#line 57 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					continue;
#line 617 "collection-source.c"
				}
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp9_ = groups;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp9__length1 = groups_length1;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp10_ = group;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp11_ = g_strdup (_tmp10_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_vala_array_add3 (&groups, &groups_length1, &_groups_size_, _tmp11_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_g_free0 (group);
#line 631 "collection-source.c"
			}
		}
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection = (_vala_array_free (group_collection, group_collection_length1, (GDestroyNotify) g_free), NULL);
#line 636 "collection-source.c"
	}
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp12_ = groups;
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp12__length1 = groups_length1;
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (result_length1) {
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		*result_length1 = _tmp12__length1;
#line 646 "collection-source.c"
	}
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp12_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 652 "collection-source.c"
}


GKeyFile* boxes_iconfig_get_keyfile (BoxesIConfig* self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return BOXES_ICONFIG_GET_INTERFACE (self)->get_keyfile (self);
#line 661 "collection-source.c"
}


const gchar* boxes_iconfig_get_filename (BoxesIConfig* self) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return BOXES_ICONFIG_GET_INTERFACE (self)->get_filename (self);
#line 670 "collection-source.c"
}


void boxes_iconfig_set_filename (BoxesIConfig* self, const gchar* value) {
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	BOXES_ICONFIG_GET_INTERFACE (self)->set_filename (self, value);
#line 679 "collection-source.c"
}


gboolean boxes_iconfig_get_has_file (BoxesIConfig* self) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return BOXES_ICONFIG_GET_INTERFACE (self)->get_has_file (self);
#line 688 "collection-source.c"
}


void boxes_iconfig_set_has_file (BoxesIConfig* self, gboolean value) {
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	BOXES_ICONFIG_GET_INTERFACE (self)->set_has_file (self, value);
#line 697 "collection-source.c"
}


static void boxes_iconfig_base_init (BoxesIConfigIface * iface) {
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	static gboolean initialized = FALSE;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (!initialized) {
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		initialized = TRUE;
#line 708 "collection-source.c"
	}
}


GType boxes_iconfig_get_type (void) {
	static volatile gsize boxes_iconfig_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_iconfig_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesIConfigIface), (GBaseInitFunc) boxes_iconfig_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType boxes_iconfig_type_id;
		boxes_iconfig_type_id = g_type_register_static (G_TYPE_INTERFACE, "BoxesIConfig", &g_define_type_info, 0);
		g_once_init_leave (&boxes_iconfig_type_id__volatile, boxes_iconfig_type_id);
	}
	return boxes_iconfig_type_id__volatile;
}


BoxesCollectionSource* boxes_collection_source_construct (GType object_type, const gchar* name, const gchar* source_type, const gchar* uri) {
	BoxesCollectionSource * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (source_type != NULL, NULL);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) g_object_new (object_type, NULL);
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = name;
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_name (self, _tmp0_);
#line 112 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = source_type;
#line 112 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_source_type (self, _tmp1_);
#line 113 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = uri;
#line 113 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_uri (self, _tmp2_);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return self;
#line 752 "collection-source.c"
}


BoxesCollectionSource* boxes_collection_source_new (const gchar* name, const gchar* source_type, const gchar* uri) {
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return boxes_collection_source_construct (BOXES_TYPE_COLLECTION_SOURCE, name, source_type, uri);
#line 759 "collection-source.c"
}


BoxesCollectionSource* boxes_collection_source_construct_with_file (GType object_type, const gchar* filename, GError** error) {
	BoxesCollectionSource * self = NULL;
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
#line 116 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 116 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) g_object_new (object_type, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = filename;
#line 117 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_filename ((BoxesIConfig*) self, _tmp0_);
#line 118 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_has_file ((BoxesIConfig*) self, TRUE);
#line 119 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_load ((BoxesIConfig*) self, &_inner_error_);
#line 119 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 119 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 119 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_object_unref0 (self);
#line 119 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return NULL;
#line 787 "collection-source.c"
	}
#line 116 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return self;
#line 791 "collection-source.c"
}


BoxesCollectionSource* boxes_collection_source_new_with_file (const gchar* filename, GError** error) {
#line 116 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return boxes_collection_source_construct_with_file (BOXES_TYPE_COLLECTION_SOURCE, filename, error);
#line 798 "collection-source.c"
}


void boxes_collection_source_delete (BoxesCollectionSource* self) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
#line 122 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 123 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_has_file ((BoxesIConfig*) self);
#line 123 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 123 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (!_tmp1_) {
#line 124 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		return;
#line 819 "collection-source.c"
	}
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = boxes_iconfig_get_filename ((BoxesIConfig*) self);
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = _tmp2_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = boxes_get_user_pkgconfig_source (_tmp3_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp5_ = _tmp4_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_unlink (_tmp5_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (_tmp5_);
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_has_file ((BoxesIConfig*) self, FALSE);
#line 835 "collection-source.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return self ? g_object_ref (self) : NULL;
#line 842 "collection-source.c"
}


void boxes_collection_source_purge_stale_box_configs (BoxesCollectionSource* self, GList* used_configs) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	gsize _tmp2_;
	gchar** _tmp3_;
	GError * _inner_error_ = NULL;
#line 130 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = g_key_file_get_groups (_tmp1_, &_tmp2_);
#line 860 "collection-source.c"
	{
		gchar** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection = _tmp3_;
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection_length1 = _tmp2_;
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		for (group_it = 0; group_it < _tmp2_; group_it = group_it + 1) {
#line 872 "collection-source.c"
			gchar* _tmp4_;
			gchar* group = NULL;
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			_tmp4_ = g_strdup (group_collection[group_it]);
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
			group = _tmp4_;
#line 879 "collection-source.c"
			{
				const gchar* _tmp5_;
				gboolean stale = FALSE;
				GList* _tmp6_;
				gboolean _tmp12_;
#line 132 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp5_ = group;
#line 132 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				if (g_strcmp0 (_tmp5_, "source") == 0) {
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					_g_free0 (group);
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					continue;
#line 893 "collection-source.c"
				}
#line 135 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				stale = TRUE;
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp6_ = used_configs;
#line 899 "collection-source.c"
				{
					GList* config_collection = NULL;
					GList* config_it = NULL;
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					config_collection = _tmp6_;
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					for (config_it = config_collection; config_it != NULL; config_it = config_it->next) {
#line 907 "collection-source.c"
						BoxesBoxConfig* _tmp7_;
						BoxesBoxConfig* config = NULL;
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp7_ = _g_object_ref0 ((BoxesBoxConfig*) config_it->data);
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						config = _tmp7_;
#line 914 "collection-source.c"
						{
							BoxesBoxConfig* _tmp8_;
							const gchar* _tmp9_;
							const gchar* _tmp10_;
							const gchar* _tmp11_;
#line 137 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							_tmp8_ = config;
#line 137 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							_tmp9_ = boxes_box_config_get_group (_tmp8_);
#line 137 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							_tmp10_ = _tmp9_;
#line 137 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							_tmp11_ = group;
#line 137 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							if (g_strcmp0 (_tmp10_, _tmp11_) == 0) {
#line 138 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
								stale = FALSE;
#line 140 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
								_g_object_unref0 (config);
#line 140 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
								break;
#line 936 "collection-source.c"
							}
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
							_g_object_unref0 (config);
#line 940 "collection-source.c"
						}
					}
				}
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_tmp12_ = stale;
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				if (_tmp12_) {
#line 948 "collection-source.c"
					{
						GKeyFile* _tmp13_;
						GKeyFile* _tmp14_;
						const gchar* _tmp15_;
						const gchar* _tmp16_;
#line 146 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp13_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 146 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp14_ = _tmp13_;
#line 146 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp15_ = group;
#line 146 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						g_key_file_remove_group (_tmp14_, _tmp15_, &_inner_error_);
#line 146 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 964 "collection-source.c"
							goto __catch6_g_error;
						}
#line 147 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp16_ = group;
#line 147 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						g_debug ("collection-source.vala:147: Removed stale box config '%s'", _tmp16_);
#line 971 "collection-source.c"
					}
					goto __finally6;
					__catch6_g_error:
					{
						GError* e = NULL;
						const gchar* _tmp17_;
						GError* _tmp18_;
						const gchar* _tmp19_;
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						e = _inner_error_;
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_inner_error_ = NULL;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp17_ = group;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp18_ = e;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_tmp19_ = _tmp18_->message;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						g_debug ("collection-source.vala:149: Error removing stale stale box config '%s'" \
": %s", _tmp17_, _tmp19_);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_g_error_free0 (e);
#line 994 "collection-source.c"
					}
					__finally6:
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						_g_free0 (group);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						group_collection = (_vala_array_free (group_collection, group_collection_length1, (GDestroyNotify) g_free), NULL);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.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 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						g_clear_error (&_inner_error_);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
						return;
#line 1009 "collection-source.c"
					}
				}
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
				_g_free0 (group);
#line 1014 "collection-source.c"
			}
		}
#line 131 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		group_collection = (_vala_array_free (group_collection, group_collection_length1, (GDestroyNotify) g_free), NULL);
#line 1019 "collection-source.c"
	}
#line 154 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_save ((BoxesIConfig*) self);
#line 1023 "collection-source.c"
}


static GKeyFile* boxes_collection_source_real_get_keyfile (BoxesIConfig* base) {
	GKeyFile* result;
	BoxesCollectionSource* self;
	GKeyFile* _tmp0_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 68 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = self->priv->_keyfile;
#line 68 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1039 "collection-source.c"
}


static gboolean boxes_collection_source_real_get_has_file (BoxesIConfig* base) {
	gboolean result;
	BoxesCollectionSource* self;
	gboolean _tmp0_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = self->priv->_has_file;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1055 "collection-source.c"
}


static void boxes_collection_source_real_set_has_file (BoxesIConfig* base, gboolean value) {
	BoxesCollectionSource* self;
	gboolean _tmp0_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = value;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self->priv->_has_file = _tmp0_;
#line 1068 "collection-source.c"
}


static const gchar* boxes_collection_source_real_get_filename (BoxesIConfig* base) {
	const gchar* result;
	BoxesCollectionSource* self;
	const gchar* _tmp0_;
	const gchar* _tmp5_;
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 75 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = self->priv->_filename;
#line 75 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (_tmp0_ == NULL) {
#line 1083 "collection-source.c"
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp1_ = boxes_collection_source_get_name (self);
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp2_ = _tmp1_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp3_ = _tmp2_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_tmp4_ = boxes_make_filename (_tmp3_);
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_free0 (self->priv->_filename);
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		self->priv->_filename = _tmp4_;
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		_g_free0 (_tmp3_);
#line 1102 "collection-source.c"
	}
#line 77 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp5_ = self->priv->_filename;
#line 77 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp5_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1110 "collection-source.c"
}


static void boxes_collection_source_real_set_filename (BoxesIConfig* base, const gchar* value) {
	BoxesCollectionSource* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = value;
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (self->priv->_filename);
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self->priv->_filename = _tmp1_;
#line 1128 "collection-source.c"
}


gchar* boxes_collection_source_get_name (BoxesCollectionSource* self) {
	gchar* result;
	gchar* _tmp0_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_string ((BoxesIConfig*) self, "source", "name");
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1143 "collection-source.c"
}


void boxes_collection_source_set_name (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
	gboolean had_file = FALSE;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 85 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 85 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 85 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 85 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "name", _tmp2_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp3_ = boxes_iconfig_get_has_file ((BoxesIConfig*) self);
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp4_ = _tmp3_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	had_file = _tmp4_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_delete (self);
#line 88 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (self->priv->_filename);
#line 88 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self->priv->_filename = NULL;
#line 89 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp5_ = had_file;
#line 89 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	if (_tmp5_) {
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		boxes_iconfig_save ((BoxesIConfig*) self);
#line 1183 "collection-source.c"
	}
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_NAME]);
#line 1187 "collection-source.c"
}


gchar* boxes_collection_source_get_source_type (BoxesCollectionSource* self) {
	gchar* result;
	gchar* _tmp0_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 94 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_string ((BoxesIConfig*) self, "source", "type");
#line 94 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1202 "collection-source.c"
}


void boxes_collection_source_set_source_type (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "type", _tmp2_);
#line 95 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_SOURCE_TYPE]);
#line 1222 "collection-source.c"
}


gchar* boxes_collection_source_get_uri (BoxesCollectionSource* self) {
	gchar* result;
	gchar* _tmp0_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_string ((BoxesIConfig*) self, "source", "uri");
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1237 "collection-source.c"
}


void boxes_collection_source_set_uri (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "uri", _tmp2_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_URI]);
#line 1257 "collection-source.c"
}


gboolean boxes_collection_source_get_enabled (BoxesCollectionSource* self) {
	gboolean result;
	gboolean _tmp0_;
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_boolean ((BoxesIConfig*) self, "source", "enabled", TRUE);
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	result = _tmp0_;
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return result;
#line 1272 "collection-source.c"
}


void boxes_collection_source_set_enabled (BoxesCollectionSource* self, gboolean value) {
	gboolean _tmp0_;
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = value;
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_boolean ((BoxesIConfig*) self, "source", "enabled", _tmp0_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_ENABLED]);
#line 1286 "collection-source.c"
}


static GObject * boxes_collection_source_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesCollectionSource * self;
	GKeyFile* _tmp0_;
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	parent_class = G_OBJECT_CLASS (boxes_collection_source_parent_class);
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 107 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_tmp0_ = g_key_file_new ();
#line 107 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_key_file_unref0 (self->priv->_keyfile);
#line 107 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self->priv->_keyfile = _tmp0_;
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	return obj;
#line 1309 "collection-source.c"
}


static void boxes_collection_source_class_init (BoxesCollectionSourceClass * klass) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_parent_class = g_type_class_peek_parent (klass);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionSourcePrivate));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_source_get_property;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_source_set_property;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_collection_source_constructor;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_source_finalize;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_SOURCE_NAME, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_NAME] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_SOURCE_SOURCE_TYPE, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_SOURCE_TYPE] = g_param_spec_string ("source-type", "source-type", "source-type", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_SOURCE_URI, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_URI] = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_SOURCE_ENABLED, boxes_collection_source_properties[BOXES_COLLECTION_SOURCE_ENABLED] = g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 1334 "collection-source.c"
}


static void boxes_collection_source_boxes_iconfig_interface_init (BoxesIConfigIface * iface) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_boxes_iconfig_parent_iface = g_type_interface_peek_parent (iface);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	iface->get_keyfile = boxes_collection_source_real_get_keyfile;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	iface->get_has_file = boxes_collection_source_real_get_has_file;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	iface->set_has_file = boxes_collection_source_real_set_has_file;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	iface->get_filename = boxes_collection_source_real_get_filename;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	iface->set_filename = boxes_collection_source_real_set_filename;
#line 1351 "collection-source.c"
}


static void boxes_collection_source_instance_init (BoxesCollectionSource * self) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self->priv = BOXES_COLLECTION_SOURCE_GET_PRIVATE (self);
#line 1358 "collection-source.c"
}


static void boxes_collection_source_finalize (GObject * obj) {
	BoxesCollectionSource * self;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 67 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_key_file_unref0 (self->priv->_keyfile);
#line 72 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	_g_free0 (self->priv->_filename);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (boxes_collection_source_parent_class)->finalize (obj);
#line 1372 "collection-source.c"
}


GType boxes_collection_source_get_type (void) {
	static volatile gsize boxes_collection_source_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_source_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionSource), 0, (GInstanceInitFunc) boxes_collection_source_instance_init, NULL };
		static const GInterfaceInfo boxes_iconfig_info = { (GInterfaceInitFunc) boxes_collection_source_boxes_iconfig_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_collection_source_type_id;
		boxes_collection_source_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesCollectionSource", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_collection_source_type_id, BOXES_TYPE_ICONFIG, &boxes_iconfig_info);
		g_once_init_leave (&boxes_collection_source_type_id__volatile, boxes_collection_source_type_id);
	}
	return boxes_collection_source_type_id__volatile;
}


static void _vala_boxes_collection_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollectionSource * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	switch (property_id) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_NAME:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_name (self));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_SOURCE_TYPE:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_source_type (self));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_URI:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_uri (self));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_ENABLED:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		g_value_set_boolean (value, boxes_collection_source_get_enabled (self));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 1419 "collection-source.c"
		default:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 1425 "collection-source.c"
	}
}


static void _vala_boxes_collection_source_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesCollectionSource * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
	switch (property_id) {
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_NAME:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_name (self, g_value_get_string (value));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_SOURCE_TYPE:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_source_type (self, g_value_get_string (value));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_URI:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_uri (self, g_value_get_string (value));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_ENABLED:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_enabled (self, g_value_get_boolean (value));
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 1459 "collection-source.c"
		default:
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 66 "/home/fborges/checkout/gnome-boxes/src/collection-source.vala"
		break;
#line 1465 "collection-source.c"
	}
}


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


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



