/* backend.c generated by valac 0.14.0.3-1a311, the Vala compiler
 * generated from backend.vala, do not modify */


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


#define KF_TEST_TYPE_BACKEND (kf_test_backend_get_type ())
#define KF_TEST_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KF_TEST_TYPE_BACKEND, KfTestBackend))
#define KF_TEST_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KF_TEST_TYPE_BACKEND, KfTestBackendClass))
#define KF_TEST_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KF_TEST_TYPE_BACKEND))
#define KF_TEST_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KF_TEST_TYPE_BACKEND))
#define KF_TEST_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KF_TEST_TYPE_BACKEND, KfTestBackendClass))

typedef struct _KfTestBackend KfTestBackend;
typedef struct _KfTestBackendClass KfTestBackendClass;
typedef struct _KfTestBackendPrivate KfTestBackendPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_io_channel_unref0(var) ((var == NULL) ? NULL : (var = (g_io_channel_unref (var), NULL)))
typedef struct _KfTestParamSpecBackend KfTestParamSpecBackend;

struct _KfTestBackend {
	GTypeInstance parent_instance;
	volatile int ref_count;
	KfTestBackendPrivate * priv;
};

struct _KfTestBackendClass {
	GTypeClass parent_class;
	void (*finalize) (KfTestBackend *self);
};

struct _KfTestBackendPrivate {
	gchar* key_file_name;
};

struct _KfTestParamSpecBackend {
	GParamSpec parent_instance;
};


static gpointer kf_test_backend_parent_class = NULL;

gpointer kf_test_backend_ref (gpointer instance);
void kf_test_backend_unref (gpointer instance);
GParamSpec* kf_test_param_spec_backend (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void kf_test_value_set_backend (GValue* value, gpointer v_object);
void kf_test_value_take_backend (GValue* value, gpointer v_object);
gpointer kf_test_value_get_backend (const GValue* value);
GType kf_test_backend_get_type (void) G_GNUC_CONST;
#define KF_TEST_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), KF_TEST_TYPE_BACKEND, KfTestBackendPrivate))
enum  {
	KF_TEST_BACKEND_DUMMY_PROPERTY
};
void kf_test_backend_set_up (KfTestBackend* self, const gchar* key_file_contents);
void kf_test_backend_tear_down (KfTestBackend* self);
KfTestBackend* kf_test_backend_new (void);
KfTestBackend* kf_test_backend_construct (GType object_type);
static void kf_test_backend_finalize (KfTestBackend* obj);


void kf_test_backend_set_up (KfTestBackend* self, const gchar* key_file_contents) {
	gint fd = 0;
	GIOChannel* _tmp4_;
	GIOChannel* channel;
	const gchar* _tmp11_;
	GError * _inner_error_ = NULL;
#line 5 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_if_fail (self != NULL);
#line 5 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_if_fail (key_file_contents != NULL);
#line 80 "backend.c"
	{
		gchar* _tmp0_ = NULL;
		gint _tmp1_ = 0;
		gint _tmp2_;
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp1_ = g_file_open_tmp ("folks-kf-test-XXXXXX", &_tmp0_, &_inner_error_);
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_free0 (self->priv->key_file_name);
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		self->priv->key_file_name = _tmp0_;
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp2_ = _tmp1_;
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		if (_inner_error_ != NULL) {
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 97 "backend.c"
				goto __catch0_g_file_error;
			}
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			g_clear_error (&_inner_error_);
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			return;
#line 106 "backend.c"
		}
#line 12 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		fd = _tmp2_;
#line 110 "backend.c"
	}
	goto __finally0;
	__catch0_g_file_error:
	{
		GError* e = NULL;
		const gchar* _tmp3_;
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		e = _inner_error_;
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_inner_error_ = NULL;
#line 17 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp3_ = e->message;
#line 17 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_error ("backend.vala:17: Error opening temporary file: %s", _tmp3_);
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_error_free0 (e);
#line 127 "backend.c"
	}
	__finally0:
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (_inner_error_ != NULL) {
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_clear_error (&_inner_error_);
#line 10 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		return;
#line 138 "backend.c"
	}
#line 21 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_tmp4_ = g_io_channel_unix_new (fd);
#line 21 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	channel = _tmp4_;
#line 144 "backend.c"
	{
		const gchar* _tmp5_;
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp5_ = key_file_contents;
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_io_channel_write_chars (channel, (gchar*) _tmp5_, -1, NULL, &_inner_error_);
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		if (_inner_error_ != NULL) {
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			if (_inner_error_->domain == G_CONVERT_ERROR) {
#line 155 "backend.c"
				goto __catch1_g_convert_error;
			}
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			if (_inner_error_->domain == G_IO_CHANNEL_ERROR) {
#line 160 "backend.c"
				goto __catch1_g_io_channel_error;
			}
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			_g_io_channel_unref0 (channel);
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			g_clear_error (&_inner_error_);
#line 24 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			return;
#line 171 "backend.c"
		}
	}
	goto __finally1;
	__catch1_g_convert_error:
	{
		GError* e = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		e = _inner_error_;
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_inner_error_ = NULL;
#line 28 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp6_ = self->priv->key_file_name;
#line 28 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp7_ = e->message;
#line 28 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp8_ = key_file_contents;
#line 28 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_error ("backend.vala:28: Error converting for writing to temporary file '%s': " \
"%s\n" \
"%s", _tmp6_, _tmp7_, _tmp8_);
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_error_free0 (e);
#line 195 "backend.c"
	}
	goto __finally1;
	__catch1_g_io_channel_error:
	{
		GError* e = NULL;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		e = _inner_error_;
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_inner_error_ = NULL;
#line 33 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp9_ = self->priv->key_file_name;
#line 33 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp10_ = e->message;
#line 33 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_error ("backend.vala:33: Error writing to temporary file '%s': %s", _tmp9_, _tmp10_);
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_error_free0 (e);
#line 215 "backend.c"
	}
	__finally1:
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (_inner_error_ != NULL) {
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_io_channel_unref0 (channel);
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_clear_error (&_inner_error_);
#line 22 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		return;
#line 228 "backend.c"
	}
	{
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_io_channel_shutdown (channel, TRUE, &_inner_error_);
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		if (_inner_error_ != NULL) {
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			if (_inner_error_->domain == G_IO_CHANNEL_ERROR) {
#line 237 "backend.c"
				goto __catch2_g_io_channel_error;
			}
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			_g_io_channel_unref0 (channel);
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			g_clear_error (&_inner_error_);
#line 39 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			return;
#line 248 "backend.c"
		}
	}
	goto __finally2;
	__catch2_g_io_channel_error:
	{
		GError* e = NULL;
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		e = _inner_error_;
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_inner_error_ = NULL;
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_error_free0 (e);
#line 261 "backend.c"
	}
	__finally2:
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (_inner_error_ != NULL) {
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_g_io_channel_unref0 (channel);
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.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/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_clear_error (&_inner_error_);
#line 37 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		return;
#line 274 "backend.c"
	}
#line 42 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	close (fd);
#line 46 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_tmp11_ = self->priv->key_file_name;
#line 46 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_setenv ("FOLKS_BACKEND_KEY_FILE_PATH", _tmp11_, TRUE);
#line 5 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_g_io_channel_unref0 (channel);
#line 284 "backend.c"
}


void kf_test_backend_tear_down (KfTestBackend* self) {
	const gchar* _tmp0_;
#line 50 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_if_fail (self != NULL);
#line 53 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_tmp0_ = self->priv->key_file_name;
#line 53 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (_tmp0_ != NULL) {
#line 296 "backend.c"
		const gchar* _tmp1_;
#line 54 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		_tmp1_ = self->priv->key_file_name;
#line 54 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_remove (_tmp1_);
#line 302 "backend.c"
	}
#line 55 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_g_free0 (self->priv->key_file_name);
#line 55 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	self->priv->key_file_name = NULL;
#line 308 "backend.c"
}


KfTestBackend* kf_test_backend_construct (GType object_type) {
	KfTestBackend* self = NULL;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	self = (KfTestBackend*) g_type_create_instance (object_type);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return self;
#line 318 "backend.c"
}


KfTestBackend* kf_test_backend_new (void) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return kf_test_backend_construct (KF_TEST_TYPE_BACKEND);
#line 325 "backend.c"
}


static void kf_test_value_backend_init (GValue* value) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	value->data[0].v_pointer = NULL;
#line 332 "backend.c"
}


static void kf_test_value_backend_free_value (GValue* value) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (value->data[0].v_pointer) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		kf_test_backend_unref (value->data[0].v_pointer);
#line 341 "backend.c"
	}
}


static void kf_test_value_backend_copy_value (const GValue* src_value, GValue* dest_value) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (src_value->data[0].v_pointer) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		dest_value->data[0].v_pointer = kf_test_backend_ref (src_value->data[0].v_pointer);
#line 351 "backend.c"
	} else {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		dest_value->data[0].v_pointer = NULL;
#line 355 "backend.c"
	}
}


static gpointer kf_test_value_backend_peek_pointer (const GValue* value) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return value->data[0].v_pointer;
#line 363 "backend.c"
}


static gchar* kf_test_value_backend_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (collect_values[0].v_pointer) {
#line 370 "backend.c"
		KfTestBackend* object;
		object = collect_values[0].v_pointer;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		if (object->parent_instance.g_class == NULL) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 377 "backend.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 381 "backend.c"
		}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = kf_test_backend_ref (object);
#line 385 "backend.c"
	} else {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = NULL;
#line 389 "backend.c"
	}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return NULL;
#line 393 "backend.c"
}


static gchar* kf_test_value_backend_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	KfTestBackend** object_p;
	object_p = collect_values[0].v_pointer;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (!object_p) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 404 "backend.c"
	}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (!value->data[0].v_pointer) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		*object_p = NULL;
#line 410 "backend.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		*object_p = value->data[0].v_pointer;
#line 414 "backend.c"
	} else {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		*object_p = kf_test_backend_ref (value->data[0].v_pointer);
#line 418 "backend.c"
	}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return NULL;
#line 422 "backend.c"
}


GParamSpec* kf_test_param_spec_backend (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	KfTestParamSpecBackend* spec;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_val_if_fail (g_type_is_a (object_type, KF_TEST_TYPE_BACKEND), NULL);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return G_PARAM_SPEC (spec);
#line 436 "backend.c"
}


gpointer kf_test_value_get_backend (const GValue* value) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, KF_TEST_TYPE_BACKEND), NULL);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return value->data[0].v_pointer;
#line 445 "backend.c"
}


void kf_test_value_set_backend (GValue* value, gpointer v_object) {
	KfTestBackend* old;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, KF_TEST_TYPE_BACKEND));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	old = value->data[0].v_pointer;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (v_object) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, KF_TEST_TYPE_BACKEND));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = v_object;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		kf_test_backend_ref (value->data[0].v_pointer);
#line 465 "backend.c"
	} else {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = NULL;
#line 469 "backend.c"
	}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (old) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		kf_test_backend_unref (old);
#line 475 "backend.c"
	}
}


void kf_test_value_take_backend (GValue* value, gpointer v_object) {
	KfTestBackend* old;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, KF_TEST_TYPE_BACKEND));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	old = value->data[0].v_pointer;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (v_object) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, KF_TEST_TYPE_BACKEND));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = v_object;
#line 494 "backend.c"
	} else {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		value->data[0].v_pointer = NULL;
#line 498 "backend.c"
	}
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (old) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		kf_test_backend_unref (old);
#line 504 "backend.c"
	}
}


static void kf_test_backend_class_init (KfTestBackendClass * klass) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	kf_test_backend_parent_class = g_type_class_peek_parent (klass);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	KF_TEST_BACKEND_CLASS (klass)->finalize = kf_test_backend_finalize;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_type_class_add_private (klass, sizeof (KfTestBackendPrivate));
#line 516 "backend.c"
}


static void kf_test_backend_instance_init (KfTestBackend * self) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	self->priv = KF_TEST_BACKEND_GET_PRIVATE (self);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	self->ref_count = 1;
#line 525 "backend.c"
}


static void kf_test_backend_finalize (KfTestBackend* obj) {
	KfTestBackend * self;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	self = KF_TEST_BACKEND (obj);
#line 3 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	_g_free0 (self->priv->key_file_name);
#line 535 "backend.c"
}


GType kf_test_backend_get_type (void) {
	static volatile gsize kf_test_backend_type_id__volatile = 0;
	if (g_once_init_enter (&kf_test_backend_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { kf_test_value_backend_init, kf_test_value_backend_free_value, kf_test_value_backend_copy_value, kf_test_value_backend_peek_pointer, "p", kf_test_value_backend_collect_value, "p", kf_test_value_backend_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (KfTestBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) kf_test_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KfTestBackend), 0, (GInstanceInitFunc) kf_test_backend_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType kf_test_backend_type_id;
		kf_test_backend_type_id = g_type_register_fundamental (g_type_fundamental_next (), "KfTestBackend", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&kf_test_backend_type_id__volatile, kf_test_backend_type_id);
	}
	return kf_test_backend_type_id__volatile;
}


gpointer kf_test_backend_ref (gpointer instance) {
	KfTestBackend* self;
	self = instance;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	g_atomic_int_inc (&self->ref_count);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	return instance;
#line 560 "backend.c"
}


void kf_test_backend_unref (gpointer instance) {
	KfTestBackend* self;
	self = instance;
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		KF_TEST_BACKEND_GET_CLASS (self)->finalize (self);
#line 1 "/home/treitter/collabora/folks/tests/lib/key-file/backend.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 573 "backend.c"
	}
}



