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

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <eds-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>


#define TYPE_SET_URLS_TESTS (set_urls_tests_get_type ())
#define SET_URLS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_URLS_TESTS, SetUrlsTests))
#define SET_URLS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_URLS_TESTS, SetUrlsTestsClass))
#define IS_SET_URLS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_URLS_TESTS))
#define IS_SET_URLS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_URLS_TESTS))
#define SET_URLS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_URLS_TESTS, SetUrlsTestsClass))

typedef struct _SetUrlsTests SetUrlsTests;
typedef struct _SetUrlsTestsClass SetUrlsTestsClass;
typedef struct _SetUrlsTestsPrivate SetUrlsTestsPrivate;
#define _eds_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (eds_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SetUrlsTestsTestSetUrlsAsyncData SetUrlsTestsTestSetUrlsAsyncData;

struct _SetUrlsTests {
	FolksTestCase parent_instance;
	SetUrlsTestsPrivate * priv;
};

struct _SetUrlsTestsClass {
	FolksTestCaseClass parent_class;
};

struct _SetUrlsTestsPrivate {
	EdsTestBackend* _eds_backend;
	FolksIndividualAggregator* _aggregator;
	GMainLoop* _main_loop;
	gboolean _found_before_update;
	gboolean _found_url_extra_1;
	gboolean _found_url_extra_2;
	gboolean _found_url_home;
	gboolean _found_url_blog;
	gchar* _url_extra_1;
	gchar* _url_extra_2;
	gchar* _url_home;
	gchar* _url_blog;
};

struct _SetUrlsTestsTestSetUrlsAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SetUrlsTests* self;
	EdsTestBackend* _tmp0_;
	FolksBackendStore* _tmp1_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksIndividualAggregator* _tmp4_;
	GError* e;
	GError* _tmp5_;
	const gchar* _tmp6_;
	GError * _inner_error_;
};


static gpointer set_urls_tests_parent_class = NULL;

GType set_urls_tests_get_type (void) G_GNUC_CONST;
#define SET_URLS_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_URLS_TESTS, SetUrlsTestsPrivate))
enum  {
	SET_URLS_TESTS_DUMMY_PROPERTY
};
SetUrlsTests* set_urls_tests_new (void);
SetUrlsTests* set_urls_tests_construct (GType object_type);
static void set_urls_tests_test_set_urls (SetUrlsTests* self);
static void _set_urls_tests_test_set_urls_folks_test_case_test_method (gpointer self);
static void set_urls_tests_real_set_up (FolksTestCase* base);
static void set_urls_tests_real_tear_down (FolksTestCase* base);
static GValue* _g_value_dup (GValue* self);
static void _vala_GValue_free (GValue* self);
static void _set_urls_tests_test_set_urls_async (SetUrlsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_urls_tests_test_set_urls_finish (SetUrlsTests* self, GAsyncResult* _res_);
static gboolean __lambda0_ (SetUrlsTests* self);
static gboolean ___lambda0__gsource_func (gpointer self);
static void _set_urls_tests_test_set_urls_async_data_free (gpointer _data);
static gboolean _set_urls_tests_test_set_urls_async_co (SetUrlsTestsTestSetUrlsAsyncData* _data_);
static void _set_urls_tests_test_set_urls_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _set_urls_tests_individuals_changed_cb (SetUrlsTests* self, GeeMultiMap* changes);
static void __set_urls_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_urls_tests_notify_urls_cb (SetUrlsTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_urls_tests_notify_urls_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void set_urls_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _set_urls_tests_test_set_urls_folks_test_case_test_method (gpointer self) {
#line 47 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	set_urls_tests_test_set_urls (self);
#line 130 "set-urls.c"
}


SetUrlsTests* set_urls_tests_construct (GType object_type) {
	SetUrlsTests * self = NULL;
	EdsTestBackend* _tmp0_;
#line 43 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self = (SetUrlsTests*) folks_test_case_construct (object_type, "SetUrls");
#line 45 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = eds_test_backend_new ();
#line 45 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 45 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_eds_backend = _tmp0_;
#line 47 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "setting urls on e-d-s persona", _set_urls_tests_test_set_urls_folks_test_case_test_method, self);
#line 41 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return self;
#line 149 "set-urls.c"
}


SetUrlsTests* set_urls_tests_new (void) {
#line 41 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return set_urls_tests_construct (TYPE_SET_URLS_TESTS);
#line 156 "set-urls.c"
}


static void set_urls_tests_real_set_up (FolksTestCase* base) {
	SetUrlsTests * self;
	EdsTestBackend* _tmp0_;
#line 51 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self = (SetUrlsTests*) base;
#line 53 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 53 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_set_up (_tmp0_, FALSE);
#line 169 "set-urls.c"
}


static void set_urls_tests_real_tear_down (FolksTestCase* base) {
	SetUrlsTests * self;
	EdsTestBackend* _tmp0_;
#line 56 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self = (SetUrlsTests*) base;
#line 58 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 58 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_tear_down (_tmp0_);
#line 182 "set-urls.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 63 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 189 "set-urls.c"
}


static void _vala_GValue_free (GValue* self) {
#line 63 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_value_unset (self);
#line 63 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_free (self);
#line 198 "set-urls.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return self ? _g_value_dup (self) : NULL;
#line 205 "set-urls.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 78 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return self ? g_object_ref (self) : NULL;
#line 212 "set-urls.c"
}


static gboolean __lambda0_ (SetUrlsTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 83 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = self->priv->_main_loop;
#line 83 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_main_loop_quit (_tmp0_);
#line 84 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert_not_reached ();
#line 82 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return result;
#line 227 "set-urls.c"
}


static gboolean ___lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda0_ (self);
#line 82 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return result;
#line 236 "set-urls.c"
}


static void set_urls_tests_test_set_urls (SetUrlsTests* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* c1;
	GMainLoop* _tmp1_;
	GValue* v = NULL;
	EdsTestBackend* _tmp2_;
	GValue _tmp3_ = {0};
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* _tmp7_;
	GValue* _tmp8_;
	EdsTestBackend* _tmp9_;
	GeeHashMap* _tmp10_;
	GMainLoop* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
#line 61 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (self != NULL);
#line 63 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, _vala_GValue_free, NULL, NULL, NULL);
#line 63 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	c1 = _tmp0_;
#line 64 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp1_ = g_main_loop_new (NULL, FALSE);
#line 64 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 64 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_main_loop = _tmp1_;
#line 67 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_found_before_update = FALSE;
#line 68 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_found_url_extra_1 = FALSE;
#line 69 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_found_url_extra_2 = FALSE;
#line 70 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_found_url_home = FALSE;
#line 71 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_found_url_blog = FALSE;
#line 73 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp2_ = self->priv->_eds_backend;
#line 73 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_reset (_tmp2_);
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_value_init (&_tmp3_, G_TYPE_STRING);
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp4_ = _tmp3_;
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp5_ = __g_value_dup0 (&_tmp4_);
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	__vala_GValue_free0 (v);
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	v = _tmp5_;
#line 75 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	G_IS_VALUE (&_tmp4_) ? (g_value_unset (&_tmp4_), NULL) : NULL;
#line 76 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp6_ = v;
#line 76 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_value_set_string (_tmp6_, "Albus Percival Wulfric Brian Dumbledore");
#line 77 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp7_ = v;
#line 77 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	v = NULL;
#line 77 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp8_ = _tmp7_;
#line 77 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, "full_name", _tmp8_);
#line 77 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	__vala_GValue_free0 (_tmp8_);
#line 78 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp9_ = self->priv->_eds_backend;
#line 78 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp10_ = _g_object_ref0 (c1);
#line 78 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_add_contact (_tmp9_, _tmp10_);
#line 80 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_set_urls_tests_test_set_urls_async (self, NULL, NULL);
#line 82 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda0__gsource_func, g_object_ref (self), g_object_unref);
#line 87 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp11_ = self->priv->_main_loop;
#line 87 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_main_loop_run (_tmp11_);
#line 89 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp12_ = self->priv->_found_before_update;
#line 89 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp12_);
#line 90 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp13_ = self->priv->_found_url_extra_1;
#line 90 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp13_);
#line 91 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp14_ = self->priv->_found_url_extra_2;
#line 91 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp14_);
#line 92 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp15_ = self->priv->_found_url_home;
#line 92 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp15_);
#line 93 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp16_ = self->priv->_found_url_blog;
#line 93 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp16_);
#line 61 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	__vala_GValue_free0 (v);
#line 61 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (c1);
#line 350 "set-urls.c"
}


static void _set_urls_tests_test_set_urls_async_data_free (gpointer _data) {
	SetUrlsTestsTestSetUrlsAsyncData* _data_;
	_data_ = _data;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_slice_free (SetUrlsTestsTestSetUrlsAsyncData, _data_);
#line 361 "set-urls.c"
}


static void _set_urls_tests_test_set_urls_async (SetUrlsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetUrlsTestsTestSetUrlsAsyncData* _data_;
	SetUrlsTests* _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_ = g_slice_new0 (SetUrlsTestsTestSetUrlsAsyncData);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_urls_tests_test_set_urls_async);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_urls_tests_test_set_urls_async_data_free);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->self = _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_set_urls_tests_test_set_urls_async_co (_data_);
#line 380 "set-urls.c"
}


static void _set_urls_tests_test_set_urls_finish (SetUrlsTests* self, GAsyncResult* _res_) {
	SetUrlsTestsTestSetUrlsAsyncData* _data_;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 388 "set-urls.c"
}


static void _set_urls_tests_test_set_urls_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetUrlsTestsTestSetUrlsAsyncData* _data_;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_ = _user_data_;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_source_object_ = source_object;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_res_ = _res_;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_set_urls_tests_test_set_urls_async_co (_data_);
#line 402 "set-urls.c"
}


static void __set_urls_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 103 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_set_urls_tests_individuals_changed_cb (self, changes);
#line 409 "set-urls.c"
}


static gboolean _set_urls_tests_test_set_urls_async_co (SetUrlsTestsTestSetUrlsAsyncData* _data_) {
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	switch (_data_->_state_) {
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		case 0:
#line 418 "set-urls.c"
		goto _state_0;
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		case 1:
#line 422 "set-urls.c"
		goto _state_1;
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		case 2:
#line 426 "set-urls.c"
		goto _state_2;
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		case 3:
#line 430 "set-urls.c"
		goto _state_3;
		default:
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_assert_not_reached ();
#line 435 "set-urls.c"
	}
	_state_0:
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_tmp0_ = _data_->self->priv->_eds_backend;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_state_ = 1;
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _set_urls_tests_test_set_urls_async_ready, _data_);
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return FALSE;
#line 446 "set-urls.c"
	_state_1:
#line 98 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
#line 100 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_tmp1_ = NULL;
#line 100 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_tmp1_ = folks_backend_store_dup ();
#line 100 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->store = _data_->_tmp1_;
#line 101 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_state_ = 2;
#line 101 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	folks_backend_store_prepare (_data_->store, _set_urls_tests_test_set_urls_async_ready, _data_);
#line 101 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return FALSE;
#line 462 "set-urls.c"
	_state_2:
#line 101 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 102 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_tmp2_ = folks_individual_aggregator_new ();
#line 102 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 102 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->self->priv->_aggregator = _data_->_tmp2_;
#line 103 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 103 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_signal_connect_object (_data_->_tmp3_, "individuals-changed-detailed", (GCallback) __set_urls_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 476 "set-urls.c"
	{
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->_state_ = 3;
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		folks_individual_aggregator_prepare (_data_->_tmp4_, _set_urls_tests_test_set_urls_async_ready, _data_);
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		return FALSE;
#line 486 "set-urls.c"
		_state_3:
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 107 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		if (_data_->_inner_error_ != NULL) {
#line 492 "set-urls.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->e = _data_->_inner_error_;
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->_inner_error_ = NULL;
#line 111 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->_tmp5_ = _data_->e;
#line 111 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_data_->_tmp6_ = _data_->_tmp5_->message;
#line 111 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_warning ("set-urls.vala:111: Error when calling prepare: %s\n", _data_->_tmp6_);
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_g_error_free0 (_data_->e);
#line 511 "set-urls.c"
	}
	__finally0:
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_data_->_inner_error_ != NULL) {
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_g_object_unref0 (_data_->store);
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_clear_error (&_data_->_inner_error_);
#line 105 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		return FALSE;
#line 524 "set-urls.c"
	}
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (_data_->store);
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_data_->_state_ == 0) {
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 532 "set-urls.c"
	} else {
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 536 "set-urls.c"
	}
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_object_unref (_data_->_async_result);
#line 96 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return FALSE;
#line 542 "set-urls.c"
}


static void __set_urls_tests_notify_urls_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 129 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_set_urls_tests_notify_urls_cb (self, _sender, pspec);
#line 549 "set-urls.c"
}


static void _set_urls_tests_individuals_changed_cb (SetUrlsTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
	GeeMultiMap* _tmp2_;
	GeeSet* _tmp3_ = NULL;
	GeeSet* removed;
	GeeSet* _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
#line 115 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (self != NULL);
#line 115 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (changes != NULL);
#line 118 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = changes;
#line 118 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 118 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	added = _tmp1_;
#line 119 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp2_ = changes;
#line 119 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 119 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	removed = _tmp3_;
#line 579 "set-urls.c"
	{
		GeeCollection* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _i_it;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp4_ = added;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_i_it = _tmp5_;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		while (TRUE) {
#line 592 "set-urls.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_;
			gpointer _tmp9_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp10_;
			FolksIndividual* _tmp11_;
			FolksNameDetails* _tmp12_;
			FolksNameDetails* name;
			FolksNameDetails* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp6_ = _i_it;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			if (!_tmp7_) {
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				break;
#line 613 "set-urls.c"
			}
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp8_ = _i_it;
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			i = (FolksIndividual*) _tmp9_;
#line 123 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp10_ = i;
#line 123 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			g_assert (_tmp10_ != NULL);
#line 125 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp11_ = i;
#line 125 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp12_ = _g_object_ref0 (FOLKS_NAME_DETAILS (_tmp11_));
#line 125 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			name = _tmp12_;
#line 127 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp13_ = name;
#line 127 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp14_ = folks_name_details_get_full_name (_tmp13_);
#line 127 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp15_ = _tmp14_;
#line 127 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			if (g_strcmp0 (_tmp15_, "Albus Percival Wulfric Brian Dumbledore") == 0) {
#line 639 "set-urls.c"
				FolksIndividual* _tmp16_;
#line 129 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				_tmp16_ = i;
#line 129 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				g_signal_connect_object ((GObject*) _tmp16_, "notify::urls", (GCallback) __set_urls_tests_notify_urls_cb_g_object_notify, self, 0);
#line 130 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				self->priv->_found_before_update = TRUE;
#line 647 "set-urls.c"
				{
					FolksIndividual* _tmp17_;
					GeeSet* _tmp18_;
					GeeSet* _tmp19_;
					GeeIterator* _tmp20_ = NULL;
					GeeIterator* _p_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp17_ = i;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp18_ = folks_individual_get_personas (_tmp17_);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp19_ = _tmp18_;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp20_ = gee_iterable_iterator ((GeeIterable*) _tmp19_);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_p_it = _tmp20_;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					while (TRUE) {
#line 666 "set-urls.c"
						GeeIterator* _tmp21_;
						gboolean _tmp22_ = FALSE;
						GeeIterator* _tmp23_;
						gpointer _tmp24_ = NULL;
						FolksPersona* p;
						GeeHashSet* _tmp25_;
						GeeHashSet* urls;
						const gchar* _tmp26_;
						FolksUrlFieldDetails* _tmp27_;
						FolksUrlFieldDetails* p1;
						GeeHashSet* _tmp28_;
						FolksUrlFieldDetails* _tmp29_;
						const gchar* _tmp30_;
						FolksUrlFieldDetails* _tmp31_;
						FolksUrlFieldDetails* p2;
						GeeHashSet* _tmp32_;
						FolksUrlFieldDetails* _tmp33_;
						const gchar* _tmp34_;
						FolksUrlFieldDetails* _tmp35_;
						FolksUrlFieldDetails* p3;
						FolksUrlFieldDetails* _tmp36_;
						FolksUrlFieldDetails* _tmp37_;
						FolksUrlFieldDetails* _tmp38_;
						GeeHashSet* _tmp39_;
						FolksUrlFieldDetails* _tmp40_;
						const gchar* _tmp41_;
						FolksUrlFieldDetails* _tmp42_;
						FolksUrlFieldDetails* p4;
						FolksUrlFieldDetails* _tmp43_;
						FolksUrlFieldDetails* _tmp44_;
						FolksUrlFieldDetails* _tmp45_;
						GeeHashSet* _tmp46_;
						FolksUrlFieldDetails* _tmp47_;
						FolksPersona* _tmp48_;
						GeeHashSet* _tmp49_;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp21_ = _p_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp22_ = gee_iterator_next (_tmp21_);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						if (!_tmp22_) {
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
							break;
#line 710 "set-urls.c"
						}
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp23_ = _p_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp24_ = gee_iterator_get (_tmp23_);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						p = (FolksPersona*) _tmp24_;
#line 134 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp25_ = gee_hash_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
#line 134 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						urls = _tmp25_;
#line 136 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp26_ = self->priv->_url_extra_1;
#line 136 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp27_ = folks_url_field_details_new (_tmp26_, NULL);
#line 136 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						p1 = _tmp27_;
#line 137 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp28_ = urls;
#line 137 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp29_ = p1;
#line 137 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp28_, _tmp29_);
#line 138 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp30_ = self->priv->_url_extra_2;
#line 138 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp31_ = folks_url_field_details_new (_tmp30_, NULL);
#line 138 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						p2 = _tmp31_;
#line 139 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp32_ = urls;
#line 139 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp33_ = p2;
#line 139 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_);
#line 140 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp34_ = self->priv->_url_home;
#line 140 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp35_ = folks_url_field_details_new (_tmp34_, NULL);
#line 140 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						p3 = _tmp35_;
#line 141 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp36_ = p3;
#line 141 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp37_ = p3;
#line 141 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp38_ = p3;
#line 141 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp36_, FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_HOME_PAGE);
#line 142 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp39_ = urls;
#line 142 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp40_ = p3;
#line 142 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp39_, _tmp40_);
#line 143 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp41_ = self->priv->_url_blog;
#line 143 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp42_ = folks_url_field_details_new (_tmp41_, NULL);
#line 143 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						p4 = _tmp42_;
#line 144 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp43_ = p4;
#line 144 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp44_ = p3;
#line 144 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp45_ = p3;
#line 144 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp43_, FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_BLOG);
#line 145 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp46_ = urls;
#line 145 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp47_ = p4;
#line 145 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp46_, _tmp47_);
#line 147 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp48_ = p;
#line 147 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp49_ = urls;
#line 147 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						folks_url_details_set_urls (FOLKS_URL_DETAILS (_tmp48_), (GeeSet*) _tmp49_);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (p4);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (p3);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (p2);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (p1);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (urls);
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_g_object_unref0 (p);
#line 804 "set-urls.c"
					}
#line 132 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_g_object_unref0 (_p_it);
#line 808 "set-urls.c"
				}
			}
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_g_object_unref0 (name);
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_g_object_unref0 (i);
#line 815 "set-urls.c"
		}
#line 121 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_g_object_unref0 (_i_it);
#line 819 "set-urls.c"
	}
#line 152 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp50_ = removed;
#line 152 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp51_ = gee_collection_get_size ((GeeCollection*) _tmp50_);
#line 152 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp52_ = _tmp51_;
#line 152 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_assert (_tmp52_ == 1);
#line 829 "set-urls.c"
	{
		GeeSet* _tmp53_;
		GeeIterator* _tmp54_ = NULL;
		GeeIterator* _i_it;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp53_ = removed;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp54_ = gee_iterable_iterator ((GeeIterable*) _tmp53_);
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_i_it = _tmp54_;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		while (TRUE) {
#line 842 "set-urls.c"
			GeeIterator* _tmp55_;
			gboolean _tmp56_ = FALSE;
			GeeIterator* _tmp57_;
			gpointer _tmp58_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp59_;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp55_ = _i_it;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp56_ = gee_iterator_next (_tmp55_);
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			if (!_tmp56_) {
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				break;
#line 857 "set-urls.c"
			}
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp57_ = _i_it;
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp58_ = gee_iterator_get (_tmp57_);
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			i = (FolksIndividual*) _tmp58_;
#line 156 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp59_ = i;
#line 156 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			g_assert (_tmp59_ == NULL);
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_g_object_unref0 (i);
#line 871 "set-urls.c"
		}
#line 154 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_g_object_unref0 (_i_it);
#line 875 "set-urls.c"
	}
#line 115 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (removed);
#line 115 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (added);
#line 881 "set-urls.c"
}


static void _set_urls_tests_notify_urls_cb (SetUrlsTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
	gboolean _tmp26_ = FALSE;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_ = FALSE;
	gboolean _tmp29_;
	gboolean _tmp31_;
	gboolean _tmp33_;
	gboolean _tmp35_;
#line 160 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (self != NULL);
#line 160 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (individual_obj != NULL);
#line 160 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_return_if_fail (ps != NULL);
#line 162 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = individual_obj;
#line 162 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
#line 162 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	i = _tmp1_;
#line 908 "set-urls.c"
	{
		FolksIndividual* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _url_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp2_ = i;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp3_ = folks_url_details_get_urls ((FolksUrlDetails*) _tmp2_);
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp4_ = _tmp3_;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_url_it = _tmp5_;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		while (TRUE) {
#line 927 "set-urls.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_;
			gpointer _tmp9_ = NULL;
			FolksUrlFieldDetails* url;
			FolksUrlFieldDetails* _tmp10_;
			gconstpointer _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp6_ = _url_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			if (!_tmp7_) {
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				break;
#line 945 "set-urls.c"
			}
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp8_ = _url_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			url = (FolksUrlFieldDetails*) _tmp9_;
#line 165 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp10_ = url;
#line 165 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp11_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp10_);
#line 165 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp12_ = _tmp11_;
#line 165 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_tmp13_ = self->priv->_url_extra_1;
#line 165 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			if (g_strcmp0 ((const gchar*) _tmp12_, _tmp13_) == 0) {
#line 167 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				self->priv->_found_url_extra_1 = TRUE;
#line 965 "set-urls.c"
			} else {
				FolksUrlFieldDetails* _tmp14_;
				gconstpointer _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
#line 169 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				_tmp14_ = url;
#line 169 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				_tmp15_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp14_);
#line 169 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				_tmp16_ = _tmp15_;
#line 169 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				_tmp17_ = self->priv->_url_extra_2;
#line 169 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
				if (g_strcmp0 ((const gchar*) _tmp16_, _tmp17_) == 0) {
#line 171 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					self->priv->_found_url_extra_2 = TRUE;
#line 983 "set-urls.c"
				} else {
					FolksUrlFieldDetails* _tmp18_;
					gconstpointer _tmp19_;
					const gchar* _tmp20_;
					const gchar* _tmp21_;
#line 173 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp18_ = url;
#line 173 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp19_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp18_);
#line 173 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp20_ = _tmp19_;
#line 173 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					_tmp21_ = self->priv->_url_home;
#line 173 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
					if (g_strcmp0 ((const gchar*) _tmp20_, _tmp21_) == 0) {
#line 175 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						self->priv->_found_url_home = TRUE;
#line 1001 "set-urls.c"
					} else {
						FolksUrlFieldDetails* _tmp22_;
						gconstpointer _tmp23_;
						const gchar* _tmp24_;
						const gchar* _tmp25_;
#line 177 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp22_ = url;
#line 177 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp23_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp22_);
#line 177 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp24_ = _tmp23_;
#line 177 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						_tmp25_ = self->priv->_url_blog;
#line 177 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
						if (g_strcmp0 ((const gchar*) _tmp24_, _tmp25_) == 0) {
#line 179 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
							self->priv->_found_url_blog = TRUE;
#line 1019 "set-urls.c"
						}
					}
				}
			}
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
			_g_object_unref0 (url);
#line 1026 "set-urls.c"
		}
#line 163 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_g_object_unref0 (_url_it);
#line 1030 "set-urls.c"
	}
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp29_ = self->priv->_found_url_extra_1;
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_tmp29_) {
#line 1036 "set-urls.c"
		gboolean _tmp30_;
#line 184 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp30_ = self->priv->_found_url_extra_2;
#line 184 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp28_ = _tmp30_;
#line 1042 "set-urls.c"
	} else {
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp28_ = FALSE;
#line 1046 "set-urls.c"
	}
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp31_ = _tmp28_;
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_tmp31_) {
#line 1052 "set-urls.c"
		gboolean _tmp32_;
#line 185 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp32_ = self->priv->_found_url_home;
#line 185 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp27_ = _tmp32_;
#line 1058 "set-urls.c"
	} else {
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp27_ = FALSE;
#line 1062 "set-urls.c"
	}
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp33_ = _tmp27_;
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_tmp33_) {
#line 1068 "set-urls.c"
		gboolean _tmp34_;
#line 186 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp34_ = self->priv->_found_url_blog;
#line 186 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp26_ = _tmp34_;
#line 1074 "set-urls.c"
	} else {
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp26_ = FALSE;
#line 1078 "set-urls.c"
	}
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp35_ = _tmp26_;
#line 183 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	if (_tmp35_) {
#line 1084 "set-urls.c"
		GMainLoop* _tmp36_;
#line 188 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		_tmp36_ = self->priv->_main_loop;
#line 188 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
		g_main_loop_quit (_tmp36_);
#line 1090 "set-urls.c"
	}
#line 160 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (i);
#line 1094 "set-urls.c"
}


static void set_urls_tests_class_init (SetUrlsTestsClass * klass) {
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	set_urls_tests_parent_class = g_type_class_peek_parent (klass);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_type_class_add_private (klass, sizeof (SetUrlsTestsPrivate));
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = set_urls_tests_real_set_up;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = set_urls_tests_real_tear_down;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	G_OBJECT_CLASS (klass)->finalize = set_urls_tests_finalize;
#line 1109 "set-urls.c"
}


static void set_urls_tests_instance_init (SetUrlsTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv = SET_URLS_TESTS_GET_PRIVATE (self);
#line 35 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = g_strdup ("http://example.org");
#line 35 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_url_extra_1 = _tmp0_;
#line 36 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp1_ = g_strdup ("http://extra.example.org");
#line 36 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_url_extra_2 = _tmp1_;
#line 37 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp2_ = g_strdup ("http://home.example.org");
#line 37 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_url_home = _tmp2_;
#line 38 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp3_ = g_strdup ("http://blog.example.org");
#line 38 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self->priv->_url_blog = _tmp3_;
#line 1136 "set-urls.c"
}


static void set_urls_tests_finalize (GObject* obj) {
	SetUrlsTests * self;
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	self = SET_URLS_TESTS (obj);
#line 27 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 28 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 29 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 35 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_free0 (self->priv->_url_extra_1);
#line 36 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_free0 (self->priv->_url_extra_2);
#line 37 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_free0 (self->priv->_url_home);
#line 38 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_free0 (self->priv->_url_blog);
#line 25 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	G_OBJECT_CLASS (set_urls_tests_parent_class)->finalize (obj);
#line 1160 "set-urls.c"
}


GType set_urls_tests_get_type (void) {
	static volatile gsize set_urls_tests_type_id__volatile = 0;
	if (g_once_init_enter (&set_urls_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetUrlsTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_urls_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetUrlsTests), 0, (GInstanceInitFunc) set_urls_tests_instance_init, NULL };
		GType set_urls_tests_type_id;
		set_urls_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "SetUrlsTests", &g_define_type_info, 0);
		g_once_init_leave (&set_urls_tests_type_id__volatile, set_urls_tests_type_id);
	}
	return set_urls_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	SetUrlsTests* _tmp1_;
	SetUrlsTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 195 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_test_init (&args_length1, &args, NULL);
#line 197 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp0_ = g_test_get_root ();
#line 197 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	root = _tmp0_;
#line 198 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp1_ = set_urls_tests_new ();
#line 198 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp2_ = _tmp1_;
#line 198 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 198 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 198 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	_g_object_unref0 (_tmp2_);
#line 200 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_test_run ();
#line 202 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	result = 0;
#line 202 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return result;
#line 1205 "set-urls.c"
}


int main (int argc, char ** argv) {
#line 193 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	g_type_init ();
#line 193 "/home/treitter/collabora/folks/tests/eds/set-urls.vala"
	return _vala_main (argv, argc);
#line 1214 "set-urls.c"
}



