/* link-personas.c generated by valac 0.14.0.3-1a311, the Vala compiler
 * generated from link-personas.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 <tracker-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>


#define TYPE_LINK_PERSONAS_TESTS (link_personas_tests_get_type ())
#define LINK_PERSONAS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTests))
#define LINK_PERSONAS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsClass))
#define IS_LINK_PERSONAS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINK_PERSONAS_TESTS))
#define IS_LINK_PERSONAS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LINK_PERSONAS_TESTS))
#define LINK_PERSONAS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsClass))

typedef struct _LinkPersonasTests LinkPersonasTests;
typedef struct _LinkPersonasTestsClass LinkPersonasTestsClass;
typedef struct _LinkPersonasTestsPrivate LinkPersonasTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _tracker_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (tracker_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _LinkPersonasTestsTestLinkingPersonasAsyncData LinkPersonasTestsTestLinkingPersonasAsyncData;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _LinkPersonasTestsAddPersonasData LinkPersonasTestsAddPersonasData;

struct _LinkPersonasTests {
	FolksTestCase parent_instance;
	LinkPersonasTestsPrivate * priv;
};

struct _LinkPersonasTestsClass {
	FolksTestCaseClass parent_class;
};

struct _LinkPersonasTestsPrivate {
	GMainLoop* _main_loop;
	TrackerTestBackend* _tracker_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname_1;
	gchar* _persona_fullname_2;
	gchar* _proto;
	gchar* _im_address_1;
	gchar* _im_address_2;
	gboolean _linking_fired;
	gboolean _persona_found_1;
	gboolean _persona_found_2;
	gchar* _persona_iid_1;
	gchar* _persona_iid_2;
	GeeHashSet* _personas;
	GeeHashMap* _linking_props;
};

struct _LinkPersonasTestsTestLinkingPersonasAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksPersonaStore* pstore;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GeeCollection* _tmp6_;
	GeeCollection* _tmp7_;
	GeeCollection* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	GeeIterator* _backend_it;
	GeeIterator* _tmp11_;
	gboolean _tmp12_;
	GeeIterator* _tmp13_;
	gpointer _tmp14_;
	FolksBackend* backend;
	FolksBackend* _tmp15_;
	GeeMap* _tmp16_;
	GeeMap* _tmp17_;
	gpointer _tmp18_;
	FolksPersonaStore* _tmp19_;
	FolksPersonaStore* _tmp20_;
	FolksPersonaStore* _tmp21_;
	GError* e;
	GError* _tmp22_;
	const gchar* _tmp23_;
	GError * _inner_error_;
};

struct _LinkPersonasTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksPersonaStore* pstore;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details1;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* v1;
	GeeHashMultiMap* _tmp7_;
	GeeHashMultiMap* im_addrs1;
	GeeHashMultiMap* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	FolksImFieldDetails* _tmp11_;
	FolksImFieldDetails* _tmp12_;
	GValue* _tmp13_;
	GeeHashMultiMap* _tmp14_;
	GHashTable* _tmp15_;
	gchar* _tmp16_;
	GValue* _tmp17_;
	GValue _tmp18_;
	GValue _tmp19_;
	GValue* _tmp20_;
	GValue* _tmp21_;
	GValue* v2;
	GValue* _tmp22_;
	const gchar* _tmp23_;
	GHashTable* _tmp24_;
	gchar* _tmp25_;
	GValue* _tmp26_;
	GHashFunc _tmp27_;
	GEqualFunc _tmp28_;
	GHashTable* _tmp29_;
	GHashTable* details2;
	GValue _tmp30_;
	GValue _tmp31_;
	GValue* _tmp32_;
	GValue* _tmp33_;
	GValue* v3;
	GeeHashMultiMap* _tmp34_;
	GeeHashMultiMap* im_addrs2;
	GeeHashMultiMap* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	FolksImFieldDetails* _tmp38_;
	FolksImFieldDetails* _tmp39_;
	GValue* _tmp40_;
	GeeHashMultiMap* _tmp41_;
	GHashTable* _tmp42_;
	gchar* _tmp43_;
	GValue* _tmp44_;
	GValue _tmp45_;
	GValue _tmp46_;
	GValue* _tmp47_;
	GValue* _tmp48_;
	GValue* v4;
	GValue* _tmp49_;
	const gchar* _tmp50_;
	GHashTable* _tmp51_;
	gchar* _tmp52_;
	GValue* _tmp53_;
	FolksIndividualAggregator* _tmp54_;
	FolksPersonaStore* _tmp55_;
	GHashTable* _tmp56_;
	FolksPersona* _tmp57_;
	FolksPersona* _tmp58_;
	FolksIndividualAggregator* _tmp59_;
	FolksPersonaStore* _tmp60_;
	GHashTable* _tmp61_;
	FolksPersona* _tmp62_;
	FolksPersona* _tmp63_;
	GError* e;
	GError* _tmp64_;
	const gchar* _tmp65_;
	GError * _inner_error_;
};


static gpointer link_personas_tests_parent_class = NULL;

GType link_personas_tests_get_type (void) G_GNUC_CONST;
#define LINK_PERSONAS_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsPrivate))
enum  {
	LINK_PERSONAS_TESTS_DUMMY_PROPERTY
};
LinkPersonasTests* link_personas_tests_new (void);
LinkPersonasTests* link_personas_tests_construct (GType object_type);
void link_personas_tests_test_linking_personas (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_personas_folks_test_case_test_method (gpointer self);
static void link_personas_tests_real_set_up (FolksTestCase* base);
static void link_personas_tests_real_tear_down (FolksTestCase* base);
static void _link_personas_tests_test_linking_personas_async (LinkPersonasTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_test_linking_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static gboolean __lambda1_ (LinkPersonasTests* self);
static gboolean ___lambda1__gsource_func (gpointer self);
static void _link_personas_tests_test_linking_personas_async_data_free (gpointer _data);
static gboolean _link_personas_tests_test_linking_personas_async_co (LinkPersonasTestsTestLinkingPersonasAsyncData* _data_);
static void _link_personas_tests_test_linking_personas_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_tests_individuals_changed_cb (LinkPersonasTests* self, GeeMultiMap* changes);
static void __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _link_personas_tests_add_personas (LinkPersonasTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_add_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static void _link_personas_tests_add_personas_data_free (gpointer _data);
static gboolean _link_personas_tests_add_personas_co (LinkPersonasTestsAddPersonasData* _data_);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static void _link_personas_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i);
static void _link_personas_tests_notify_cb (LinkPersonasTests* self, GObject* individual_obj, GParamSpec* ps);
static void __link_personas_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean ___lambda0_ (LinkPersonasTests* self);
static gboolean ____lambda0__gsource_func (gpointer self);
static void link_personas_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _link_personas_tests_test_linking_personas_folks_test_case_test_method (gpointer self) {
#line 50 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	link_personas_tests_test_linking_personas (self);
#line 250 "link-personas.c"
}


LinkPersonasTests* link_personas_tests_construct (GType object_type) {
	LinkPersonasTests * self = NULL;
	TrackerTestBackend* _tmp0_;
#line 46 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) folks_test_case_construct (object_type, "LinkPersonasTests");
#line 48 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = tracker_test_backend_new ();
#line 48 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 48 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_tracker_backend = _tmp0_;
#line 50 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas", _link_personas_tests_test_linking_personas_folks_test_case_test_method, self);
#line 44 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return self;
#line 269 "link-personas.c"
}


LinkPersonasTests* link_personas_tests_new (void) {
#line 44 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return link_personas_tests_construct (TYPE_LINK_PERSONAS_TESTS);
#line 276 "link-personas.c"
}


static void link_personas_tests_real_set_up (FolksTestCase* base) {
	LinkPersonasTests * self;
	TrackerTestBackend* _tmp0_;
#line 53 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 55 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", "tracker", TRUE);
#line 61 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_tracker_backend;
#line 61 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	tracker_test_backend_set_up (_tmp0_);
#line 291 "link-personas.c"
}


static void link_personas_tests_real_tear_down (FolksTestCase* base) {
	LinkPersonasTests * self;
	TrackerTestBackend* _tmp0_;
#line 64 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 66 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_tracker_backend;
#line 66 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	tracker_test_backend_tear_down (_tmp0_);
#line 67 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_unsetenv ("FOLKS_PRIMARY_STORE");
#line 306 "link-personas.c"
}


static gboolean __lambda1_ (LinkPersonasTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 92 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_main_loop;
#line 92 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_main_loop_quit (_tmp0_);
#line 93 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_assert_not_reached ();
#line 90 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return result;
#line 321 "link-personas.c"
}


static gboolean ___lambda1__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda1_ (self);
#line 90 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return result;
#line 330 "link-personas.c"
}


void link_personas_tests_test_linking_personas (LinkPersonasTests* self) {
	GMainLoop* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GeeHashSet* _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	GeeHashMap* _tmp7_;
	const gchar* _tmp8_;
	GMainLoop* _tmp9_;
	GeeHashMap* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
#line 70 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 72 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 72 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 72 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_main_loop = _tmp0_;
#line 73 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = g_strdup ("persona #1");
#line 73 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 73 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_fullname_1 = _tmp1_;
#line 74 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp2_ = g_strdup ("persona #2");
#line 74 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 74 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_fullname_2 = _tmp2_;
#line 75 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp3_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
#line 75 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 75 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_personas = _tmp3_;
#line 77 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_found_1 = FALSE;
#line 78 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_found_2 = FALSE;
#line 79 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_linking_fired = FALSE;
#line 81 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp4_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 81 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 81 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_linking_props = _tmp4_;
#line 82 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp5_ = self->priv->_linking_props;
#line 82 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp6_ = self->priv->_im_address_1;
#line 82 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, "prop1", _tmp6_);
#line 83 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp7_ = self->priv->_linking_props;
#line 83 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp8_ = self->priv->_im_address_2;
#line 83 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, "prop2", _tmp8_);
#line 85 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async (self, NULL, NULL);
#line 90 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda1__gsource_func, g_object_ref (self), g_object_unref);
#line 96 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp9_ = self->priv->_main_loop;
#line 96 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_main_loop_run (_tmp9_);
#line 100 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp10_ = self->priv->_linking_props;
#line 100 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp11_ = gee_map_get_size ((GeeMap*) _tmp10_);
#line 100 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp12_ = _tmp11_;
#line 100 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_assert (_tmp12_ == 0);
#line 414 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async_data_free (gpointer _data) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_slice_free (LinkPersonasTestsTestLinkingPersonasAsyncData, _data_);
#line 425 "link-personas.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return self ? g_object_ref (self) : NULL;
#line 432 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async (LinkPersonasTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
	LinkPersonasTests* _tmp0_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsTestLinkingPersonasAsyncData);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_test_linking_personas_async);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_test_linking_personas_async_data_free);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->self = _tmp0_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async_co (_data_);
#line 451 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 459 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = _user_data_;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_source_object_ = source_object;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_res_ = _res_;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async_co (_data_);
#line 473 "link-personas.c"
}


static void __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 108 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_individuals_changed_cb (self, changes);
#line 480 "link-personas.c"
}


static gboolean _link_personas_tests_test_linking_personas_async_co (LinkPersonasTestsTestLinkingPersonasAsyncData* _data_) {
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	switch (_data_->_state_) {
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 0:
#line 489 "link-personas.c"
		goto _state_0;
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 1:
#line 493 "link-personas.c"
		goto _state_1;
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 2:
#line 497 "link-personas.c"
		goto _state_2;
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 3:
#line 501 "link-personas.c"
		goto _state_3;
		default:
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_assert_not_reached ();
#line 506 "link-personas.c"
	}
	_state_0:
#line 105 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = NULL;
#line 105 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 105 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->store = _data_->_tmp0_;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_state_ = 1;
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	folks_backend_store_prepare (_data_->store, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 521 "link-personas.c"
	_state_1:
#line 106 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 107 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp1_ = folks_individual_aggregator_new ();
#line 107 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 107 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 108 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 108 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 535 "link-personas.c"
	{
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 2;
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 545 "link-personas.c"
		_state_2:
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 112 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 551 "link-personas.c"
			goto __catch0_g_error;
		}
#line 114 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->pstore = NULL;
#line 556 "link-personas.c"
		{
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp4_ = folks_backend_store_get_enabled_backends (_data_->store);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp5_ = _data_->_tmp4_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp6_ = gee_map_get_values (_data_->_tmp5_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp7_ = _data_->_tmp6_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp8_ = _data_->_tmp7_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp9_ = NULL;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_tmp10_ = _data_->_tmp9_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->_tmp8_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_data_->_backend_it = _data_->_tmp10_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			while (TRUE) {
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp11_ = _data_->_backend_it;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp12_ = FALSE;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp12_ = gee_iterator_next (_data_->_tmp11_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				if (!_data_->_tmp12_) {
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					break;
#line 590 "link-personas.c"
				}
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp13_ = _data_->_backend_it;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp14_ = NULL;
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp14_ = gee_iterator_get (_data_->_tmp13_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->backend = (FolksBackend*) _data_->_tmp14_;
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp15_ = _data_->backend;
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp16_ = folks_backend_get_persona_stores (_data_->_tmp15_);
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp17_ = _data_->_tmp16_;
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp18_ = NULL;
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp18_ = gee_map_get (_data_->_tmp17_, "tracker");
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (_data_->pstore);
#line 117 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->pstore = (FolksPersonaStore*) _data_->_tmp18_;
#line 118 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_data_->_tmp19_ = _data_->pstore;
#line 118 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				if (_data_->_tmp19_ != NULL) {
#line 119 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_data_->backend);
#line 119 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					break;
#line 622 "link-personas.c"
				}
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (_data_->backend);
#line 626 "link-personas.c"
			}
#line 115 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->_backend_it);
#line 630 "link-personas.c"
		}
#line 121 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp20_ = _data_->pstore;
#line 121 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_assert (_data_->_tmp20_ != NULL);
#line 123 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp21_ = _data_->pstore;
#line 123 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 3;
#line 123 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_link_personas_tests_add_personas (_data_->self, _data_->_tmp21_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 123 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 644 "link-personas.c"
		_state_3:
#line 123 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_link_personas_tests_add_personas_finish (_data_->self, _data_->_res_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->pstore);
#line 650 "link-personas.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 127 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp22_ = _data_->e;
#line 127 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp23_ = _data_->_tmp22_->message;
#line 127 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:127: Error when calling prepare: %s\n", _data_->_tmp23_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 667 "link-personas.c"
	}
	__finally0:
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->store);
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.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 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 680 "link-personas.c"
	}
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->store);
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 688 "link-personas.c"
	} else {
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 692 "link-personas.c"
	}
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 103 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 698 "link-personas.c"
}


static void _link_personas_tests_add_personas_data_free (gpointer _data) {
	LinkPersonasTestsAddPersonasData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->pstore);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_slice_free (LinkPersonasTestsAddPersonasData, _data_);
#line 711 "link-personas.c"
}


static void _link_personas_tests_add_personas (LinkPersonasTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsAddPersonasData* _data_;
	LinkPersonasTests* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksPersonaStore* _tmp2_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsAddPersonasData);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_add_personas);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_add_personas_data_free);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->self = _tmp0_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = pstore;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->pstore = _tmp2_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_add_personas_co (_data_);
#line 738 "link-personas.c"
}


static void _link_personas_tests_add_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsAddPersonasData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 746 "link-personas.c"
}


static void _g_free0_ (gpointer var) {
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	var = (g_free (var), NULL);
#line 753 "link-personas.c"
}


static void _vala_GValue_free (GValue* self) {
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_unset (self);
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_free (self);
#line 762 "link-personas.c"
}


static void __vala_GValue_free0_ (gpointer var) {
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
#line 769 "link-personas.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 776 "link-personas.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return self ? _g_value_dup (self) : NULL;
#line 783 "link-personas.c"
}


static void _link_personas_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasTestsAddPersonasData* _data_;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_ = _user_data_;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_source_object_ = source_object;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_res_ = _res_;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_add_personas_co (_data_);
#line 797 "link-personas.c"
}


static gboolean _link_personas_tests_add_personas_co (LinkPersonasTestsAddPersonasData* _data_) {
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	switch (_data_->_state_) {
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 0:
#line 806 "link-personas.c"
		goto _state_0;
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 1:
#line 810 "link-personas.c"
		goto _state_1;
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		case 2:
#line 814 "link-personas.c"
		goto _state_2;
		default:
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_assert_not_reached ();
#line 819 "link-personas.c"
	}
	_state_0:
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = g_str_hash;
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp1_ = g_str_equal;
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
#line 141 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->details1 = _data_->_tmp2_;
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp3_, GEE_TYPE_MULTI_MAP);
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp5_ = __g_value_dup0 (&_data_->_tmp4_);
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp4_) ? (g_value_unset (&_data_->_tmp4_), NULL) : NULL;
#line 143 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v1 = _data_->_tmp6_;
#line 144 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp7_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 144 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->im_addrs1 = _data_->_tmp7_;
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp8_ = _data_->im_addrs1;
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp9_ = _data_->self->priv->_proto;
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp10_ = _data_->self->priv->_im_address_1;
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp11_ = folks_im_field_details_new (_data_->_tmp10_, NULL);
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp12_ = _data_->_tmp11_;
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp8_, _data_->_tmp9_, _data_->_tmp12_);
#line 147 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->_tmp12_);
#line 148 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp13_ = _data_->v1;
#line 148 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp14_ = _data_->im_addrs1;
#line 148 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_set_object (_data_->_tmp13_, (GObject*) _data_->_tmp14_);
#line 149 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp15_ = _data_->details1;
#line 149 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp16_ = g_strdup ("im-addresses");
#line 149 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp17_ = _data_->v1;
#line 149 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v1 = NULL;
#line 149 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp15_, _data_->_tmp16_, _data_->_tmp17_);
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp18_, 0, sizeof (GValue));
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp18_, G_TYPE_STRING);
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp19_ = _data_->_tmp18_;
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp20_ = __g_value_dup0 (&_data_->_tmp19_);
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp21_ = _data_->_tmp20_;
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp19_) ? (g_value_unset (&_data_->_tmp19_), NULL) : NULL;
#line 151 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v2 = _data_->_tmp21_;
#line 152 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp22_ = _data_->v2;
#line 152 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp23_ = _data_->self->priv->_persona_fullname_1;
#line 152 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_set_string (_data_->_tmp22_, _data_->_tmp23_);
#line 153 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp24_ = _data_->details1;
#line 153 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp25_ = g_strdup ("full-name");
#line 153 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp26_ = _data_->v2;
#line 153 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v2 = NULL;
#line 153 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp24_, _data_->_tmp25_, _data_->_tmp26_);
#line 155 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp27_ = g_str_hash;
#line 155 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp28_ = g_str_equal;
#line 155 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp29_ = g_hash_table_new_full (_data_->_tmp27_, _data_->_tmp28_, _g_free0_, __vala_GValue_free0_);
#line 155 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->details2 = _data_->_tmp29_;
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp30_, 0, sizeof (GValue));
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp30_, GEE_TYPE_MULTI_MAP);
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp31_ = _data_->_tmp30_;
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp32_ = __g_value_dup0 (&_data_->_tmp31_);
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp33_ = _data_->_tmp32_;
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp31_) ? (g_value_unset (&_data_->_tmp31_), NULL) : NULL;
#line 157 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v3 = _data_->_tmp33_;
#line 158 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp34_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 158 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->im_addrs2 = _data_->_tmp34_;
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp35_ = _data_->im_addrs2;
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp36_ = _data_->self->priv->_proto;
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp37_ = _data_->self->priv->_im_address_2;
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp38_ = folks_im_field_details_new (_data_->_tmp37_, NULL);
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp39_ = _data_->_tmp38_;
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp35_, _data_->_tmp36_, _data_->_tmp39_);
#line 161 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->_tmp39_);
#line 162 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp40_ = _data_->v3;
#line 162 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp41_ = _data_->im_addrs2;
#line 162 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_set_object (_data_->_tmp40_, (GObject*) _data_->_tmp41_);
#line 163 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp42_ = _data_->details2;
#line 163 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp43_ = g_strdup ("im-addresses");
#line 163 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp44_ = _data_->v3;
#line 163 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v3 = NULL;
#line 163 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp42_, _data_->_tmp43_, _data_->_tmp44_);
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp45_, 0, sizeof (GValue));
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp45_, G_TYPE_STRING);
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp46_ = _data_->_tmp45_;
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp47_ = __g_value_dup0 (&_data_->_tmp46_);
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp48_ = _data_->_tmp47_;
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp46_) ? (g_value_unset (&_data_->_tmp46_), NULL) : NULL;
#line 165 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v4 = _data_->_tmp48_;
#line 166 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp49_ = _data_->v4;
#line 166 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp50_ = _data_->self->priv->_persona_fullname_2;
#line 166 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_value_set_string (_data_->_tmp49_, _data_->_tmp50_);
#line 167 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp51_ = _data_->details2;
#line 167 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp52_ = g_strdup ("full-name");
#line 167 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->_tmp53_ = _data_->v4;
#line 167 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_data_->v4 = NULL;
#line 167 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp51_, _data_->_tmp52_, _data_->_tmp53_);
#line 994 "link-personas.c"
	{
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp54_ = _data_->self->priv->_aggregator;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp55_ = _data_->pstore;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp56_ = _data_->details1;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 1;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp54_, NULL, _data_->_tmp55_, _data_->_tmp56_, _link_personas_tests_add_personas_ready, _data_);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1008 "link-personas.c"
		_state_1:
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp57_ = NULL;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp57_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp54_, _data_->_res_, &_data_->_inner_error_);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp58_ = _data_->_tmp57_;
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->_tmp58_);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1022 "link-personas.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs2);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs1);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 171 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			return FALSE;
#line 1047 "link-personas.c"
		}
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp59_ = _data_->self->priv->_aggregator;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp60_ = _data_->pstore;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp61_ = _data_->details2;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 2;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp59_, NULL, _data_->_tmp60_, _data_->_tmp61_, _link_personas_tests_add_personas_ready, _data_);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1061 "link-personas.c"
		_state_2:
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp62_ = NULL;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp62_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp59_, _data_->_res_, &_data_->_inner_error_);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp63_ = _data_->_tmp62_;
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->_tmp63_);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1075 "link-personas.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs2);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs1);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 174 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			return FALSE;
#line 1100 "link-personas.c"
		}
	}
	goto __finally1;
	__catch1_folks_individual_aggregator_error:
	{
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 179 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp64_ = _data_->e;
#line 179 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_data_->_tmp65_ = _data_->_tmp64_->message;
#line 179 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:179: [AddPersonaError] add_persona_from_details: %s" \
"\n", _data_->_tmp65_);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 1118 "link-personas.c"
	}
	__finally1:
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v4);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs2);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v3);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_hash_table_unref0 (_data_->details2);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v2);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs1);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v1);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_hash_table_unref0 (_data_->details1);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.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 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 169 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1145 "link-personas.c"
	}
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v4);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->im_addrs2);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v3);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_hash_table_unref0 (_data_->details2);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v2);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->im_addrs1);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v1);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_hash_table_unref0 (_data_->details1);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1167 "link-personas.c"
	} else {
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1171 "link-personas.c"
	}
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 139 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 1177 "link-personas.c"
}


static void __link_personas_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 201 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_notify_cb (self, _sender, pspec);
#line 1184 "link-personas.c"
}


static void _link_personas_tests_individuals_changed_cb (LinkPersonasTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
#line 184 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 184 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (changes != NULL);
#line 187 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = changes;
#line 187 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 187 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	added = _tmp1_;
#line 1202 "link-personas.c"
	{
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _i_it;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp2_ = added;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_i_it = _tmp3_;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		while (TRUE) {
#line 1215 "link-personas.c"
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp8_;
			FolksIndividual* _tmp9_;
			gboolean _tmp10_;
			gboolean _tmp11_;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp4_ = _i_it;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (!_tmp5_) {
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				break;
#line 1233 "link-personas.c"
			}
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp6_ = _i_it;
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			i = (FolksIndividual*) _tmp7_;
#line 191 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp8_ = i;
#line 191 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (_tmp8_ == NULL) {
#line 193 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (i);
#line 193 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				continue;
#line 1249 "link-personas.c"
			}
#line 198 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp9_ = i;
#line 198 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp10_ = folks_individual_get_is_user (_tmp9_);
#line 198 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp11_ = _tmp10_;
#line 198 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (!_tmp11_) {
#line 1259 "link-personas.c"
				FolksIndividual* _tmp12_;
				FolksIndividual* _tmp13_;
				FolksIndividual* _tmp14_;
#line 200 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp12_ = i;
#line 200 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_link_personas_tests_check_personas (self, _tmp12_);
#line 201 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp13_ = i;
#line 201 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				g_signal_connect_object ((GObject*) _tmp13_, "notify::full-name", (GCallback) __link_personas_tests_notify_cb_g_object_notify, self, 0);
#line 202 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp14_ = i;
#line 202 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				g_signal_connect_object ((GObject*) _tmp14_, "notify::im-addresses", (GCallback) __link_personas_tests_notify_cb_g_object_notify, self, 0);
#line 1275 "link-personas.c"
			}
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (i);
#line 1279 "link-personas.c"
		}
#line 189 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_i_it);
#line 1283 "link-personas.c"
	}
#line 184 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (added);
#line 1287 "link-personas.c"
}


static void _link_personas_tests_notify_cb (LinkPersonasTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
#line 207 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 207 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (individual_obj != NULL);
#line 207 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (ps != NULL);
#line 209 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = individual_obj;
#line 209 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
#line 209 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	i = _tmp1_;
#line 210 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_check_personas (self, i);
#line 207 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (i);
#line 1311 "link-personas.c"
}


static gboolean ___lambda0_ (LinkPersonasTests* self) {
	gboolean result = FALSE;
	FolksIndividualAggregator* _tmp0_;
	GeeHashSet* _tmp1_;
#line 280 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_aggregator;
#line 280 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = self->priv->_personas;
#line 280 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	folks_individual_aggregator_link_personas (_tmp0_, (GeeSet*) _tmp1_, NULL, NULL);
#line 281 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	result = FALSE;
#line 281 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return result;
#line 1329 "link-personas.c"
}


static gboolean ____lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda0_ (self);
#line 278 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return result;
#line 1338 "link-personas.c"
}


static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i) {
	FolksPersona* first_persona;
	gboolean _tmp8_ = FALSE;
	FolksIndividual* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gboolean _tmp14_;
	gboolean _tmp81_ = FALSE;
	GeeHashSet* _tmp82_;
	gint _tmp83_;
	gint _tmp84_;
	gboolean _tmp86_;
#line 223 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 223 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (i != NULL);
#line 225 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	first_persona = NULL;
#line 1361 "link-personas.c"
	{
		FolksIndividual* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _p_it;
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp0_ = i;
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp1_ = folks_individual_get_personas (_tmp0_);
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp2_ = _tmp1_;
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_p_it = _tmp3_;
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		while (TRUE) {
#line 1380 "link-personas.c"
			gboolean _tmp4_ = FALSE;
			gpointer _tmp5_ = NULL;
			FolksPersona* p;
			FolksPersona* _tmp6_;
			FolksPersona* _tmp7_;
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp4_ = gee_iterator_next (_p_it);
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (!_tmp4_) {
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				break;
#line 1392 "link-personas.c"
			}
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp5_ = gee_iterator_get (_p_it);
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			p = (FolksPersona*) _tmp5_;
#line 228 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp6_ = p;
#line 228 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp7_ = _g_object_ref0 (_tmp6_);
#line 228 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (first_persona);
#line 228 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			first_persona = _tmp7_;
#line 229 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (p);
#line 229 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			break;
#line 1410 "link-personas.c"
		}
#line 226 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_p_it);
#line 1414 "link-personas.c"
	}
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp9_ = i;
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp10_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp9_);
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp11_ = _tmp10_;
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp12_ = self->priv->_persona_fullname_1;
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
#line 1426 "link-personas.c"
		const gchar* _tmp13_;
#line 233 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp13_ = self->priv->_persona_iid_1;
#line 233 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp8_ = g_strcmp0 (_tmp13_, "") == 0;
#line 1432 "link-personas.c"
	} else {
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp8_ = FALSE;
#line 1436 "link-personas.c"
	}
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp14_ = _tmp8_;
#line 232 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_tmp14_) {
#line 1442 "link-personas.c"
		FolksPersona* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		GeeHashSet* _tmp19_;
		FolksPersona* _tmp20_;
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp15_ = first_persona;
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp16_ = folks_persona_get_iid (_tmp15_);
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp17_ = _tmp16_;
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp18_ = g_strdup (_tmp17_);
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_g_free0 (self->priv->_persona_iid_1);
#line 235 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		self->priv->_persona_iid_1 = _tmp18_;
#line 236 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp19_ = self->priv->_personas;
#line 236 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp20_ = first_persona;
#line 236 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
#line 1467 "link-personas.c"
	} else {
		gboolean _tmp21_ = FALSE;
		FolksIndividual* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gboolean _tmp27_;
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp22_ = i;
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp23_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp22_);
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp24_ = _tmp23_;
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp25_ = self->priv->_persona_fullname_2;
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		if (g_strcmp0 (_tmp24_, _tmp25_) == 0) {
#line 1485 "link-personas.c"
			const gchar* _tmp26_;
#line 239 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp26_ = self->priv->_persona_iid_2;
#line 239 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp21_ = g_strcmp0 (_tmp26_, "") == 0;
#line 1491 "link-personas.c"
		} else {
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp21_ = FALSE;
#line 1495 "link-personas.c"
		}
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp27_ = _tmp21_;
#line 238 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		if (_tmp27_) {
#line 1501 "link-personas.c"
			FolksPersona* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			gchar* _tmp31_;
			GeeHashSet* _tmp32_;
			FolksPersona* _tmp33_;
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp28_ = first_persona;
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp29_ = folks_persona_get_iid (_tmp28_);
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp30_ = _tmp29_;
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp31_ = g_strdup (_tmp30_);
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_g_free0 (self->priv->_persona_iid_2);
#line 241 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			self->priv->_persona_iid_2 = _tmp31_;
#line 242 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp32_ = self->priv->_personas;
#line 242 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp33_ = first_persona;
#line 242 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_);
#line 1526 "link-personas.c"
		} else {
			FolksIndividual* _tmp34_;
			GeeSet* _tmp35_;
			GeeSet* _tmp36_;
			gint _tmp37_;
			gint _tmp38_;
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp34_ = i;
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp35_ = folks_individual_get_personas (_tmp34_);
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp36_ = _tmp35_;
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_);
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			_tmp38_ = _tmp37_;
#line 244 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
			if (_tmp38_ > 1) {
#line 1545 "link-personas.c"
				GeeHashMap* _tmp77_;
				gint _tmp78_;
				gint _tmp79_;
				{
					FolksIndividual* _tmp39_;
					GeeMultiMap* _tmp40_;
					GeeMultiMap* _tmp41_;
					GeeSet* _tmp42_ = NULL;
					GeeSet* _tmp43_;
					GeeIterator* _tmp44_ = NULL;
					GeeIterator* _tmp45_;
					GeeIterator* _proto_it;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp39_ = i;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp40_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp39_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp41_ = _tmp40_;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp42_ = gee_multi_map_get_keys (_tmp41_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp43_ = _tmp42_;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp45_ = _tmp44_;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_tmp43_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_proto_it = _tmp45_;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					while (TRUE) {
#line 1578 "link-personas.c"
						GeeIterator* _tmp46_;
						gboolean _tmp47_ = FALSE;
						GeeIterator* _tmp48_;
						gpointer _tmp49_ = NULL;
						gchar* proto;
						FolksIndividual* _tmp50_;
						GeeMultiMap* _tmp51_;
						GeeMultiMap* _tmp52_;
						const gchar* _tmp53_;
						GeeCollection* _tmp54_ = NULL;
						GeeCollection* addrs;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp46_ = _proto_it;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp47_ = gee_iterator_next (_tmp46_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						if (!_tmp47_) {
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							break;
#line 1598 "link-personas.c"
						}
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp48_ = _proto_it;
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp49_ = gee_iterator_get (_tmp48_);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						proto = (gchar*) _tmp49_;
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp50_ = i;
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp51_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp50_);
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp52_ = _tmp51_;
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp53_ = proto;
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_tmp54_ = gee_multi_map_get (_tmp52_, _tmp53_);
#line 249 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						addrs = _tmp54_;
#line 1618 "link-personas.c"
						{
							GeeCollection* _tmp55_;
							GeeIterator* _tmp56_ = NULL;
							GeeIterator* _a_it;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							_tmp55_ = addrs;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							_tmp56_ = gee_iterable_iterator ((GeeIterable*) _tmp55_);
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							_a_it = _tmp56_;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							while (TRUE) {
#line 1631 "link-personas.c"
								GeeIterator* _tmp57_;
								gboolean _tmp58_ = FALSE;
								GeeIterator* _tmp59_;
								gpointer _tmp60_ = NULL;
								FolksImFieldDetails* a;
								FolksImFieldDetails* _tmp61_;
								gconstpointer _tmp62_;
								const gchar* _tmp63_;
								GeeHashMap* _tmp64_;
								gpointer _tmp65_ = NULL;
								gchar* _tmp66_;
								gboolean _tmp67_;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp57_ = _a_it;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp58_ = gee_iterator_next (_tmp57_);
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								if (!_tmp58_) {
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									break;
#line 1652 "link-personas.c"
								}
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp59_ = _a_it;
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp60_ = gee_iterator_get (_tmp59_);
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								a = (FolksImFieldDetails*) _tmp60_;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp61_ = a;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp62_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp61_);
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp63_ = _tmp62_;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp64_ = self->priv->_linking_props;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp65_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp64_, "prop1");
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp66_ = (gchar*) _tmp65_;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_tmp67_ = g_strcmp0 ((const gchar*) _tmp63_, _tmp66_) == 0;
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_g_free0 (_tmp66_);
#line 252 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								if (_tmp67_) {
#line 1678 "link-personas.c"
									GeeHashMap* _tmp68_;
#line 254 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp68_ = self->priv->_linking_props;
#line 254 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									gee_abstract_map_unset ((GeeAbstractMap*) _tmp68_, "prop1", NULL);
#line 1684 "link-personas.c"
								} else {
									FolksImFieldDetails* _tmp69_;
									gconstpointer _tmp70_;
									const gchar* _tmp71_;
									GeeHashMap* _tmp72_;
									gpointer _tmp73_ = NULL;
									gchar* _tmp74_;
									gboolean _tmp75_;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp69_ = a;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp70_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp69_);
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp71_ = _tmp70_;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp72_ = self->priv->_linking_props;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp73_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp72_, "prop2");
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp74_ = (gchar*) _tmp73_;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_tmp75_ = g_strcmp0 ((const gchar*) _tmp71_, _tmp74_) == 0;
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									_g_free0 (_tmp74_);
#line 256 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
									if (_tmp75_) {
#line 1711 "link-personas.c"
										GeeHashMap* _tmp76_;
#line 258 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
										_tmp76_ = self->priv->_linking_props;
#line 258 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
										gee_abstract_map_unset ((GeeAbstractMap*) _tmp76_, "prop2", NULL);
#line 1717 "link-personas.c"
									}
								}
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
								_g_object_unref0 (a);
#line 1722 "link-personas.c"
							}
#line 250 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
							_g_object_unref0 (_a_it);
#line 1726 "link-personas.c"
						}
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_g_object_unref0 (addrs);
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
						_g_free0 (proto);
#line 1732 "link-personas.c"
					}
#line 247 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_proto_it);
#line 1736 "link-personas.c"
				}
#line 263 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp77_ = self->priv->_linking_props;
#line 263 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp78_ = gee_map_get_size ((GeeMap*) _tmp77_);
#line 263 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				_tmp79_ = _tmp78_;
#line 263 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
				if (_tmp79_ == 0) {
#line 1746 "link-personas.c"
					GMainLoop* _tmp80_;
#line 265 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					_tmp80_ = self->priv->_main_loop;
#line 265 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
					g_main_loop_quit (_tmp80_);
#line 1752 "link-personas.c"
				}
			}
		}
	}
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp82_ = self->priv->_personas;
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_);
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp84_ = _tmp83_;
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_tmp84_ == 2) {
#line 1765 "link-personas.c"
		gboolean _tmp85_;
#line 272 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp85_ = self->priv->_linking_fired;
#line 272 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp81_ = _tmp85_ == FALSE;
#line 1771 "link-personas.c"
	} else {
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		_tmp81_ = FALSE;
#line 1775 "link-personas.c"
	}
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp86_ = _tmp81_;
#line 271 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	if (_tmp86_) {
#line 274 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		self->priv->_linking_fired = TRUE;
#line 278 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
		g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ____lambda0__gsource_func, g_object_ref (self), g_object_unref);
#line 1785 "link-personas.c"
	}
#line 223 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (first_persona);
#line 1789 "link-personas.c"
}


static void link_personas_tests_class_init (LinkPersonasTestsClass * klass) {
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	link_personas_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_type_class_add_private (klass, sizeof (LinkPersonasTestsPrivate));
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = link_personas_tests_real_set_up;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = link_personas_tests_real_tear_down;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_OBJECT_CLASS (klass)->finalize = link_personas_tests_finalize;
#line 1804 "link-personas.c"
}


static void link_personas_tests_instance_init (LinkPersonasTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv = LINK_PERSONAS_TESTS_GET_PRIVATE (self);
#line 33 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_strdup ("jabber");
#line 33 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_proto = _tmp0_;
#line 34 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = g_strdup ("someone-1@jabber.example.org");
#line 34 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_im_address_1 = _tmp1_;
#line 35 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp2_ = g_strdup ("someone-2@jabber.example.org");
#line 35 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_im_address_2 = _tmp2_;
#line 39 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp3_ = g_strdup ("");
#line 39 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_iid_1 = _tmp3_;
#line 40 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp4_ = g_strdup ("");
#line 40 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_iid_2 = _tmp4_;
#line 1836 "link-personas.c"
}


static void link_personas_tests_finalize (GObject* obj) {
	LinkPersonasTests * self;
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	self = LINK_PERSONAS_TESTS (obj);
#line 28 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 30 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 31 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 32 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 33 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_proto);
#line 34 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_im_address_1);
#line 35 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_im_address_2);
#line 39 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_1);
#line 40 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_2);
#line 41 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 42 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 26 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	G_OBJECT_CLASS (link_personas_tests_parent_class)->finalize (obj);
#line 1870 "link-personas.c"
}


GType link_personas_tests_get_type (void) {
	static volatile gsize link_personas_tests_type_id__volatile = 0;
	if (g_once_init_enter (&link_personas_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LinkPersonasTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) link_personas_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LinkPersonasTests), 0, (GInstanceInitFunc) link_personas_tests_instance_init, NULL };
		GType link_personas_tests_type_id;
		link_personas_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "LinkPersonasTests", &g_define_type_info, 0);
		g_once_init_leave (&link_personas_tests_type_id__volatile, link_personas_tests_type_id);
	}
	return link_personas_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	LinkPersonasTests* _tmp1_;
	LinkPersonasTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 289 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_test_init (&args_length1, &args, NULL);
#line 291 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_test_get_root ();
#line 291 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	root = _tmp0_;
#line 292 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp1_ = link_personas_tests_new ();
#line 292 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp2_ = _tmp1_;
#line 292 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 292 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 292 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_tmp2_);
#line 294 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_test_run ();
#line 296 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	result = 0;
#line 296 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return result;
#line 1915 "link-personas.c"
}


int main (int argc, char ** argv) {
#line 287 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	g_type_init ();
#line 287 "/home/treitter/collabora/folks/tests/tracker/link-personas.vala"
	return _vala_main (argv, argc);
#line 1924 "link-personas.c"
}



