/* collection-source.c generated by valac 0.17.3.12-6a5ea3, 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;
#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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_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);
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))
enum  {
	BOXES_COLLECTION_SOURCE_DUMMY_PROPERTY,
	BOXES_COLLECTION_SOURCE_NAME,
	BOXES_COLLECTION_SOURCE_SOURCE_TYPE,
	BOXES_COLLECTION_SOURCE_URI,
	BOXES_COLLECTION_SOURCE_ENABLED
};
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);
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);


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


gboolean boxes_iconfig_get_boolean (BoxesIConfig* self, const gchar* group, const gchar* key, gboolean default_value) {
	gboolean result = FALSE;
	GError * _inner_error_ = NULL;
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, FALSE);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, FALSE);
#line 156 "collection-source.c"
	{
		GKeyFile* _tmp0_;
		GKeyFile* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp1_ = _tmp0_;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp2_ = group;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp3_ = key;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp4_ = g_key_file_get_boolean (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp5_ = _tmp4_;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		if (_inner_error_ != NULL) {
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 180 "collection-source.c"
				goto __catch7_g_key_file_error;
			}
#line 16 "/extra-data/checkout/gnome/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 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			return FALSE;
#line 189 "collection-source.c"
		}
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = _tmp5_;
#line 16 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 195 "collection-source.c"
	}
	goto __finally7;
	__catch7_g_key_file_error:
	{
		GError* _error_ = NULL;
		gboolean _tmp6_;
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp6_ = default_value;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = _tmp6_;
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 18 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 214 "collection-source.c"
	}
	__finally7:
#line 15 "/extra-data/checkout/gnome/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 15 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 15 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return FALSE;
#line 223 "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 22 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (group != NULL);
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (key != NULL);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = group;
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp3_ = key;
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp4_ = value;
#line 23 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_key_file_set_boolean (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 249 "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_ = NULL;
	gchar* _tmp8_;
	GError * _inner_error_ = NULL;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_has_file (self);
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (!_tmp1_) {
#line 269 "collection-source.c"
		GError* _tmp2_;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp2_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, "has_file is false");
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_inner_error_ = _tmp2_;
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 28 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return;
#line 279 "collection-source.c"
	}
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp3_ = boxes_iconfig_get_keyfile (self);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp4_ = _tmp3_;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp5_ = boxes_iconfig_get_filename (self);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp6_ = _tmp5_;
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp7_ = boxes_get_user_pkgconfig_source (_tmp6_);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp8_ = _tmp7_;
#line 30 "/extra-data/checkout/gnome/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 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_free0 (_tmp8_);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (_inner_error_ != NULL) {
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 30 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return;
#line 303 "collection-source.c"
	}
}


gchar* boxes_iconfig_get_string (BoxesIConfig* self, const gchar* group, const gchar* key) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, NULL);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 315 "collection-source.c"
	{
		GKeyFile* _tmp0_;
		GKeyFile* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp1_ = _tmp0_;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp2_ = group;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp3_ = key;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp4_ = g_key_file_get_string (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp5_ = _tmp4_;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		if (_inner_error_ != NULL) {
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 339 "collection-source.c"
				goto __catch8_g_key_file_error;
			}
#line 36 "/extra-data/checkout/gnome/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 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			return NULL;
#line 348 "collection-source.c"
		}
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = _tmp5_;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 354 "collection-source.c"
	}
	goto __finally8;
	__catch8_g_key_file_error:
	{
		GError* _error_ = NULL;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = NULL;
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 370 "collection-source.c"
	}
	__finally8:
#line 35 "/extra-data/checkout/gnome/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 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return NULL;
#line 379 "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 42 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (group != NULL, NULL);
#line 42 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (key != NULL, NULL);
#line 390 "collection-source.c"
	{
		GKeyFile* _tmp0_;
		GKeyFile* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gsize _tmp4_;
		gchar** _tmp5_ = NULL;
		gchar** _tmp6_;
		gint _tmp6__length1;
		gint __tmp6__size_;
		gchar** _tmp7_;
		gint _tmp7__length1;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp0_ = boxes_iconfig_get_keyfile (self);
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp1_ = _tmp0_;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp2_ = group;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp3_ = key;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp5_ = g_key_file_get_string_list (_tmp1_, _tmp2_, _tmp3_, &_tmp4_, &_inner_error_);
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp6_ = _tmp5_;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp6__length1 = _tmp4_;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		__tmp6__size_ = _tmp6__length1;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		if (_inner_error_ != NULL) {
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
#line 423 "collection-source.c"
				goto __catch9_g_key_file_error;
			}
#line 44 "/extra-data/checkout/gnome/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 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			g_clear_error (&_inner_error_);
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			return NULL;
#line 432 "collection-source.c"
		}
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp7_ = _tmp6_;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp7__length1 = _tmp6__length1;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		if (result_length1) {
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			*result_length1 = _tmp7__length1;
#line 442 "collection-source.c"
		}
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = _tmp7_;
#line 44 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 448 "collection-source.c"
	}
	goto __finally9;
	__catch9_g_key_file_error:
	{
		GError* _error_ = NULL;
		gchar** _tmp8_;
		gint _tmp8__length1;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_error_ = _inner_error_;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_inner_error_ = NULL;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp8_ = NULL;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp8__length1 = 0;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		if (result_length1) {
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
			*result_length1 = _tmp8__length1;
#line 468 "collection-source.c"
		}
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		result = _tmp8_;
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_error_free0 (_error_);
#line 46 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return result;
#line 476 "collection-source.c"
	}
	__finally9:
#line 43 "/extra-data/checkout/gnome/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 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_clear_error (&_inner_error_);
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return NULL;
#line 485 "collection-source.c"
}


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


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


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


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


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


static void boxes_iconfig_base_init (BoxesIConfigIface * iface) {
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	static gboolean initialized = FALSE;
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (!initialized) {
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		initialized = TRUE;
#line 541 "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 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (source_type != NULL, NULL);
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (uri != NULL, NULL);
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) g_object_new (object_type, NULL);
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = name;
#line 96 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_name (self, _tmp0_);
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = source_type;
#line 97 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_source_type (self, _tmp1_);
#line 98 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = uri;
#line 98 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_set_uri (self, _tmp2_);
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return self;
#line 585 "collection-source.c"
}


BoxesCollectionSource* boxes_collection_source_new (const gchar* name, const gchar* source_type, const gchar* uri) {
#line 95 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return boxes_collection_source_construct (BOXES_TYPE_COLLECTION_SOURCE, name, source_type, uri);
#line 592 "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 101 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) g_object_new (object_type, NULL);
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = filename;
#line 102 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_filename ((BoxesIConfig*) self, _tmp0_);
#line 103 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_has_file ((BoxesIConfig*) self, TRUE);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_load ((BoxesIConfig*) self, &_inner_error_);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (_inner_error_ != NULL) {
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_propagate_error (error, _inner_error_);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_object_unref0 (self);
#line 104 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return NULL;
#line 620 "collection-source.c"
	}
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return self;
#line 624 "collection-source.c"
}


BoxesCollectionSource* boxes_collection_source_new_with_file (const gchar* filename, GError** error) {
#line 101 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return boxes_collection_source_construct_with_file (BOXES_TYPE_COLLECTION_SOURCE, filename, error);
#line 631 "collection-source.c"
}


void boxes_collection_source_delete (BoxesCollectionSource* self) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
#line 107 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_has_file ((BoxesIConfig*) self);
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 108 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (!_tmp1_) {
#line 109 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		return;
#line 652 "collection-source.c"
	}
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = boxes_iconfig_get_filename ((BoxesIConfig*) self);
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp3_ = _tmp2_;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp4_ = boxes_get_user_pkgconfig_source (_tmp3_);
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp5_ = _tmp4_;
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_unlink (_tmp5_);
#line 111 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_free0 (_tmp5_);
#line 112 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_has_file ((BoxesIConfig*) self, FALSE);
#line 668 "collection-source.c"
}


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


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


static void boxes_collection_source_real_set_has_file (BoxesIConfig* base, gboolean value) {
	BoxesCollectionSource* self;
	gboolean _tmp0_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = value;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self->priv->_has_file = _tmp0_;
#line 713 "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 59 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = (BoxesCollectionSource*) base;
#line 60 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = self->priv->_filename;
#line 60 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (_tmp0_ == NULL) {
#line 728 "collection-source.c"
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_ = NULL;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp1_ = boxes_collection_source_get_name (self);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp2_ = _tmp1_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp3_ = _tmp2_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_tmp4_ = boxes_make_filename (_tmp3_);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_free0 (self->priv->_filename);
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		self->priv->_filename = _tmp4_;
#line 61 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		_g_free0 (_tmp3_);
#line 747 "collection-source.c"
	}
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp5_ = self->priv->_filename;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	result = _tmp5_;
#line 62 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return result;
#line 755 "collection-source.c"
}


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


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


void boxes_collection_source_set_name (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean had_file;
	gboolean _tmp5_;
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 70 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "name", _tmp2_);
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp3_ = boxes_iconfig_get_has_file ((BoxesIConfig*) self);
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp4_ = _tmp3_;
#line 71 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	had_file = _tmp4_;
#line 72 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_delete (self);
#line 73 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_free0 (self->priv->_filename);
#line 73 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self->priv->_filename = NULL;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp5_ = had_file;
#line 74 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	if (_tmp5_) {
#line 75 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		boxes_iconfig_save ((BoxesIConfig*) self);
#line 828 "collection-source.c"
	}
#line 69 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_notify ((GObject *) self, "name");
#line 832 "collection-source.c"
}


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


void boxes_collection_source_set_source_type (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "type", _tmp2_);
#line 80 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_notify ((GObject *) self, "source-type");
#line 867 "collection-source.c"
}


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


void boxes_collection_source_set_uri (BoxesCollectionSource* self, const gchar* value) {
	GKeyFile* _tmp0_;
	GKeyFile* _tmp1_;
	const gchar* _tmp2_;
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = boxes_iconfig_get_keyfile ((BoxesIConfig*) self);
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp1_ = _tmp0_;
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp2_ = value;
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_key_file_set_string (_tmp1_, "source", "uri", _tmp2_);
#line 84 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_notify ((GObject *) self, "uri");
#line 902 "collection-source.c"
}


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


void boxes_collection_source_set_enabled (BoxesCollectionSource* self, gboolean value) {
	gboolean _tmp0_;
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_return_if_fail (self != NULL);
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = value;
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_iconfig_set_boolean ((BoxesIConfig*) self, "source", "enabled", _tmp0_);
#line 88 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_notify ((GObject *) self, "enabled");
#line 931 "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 91 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	parent_class = G_OBJECT_CLASS (boxes_collection_source_parent_class);
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_tmp0_ = g_key_file_new ();
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_key_file_free0 (self->priv->_keyfile);
#line 92 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self->priv->_keyfile = _tmp0_;
#line 91 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	return obj;
#line 954 "collection-source.c"
}


static void boxes_collection_source_class_init (BoxesCollectionSourceClass * klass) {
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	boxes_collection_source_parent_class = g_type_class_peek_parent (klass);
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionSourcePrivate));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_source_get_property;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_source_set_property;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_collection_source_constructor;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_source_finalize;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), 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 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), 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 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), 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 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), 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 979 "collection-source.c"
}


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


static void boxes_collection_source_instance_init (BoxesCollectionSource * self) {
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self->priv = BOXES_COLLECTION_SOURCE_GET_PRIVATE (self);
#line 1003 "collection-source.c"
}


static void boxes_collection_source_finalize (GObject* obj) {
	BoxesCollectionSource * self;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_key_file_free0 (self->priv->_keyfile);
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	_g_free0 (self->priv->_filename);
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	G_OBJECT_CLASS (boxes_collection_source_parent_class)->finalize (obj);
#line 1017 "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 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	switch (property_id) {
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_NAME:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_name (self));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_SOURCE_TYPE:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_source_type (self));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_URI:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_value_take_string (value, boxes_collection_source_get_uri (self));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_ENABLED:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		g_value_set_boolean (value, boxes_collection_source_get_enabled (self));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 1064 "collection-source.c"
		default:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 1070 "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 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
	switch (property_id) {
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_NAME:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_name (self, g_value_get_string (value));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_SOURCE_TYPE:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_source_type (self, g_value_get_string (value));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_URI:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_uri (self, g_value_get_string (value));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		case BOXES_COLLECTION_SOURCE_ENABLED:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		boxes_collection_source_set_enabled (self, g_value_get_boolean (value));
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 1104 "collection-source.c"
		default:
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 51 "/extra-data/checkout/gnome/gnome-boxes/src/collection-source.vala"
		break;
#line 1110 "collection-source.c"
	}
}



