/* link-personas.c generated by valac 0.14.0.15-f8b5, 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 <eds-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <folks/folks-eds.h>


#define TYPE_LINKING_METHOD (linking_method_get_type ())

#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 _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_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;
typedef struct _LinkPersonasTestsCheckPersonasData LinkPersonasTestsCheckPersonasData;
typedef struct _LinkPersonasTestsCheckAutoLinkedPersonasData LinkPersonasTestsCheckAutoLinkedPersonasData;

typedef enum  {
	LINKING_METHOD_IM_ADDRESSES,
	LINKING_METHOD_LOCAL_IDS,
	LINKING_METHOD_WEB_SERVICE_ADDRESSES,
	LINKING_METHOD_EMAIL_AS_IM_ADDRESS
} LinkingMethod;

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

struct _LinkPersonasTestsClass {
	FolksTestCaseClass parent_class;
};

struct _LinkPersonasTestsPrivate {
	GMainLoop* _main_loop;
	EdsTestBackend* _eds_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname_1;
	gchar* _persona_fullname_2;
	gchar* _im_address_1;
	gchar* _im_address_2;
	gchar* _auto_linkable_email;
	gboolean _linking_fired;
	gboolean _persona_found_1;
	gboolean _persona_found_2;
	gchar* _persona_iid_1;
	gchar* _persona_iid_2;
	GeeHashSet* _personas;
	GeeHashMap* _linking_props;
	LinkingMethod _linking_method;
};

struct _LinkPersonasTestsTestLinkingPersonasAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	EdsTestBackend* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	FolksPersonaStore* _tmp7_;
	FolksPersonaStore* pstore;
	FolksPersonaStore* _tmp8_;
	FolksPersonaStore* _tmp9_;
	FolksPersonaStore* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	FolksPersonaStore* _tmp13_;
	FolksPersonaStore* _tmp14_;
	GError* e;
	GError* _tmp15_;
	const gchar* _tmp16_;
	GError * _inner_error_;
};

struct _LinkPersonasTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksPersonaStore* pstore1;
	FolksPersonaStore* pstore2;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details1;
	GValue* v1;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* wsk;
	gboolean _tmp5_;
	LinkingMethod _tmp6_;
	LinkingMethod _tmp7_;
	gboolean _tmp8_;
	GValue _tmp9_;
	GValue _tmp10_;
	GValue* _tmp11_;
	GeeHashMultiMap* _tmp12_;
	GeeHashMultiMap* im_addrs1;
	LinkingMethod _tmp13_;
	GeeHashMultiMap* _tmp14_;
	const gchar* _tmp15_;
	FolksImFieldDetails* _tmp16_;
	FolksImFieldDetails* _tmp17_;
	GeeHashMultiMap* _tmp18_;
	const gchar* _tmp19_;
	FolksImFieldDetails* _tmp20_;
	FolksImFieldDetails* _tmp21_;
	GValue* _tmp22_;
	GeeHashMultiMap* _tmp23_;
	GHashTable* _tmp24_;
	gchar* _tmp25_;
	GValue* _tmp26_;
	LinkingMethod _tmp27_;
	GValue _tmp28_;
	GValue _tmp29_;
	GValue* _tmp30_;
	GeeHashMultiMap* _tmp31_;
	GeeHashMultiMap* wsa1;
	GeeHashMultiMap* _tmp32_;
	const gchar* _tmp33_;
	FolksWebServiceFieldDetails* _tmp34_;
	FolksWebServiceFieldDetails* _tmp35_;
	GValue* _tmp36_;
	GeeHashMultiMap* _tmp37_;
	GHashTable* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	GValue* _tmp41_;
	GValue _tmp42_;
	GValue _tmp43_;
	GValue* _tmp44_;
	GValue* _tmp45_;
	GValue* v2;
	GValue* _tmp46_;
	const gchar* _tmp47_;
	GHashTable* _tmp48_;
	gchar* _tmp49_;
	GValue* _tmp50_;
	GHashFunc _tmp51_;
	GEqualFunc _tmp52_;
	GHashTable* _tmp53_;
	GHashTable* details2;
	GValue* v3;
	LinkingMethod _tmp54_;
	GValue _tmp55_;
	GValue _tmp56_;
	GValue* _tmp57_;
	GeeHashMultiMap* _tmp58_;
	GeeHashMultiMap* im_addrs2;
	GeeHashMultiMap* _tmp59_;
	const gchar* _tmp60_;
	FolksImFieldDetails* _tmp61_;
	FolksImFieldDetails* _tmp62_;
	GValue* _tmp63_;
	GeeHashMultiMap* _tmp64_;
	GHashTable* _tmp65_;
	gchar* _tmp66_;
	GValue* _tmp67_;
	LinkingMethod _tmp68_;
	GValue _tmp69_;
	GValue _tmp70_;
	GValue* _tmp71_;
	GeeHashMultiMap* _tmp72_;
	GeeHashMultiMap* wsa2;
	GeeHashMultiMap* _tmp73_;
	const gchar* _tmp74_;
	FolksWebServiceFieldDetails* _tmp75_;
	FolksWebServiceFieldDetails* _tmp76_;
	GValue* _tmp77_;
	GeeHashMultiMap* _tmp78_;
	GHashTable* _tmp79_;
	const gchar* _tmp80_;
	gchar* _tmp81_;
	GValue* _tmp82_;
	LinkingMethod _tmp83_;
	GValue _tmp84_;
	GValue _tmp85_;
	GValue* _tmp86_;
	GeeHashSet* _tmp87_;
	GeeHashSet* emails;
	const gchar* _tmp88_;
	FolksEmailFieldDetails* _tmp89_;
	FolksEmailFieldDetails* email_1;
	GeeHashSet* _tmp90_;
	FolksEmailFieldDetails* _tmp91_;
	GValue* _tmp92_;
	GeeHashSet* _tmp93_;
	GHashTable* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	GValue* _tmp97_;
	GValue _tmp98_;
	GValue _tmp99_;
	GValue* _tmp100_;
	GValue* _tmp101_;
	GValue* v4;
	GValue* _tmp102_;
	const gchar* _tmp103_;
	GHashTable* _tmp104_;
	gchar* _tmp105_;
	GValue* _tmp106_;
	FolksIndividualAggregator* _tmp107_;
	FolksPersonaStore* _tmp108_;
	GHashTable* _tmp109_;
	FolksPersona* _tmp110_;
	FolksPersona* _tmp111_;
	FolksIndividualAggregator* _tmp112_;
	FolksPersonaStore* _tmp113_;
	GHashTable* _tmp114_;
	FolksPersona* _tmp115_;
	FolksPersona* _tmp116_;
	GError* e;
	GError* _tmp117_;
	const gchar* _tmp118_;
	GError * _inner_error_;
};

struct _LinkPersonasTestsCheckPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksIndividual* i;
	gboolean _tmp0_;
	GeeHashMap* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	FolksPersona* first_persona;
	FolksIndividual* _tmp6_;
	GeeSet* _tmp7_;
	GeeSet* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _p_it;
	GeeIterator* _tmp10_;
	gboolean _tmp11_;
	GeeIterator* _tmp12_;
	gpointer _tmp13_;
	FolksPersona* p;
	FolksPersona* _tmp14_;
	FolksPersona* _tmp15_;
	gboolean _tmp16_;
	FolksIndividual* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gboolean _tmp22_;
	FolksPersona* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	GeeHashSet* _tmp27_;
	FolksPersona* _tmp28_;
	LinkingMethod _tmp29_;
	FolksPersona* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* contact_id1;
	GeeHashMap* _tmp34_;
	const gchar* _tmp35_;
	gboolean _tmp36_;
	FolksIndividual* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gboolean _tmp42_;
	FolksPersona* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_;
	GeeHashSet* _tmp47_;
	FolksPersona* _tmp48_;
	LinkingMethod _tmp49_;
	FolksPersona* _tmp50_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* contact_id2;
	GeeHashMap* _tmp54_;
	const gchar* _tmp55_;
	FolksIndividual* _tmp56_;
	GeeSet* _tmp57_;
	GeeSet* _tmp58_;
	gint _tmp59_;
	gint _tmp60_;
	LinkingMethod _tmp61_;
	FolksIndividual* _tmp62_;
	GeeMultiMap* _tmp63_;
	GeeMultiMap* _tmp64_;
	GeeSet* _tmp65_;
	GeeSet* _tmp66_;
	GeeIterator* _tmp67_;
	GeeIterator* _tmp68_;
	GeeIterator* _proto_it;
	GeeIterator* _tmp69_;
	gboolean _tmp70_;
	GeeIterator* _tmp71_;
	gpointer _tmp72_;
	gchar* proto;
	FolksIndividual* _tmp73_;
	GeeMultiMap* _tmp74_;
	GeeMultiMap* _tmp75_;
	const gchar* _tmp76_;
	GeeCollection* _tmp77_;
	GeeCollection* im_fds;
	GeeCollection* _tmp78_;
	GeeIterator* _tmp79_;
	GeeIterator* _im_fd_it;
	GeeIterator* _tmp80_;
	gboolean _tmp81_;
	GeeIterator* _tmp82_;
	gpointer _tmp83_;
	FolksImFieldDetails* im_fd;
	FolksImFieldDetails* _tmp84_;
	gconstpointer _tmp85_;
	const gchar* _tmp86_;
	GeeHashMap* _tmp87_;
	gpointer _tmp88_;
	gchar* _tmp89_;
	gboolean _tmp90_;
	GeeHashMap* _tmp91_;
	FolksImFieldDetails* _tmp92_;
	gconstpointer _tmp93_;
	const gchar* _tmp94_;
	GeeHashMap* _tmp95_;
	gpointer _tmp96_;
	gchar* _tmp97_;
	gboolean _tmp98_;
	GeeHashMap* _tmp99_;
	LinkingMethod _tmp100_;
	FolksIndividual* _tmp101_;
	GeeSet* _tmp102_;
	GeeSet* _tmp103_;
	GeeIterator* _tmp104_;
	GeeIterator* _local_id_it;
	GeeIterator* _tmp105_;
	gboolean _tmp106_;
	GeeIterator* _tmp107_;
	gpointer _tmp108_;
	gchar* local_id;
	const gchar* _tmp109_;
	GeeHashMap* _tmp110_;
	gpointer _tmp111_;
	gchar* _tmp112_;
	gboolean _tmp113_;
	GeeHashMap* _tmp114_;
	const gchar* _tmp115_;
	GeeHashMap* _tmp116_;
	gpointer _tmp117_;
	gchar* _tmp118_;
	gboolean _tmp119_;
	GeeHashMap* _tmp120_;
	LinkingMethod _tmp121_;
	FolksIndividual* _tmp122_;
	GeeMultiMap* _tmp123_;
	GeeMultiMap* _tmp124_;
	GeeSet* _tmp125_;
	GeeSet* _tmp126_;
	GeeIterator* _tmp127_;
	GeeIterator* _tmp128_;
	GeeIterator* _service_it;
	GeeIterator* _tmp129_;
	gboolean _tmp130_;
	GeeIterator* _tmp131_;
	gpointer _tmp132_;
	gchar* service;
	FolksIndividual* _tmp133_;
	GeeMultiMap* _tmp134_;
	GeeMultiMap* _tmp135_;
	const gchar* _tmp136_;
	GeeCollection* _tmp137_;
	GeeCollection* ws_fds;
	GeeCollection* _tmp138_;
	GeeIterator* _tmp139_;
	GeeIterator* _ws_fd_it;
	GeeIterator* _tmp140_;
	gboolean _tmp141_;
	GeeIterator* _tmp142_;
	gpointer _tmp143_;
	FolksWebServiceFieldDetails* ws_fd;
	GeeHashMap* _tmp144_;
	gpointer _tmp145_;
	gchar* prop1;
	GeeHashMap* _tmp146_;
	gpointer _tmp147_;
	gchar* prop2;
	gboolean _tmp148_;
	const gchar* _tmp149_;
	FolksWebServiceFieldDetails* _tmp150_;
	const gchar* _tmp151_;
	FolksWebServiceFieldDetails* _tmp152_;
	FolksWebServiceFieldDetails* _tmp153_;
	gboolean _tmp154_;
	gboolean _tmp155_;
	GeeHashMap* _tmp156_;
	gboolean _tmp157_;
	const gchar* _tmp158_;
	FolksWebServiceFieldDetails* _tmp159_;
	const gchar* _tmp160_;
	FolksWebServiceFieldDetails* _tmp161_;
	FolksWebServiceFieldDetails* _tmp162_;
	gboolean _tmp163_;
	gboolean _tmp164_;
	GeeHashMap* _tmp165_;
	GeeHashMap* _tmp166_;
	gint _tmp167_;
	gint _tmp168_;
	GMainLoop* _tmp169_;
	gboolean _tmp170_;
	GeeHashSet* _tmp171_;
	gint _tmp172_;
	gint _tmp173_;
	gboolean _tmp174_;
	gboolean _tmp175_;
	FolksIndividualAggregator* _tmp176_;
	GeeHashSet* _tmp177_;
	GError* e;
	GError* _tmp178_;
	const gchar* _tmp179_;
	GError * _inner_error_;
};

struct _LinkPersonasTestsCheckAutoLinkedPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksIndividual* i;
	GeeHashMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	FolksIndividual* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	FolksIndividual* _tmp8_;
	GeeSet* _tmp9_;
	GeeSet* _tmp10_;
	GeeIterator* _tmp11_;
	GeeIterator* _email_it;
	GeeIterator* _tmp12_;
	gboolean _tmp13_;
	GeeIterator* _tmp14_;
	gpointer _tmp15_;
	FolksEmailFieldDetails* email;
	FolksEmailFieldDetails* _tmp16_;
	gconstpointer _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GeeHashMap* _tmp20_;
	FolksIndividual* _tmp21_;
	GeeMultiMap* _tmp22_;
	GeeMultiMap* _tmp23_;
	GeeSet* _tmp24_;
	GeeSet* _tmp25_;
	GeeIterator* _tmp26_;
	GeeIterator* _tmp27_;
	GeeIterator* _proto1_it;
	GeeIterator* _tmp28_;
	gboolean _tmp29_;
	GeeIterator* _tmp30_;
	gpointer _tmp31_;
	gchar* proto1;
	FolksIndividual* _tmp32_;
	GeeMultiMap* _tmp33_;
	GeeMultiMap* _tmp34_;
	const gchar* _tmp35_;
	GeeCollection* _tmp36_;
	GeeCollection* im_fds1;
	GeeCollection* _tmp37_;
	GeeIterator* _tmp38_;
	GeeIterator* _im_fd1_it;
	GeeIterator* _tmp39_;
	gboolean _tmp40_;
	GeeIterator* _tmp41_;
	gpointer _tmp42_;
	FolksImFieldDetails* im_fd1;
	FolksImFieldDetails* _tmp43_;
	gconstpointer _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	GeeHashMap* _tmp47_;
	GeeHashMap* _tmp48_;
	gint _tmp49_;
	gint _tmp50_;
	GMainLoop* _tmp51_;
};


static gpointer link_personas_tests_parent_class = NULL;

GType linking_method_get_type (void) G_GNUC_CONST;
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_via_im_addresses (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_personas_via_im_addresses_folks_test_case_test_method (gpointer self);
void link_personas_tests_test_linking_personas_via_local_ids (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_personas_via_local_ids_folks_test_case_test_method (gpointer self);
void link_personas_tests_test_linking_personas_via_web_service_addresses (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_personas_via_web_service_addresses_folks_test_case_test_method (gpointer self);
void link_personas_tests_test_linking_via_email_as_im_address (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_via_email_as_im_address_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 (LinkPersonasTests* self);
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 __lambda2_ (LinkPersonasTests* self);
static gboolean ___lambda2__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 FolksPersonaStore* _link_personas_tests_get_store (LinkPersonasTests* self, FolksBackendStore* store, const gchar* store_id);
static void _link_personas_tests_notify_pstore_cb (LinkPersonasTests* self, GObject* _pstore, GParamSpec* ps);
static void __link_personas_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _link_personas_tests_add_personas (LinkPersonasTests* self, FolksPersonaStore* pstore1, FolksPersonaStore* pstore2, 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_individuals_changed_async (LinkPersonasTests* self, GeeMultiMap* changes);
static void _link_personas_tests_check_auto_linked_personas (LinkPersonasTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_check_auto_linked_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_check_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static void _link_personas_tests_check_personas_data_free (gpointer _data);
static gboolean _link_personas_tests_check_personas_co (LinkPersonasTestsCheckPersonasData* _data_);
static void _link_personas_tests_check_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_tests_check_auto_linked_personas_data_free (gpointer _data);
static gboolean _link_personas_tests_check_auto_linked_personas_co (LinkPersonasTestsCheckAutoLinkedPersonasData* _data_);
static void link_personas_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


GType linking_method_get_type (void) {
	static volatile gsize linking_method_type_id__volatile = 0;
	if (g_once_init_enter (&linking_method_type_id__volatile)) {
		static const GEnumValue values[] = {{LINKING_METHOD_IM_ADDRESSES, "LINKING_METHOD_IM_ADDRESSES", "im-addresses"}, {LINKING_METHOD_LOCAL_IDS, "LINKING_METHOD_LOCAL_IDS", "local-ids"}, {LINKING_METHOD_WEB_SERVICE_ADDRESSES, "LINKING_METHOD_WEB_SERVICE_ADDRESSES", "web-service-addresses"}, {LINKING_METHOD_EMAIL_AS_IM_ADDRESS, "LINKING_METHOD_EMAIL_AS_IM_ADDRESS", "email-as-im-address"}, {0, NULL, NULL}};
		GType linking_method_type_id;
		linking_method_type_id = g_enum_register_static ("LinkingMethod", values);
		g_once_init_leave (&linking_method_type_id__volatile, linking_method_type_id);
	}
	return linking_method_type_id__volatile;
}


static void _link_personas_tests_test_linking_personas_via_im_addresses_folks_test_case_test_method (gpointer self) {
#line 56 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	link_personas_tests_test_linking_personas_via_im_addresses (self);
#line 619 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_via_local_ids_folks_test_case_test_method (gpointer self) {
#line 58 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	link_personas_tests_test_linking_personas_via_local_ids (self);
#line 626 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_via_web_service_addresses_folks_test_case_test_method (gpointer self) {
#line 60 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	link_personas_tests_test_linking_personas_via_web_service_addresses (self);
#line 633 "link-personas.c"
}


static void _link_personas_tests_test_linking_via_email_as_im_address_folks_test_case_test_method (gpointer self) {
#line 62 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	link_personas_tests_test_linking_via_email_as_im_address (self);
#line 640 "link-personas.c"
}


LinkPersonasTests* link_personas_tests_construct (GType object_type) {
	LinkPersonasTests * self = NULL;
#line 54 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self = (LinkPersonasTests*) folks_test_case_construct (object_type, "LinkPersonasTests");
#line 56 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas via IM addresses", _link_personas_tests_test_linking_personas_via_im_addresses_folks_test_case_test_method, self);
#line 58 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas via local IDs", _link_personas_tests_test_linking_personas_via_local_ids_folks_test_case_test_method, self);
#line 60 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas via web service addresses", _link_personas_tests_test_linking_personas_via_web_service_addresses_folks_test_case_test_method, self);
#line 62 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test auto linking via e-mail address as IM address", _link_personas_tests_test_linking_via_email_as_im_address_folks_test_case_test_method, self);
#line 52 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return self;
#line 658 "link-personas.c"
}


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


static void link_personas_tests_real_set_up (FolksTestCase* base) {
	LinkPersonasTests * self;
	EdsTestBackend* _tmp0_;
	EdsTestBackend* _tmp1_;
	EdsTestBackend* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* config_val;
#line 66 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 68 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = eds_test_backend_new ();
#line 68 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 68 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_eds_backend = _tmp0_;
#line 69 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = self->priv->_eds_backend;
#line 69 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	eds_test_backend_set_up (_tmp1_, FALSE);
#line 72 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = self->priv->_eds_backend;
#line 72 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp3_ = eds_test_backend_get_address_book_uid (_tmp2_);
#line 72 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp4_ = _tmp3_;
#line 72 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp5_ = g_strdup_printf ("eds:%s", _tmp4_);
#line 72 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	config_val = _tmp5_;
#line 73 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", config_val, TRUE);
#line 66 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (config_val);
#line 704 "link-personas.c"
}


static void link_personas_tests_real_tear_down (FolksTestCase* base) {
	LinkPersonasTests * self;
	EdsTestBackend* _tmp0_;
#line 76 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 78 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 78 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	eds_test_backend_tear_down (_tmp0_);
#line 80 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_unsetenv ("FOLKS_PRIMARY_STORE");
#line 82 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 82 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_eds_backend = NULL;
#line 723 "link-personas.c"
}


void link_personas_tests_test_linking_personas_via_im_addresses (LinkPersonasTests* self) {
#line 85 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 87 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_method = LINKING_METHOD_IM_ADDRESSES;
#line 88 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas (self);
#line 734 "link-personas.c"
}


void link_personas_tests_test_linking_personas_via_local_ids (LinkPersonasTests* self) {
#line 91 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 93 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_method = LINKING_METHOD_LOCAL_IDS;
#line 94 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas (self);
#line 745 "link-personas.c"
}


void link_personas_tests_test_linking_personas_via_web_service_addresses (LinkPersonasTests* self) {
#line 97 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 99 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_method = LINKING_METHOD_WEB_SERVICE_ADDRESSES;
#line 100 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas (self);
#line 756 "link-personas.c"
}


void link_personas_tests_test_linking_via_email_as_im_address (LinkPersonasTests* self) {
#line 103 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 105 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_method = LINKING_METHOD_EMAIL_AS_IM_ADDRESS;
#line 106 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas (self);
#line 767 "link-personas.c"
}


static gboolean __lambda2_ (LinkPersonasTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 138 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = self->priv->_main_loop;
#line 138 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_main_loop_quit (_tmp0_);
#line 139 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_assert_not_reached ();
#line 136 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return result;
#line 782 "link-personas.c"
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ (self);
#line 136 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return result;
#line 791 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas (LinkPersonasTests* self) {
	GMainLoop* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GeeHashSet* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GeeHashMap* _tmp6_;
	gboolean _tmp7_ = FALSE;
	LinkingMethod _tmp8_;
	gboolean _tmp10_;
	guint _tmp20_ = 0U;
	guint timer_id;
	GMainLoop* _tmp21_;
#line 109 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 111 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 111 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 111 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_main_loop = _tmp0_;
#line 112 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = g_strdup ("persona #1");
#line 112 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 112 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_fullname_1 = _tmp1_;
#line 113 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = g_strdup ("persona #2");
#line 113 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 113 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_fullname_2 = _tmp2_;
#line 114 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp3_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
#line 114 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 114 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_personas = _tmp3_;
#line 115 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_found_1 = FALSE;
#line 116 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_found_2 = FALSE;
#line 117 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_fired = FALSE;
#line 118 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp4_ = g_strdup ("");
#line 118 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_1);
#line 118 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_iid_1 = _tmp4_;
#line 119 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp5_ = g_strdup ("");
#line 119 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_2);
#line 119 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_persona_iid_2 = _tmp5_;
#line 121 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 121 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 121 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_linking_props = _tmp6_;
#line 122 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp8_ = self->priv->_linking_method;
#line 122 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_tmp8_ == LINKING_METHOD_IM_ADDRESSES) {
#line 122 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp7_ = TRUE;
#line 865 "link-personas.c"
	} else {
		LinkingMethod _tmp9_;
#line 123 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp9_ = self->priv->_linking_method;
#line 123 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp7_ = _tmp9_ == LINKING_METHOD_WEB_SERVICE_ADDRESSES;
#line 872 "link-personas.c"
	}
#line 122 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp10_ = _tmp7_;
#line 122 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_tmp10_) {
#line 878 "link-personas.c"
		GeeHashMap* _tmp11_;
		const gchar* _tmp12_;
		GeeHashMap* _tmp13_;
		const gchar* _tmp14_;
#line 125 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp11_ = self->priv->_linking_props;
#line 125 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp12_ = self->priv->_im_address_1;
#line 125 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, "prop1", _tmp12_);
#line 126 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp13_ = self->priv->_linking_props;
#line 126 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp14_ = self->priv->_im_address_2;
#line 126 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, "prop2", _tmp14_);
#line 895 "link-personas.c"
	} else {
		LinkingMethod _tmp15_;
#line 128 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp15_ = self->priv->_linking_method;
#line 128 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_tmp15_ == LINKING_METHOD_EMAIL_AS_IM_ADDRESS) {
#line 902 "link-personas.c"
			GeeHashMap* _tmp16_;
			const gchar* _tmp17_;
			GeeHashMap* _tmp18_;
			const gchar* _tmp19_;
#line 130 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp16_ = self->priv->_linking_props;
#line 130 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp17_ = self->priv->_auto_linkable_email;
#line 130 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, "prop1", _tmp17_);
#line 131 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp18_ = self->priv->_linking_props;
#line 131 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp19_ = self->priv->_auto_linkable_email;
#line 131 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_abstract_map_set ((GeeAbstractMap*) _tmp18_, "prop2", _tmp19_);
#line 919 "link-personas.c"
		}
	}
#line 134 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas_async (self, NULL, NULL);
#line 136 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp20_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 8, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
#line 136 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	timer_id = _tmp20_;
#line 142 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp21_ = self->priv->_main_loop;
#line 142 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_main_loop_run (_tmp21_);
#line 144 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_source_remove (timer_id);
#line 145 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 145 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_aggregator = NULL;
#line 146 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 146 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_main_loop = NULL;
#line 942 "link-personas.c"
}


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


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


static void _link_personas_tests_test_linking_personas_async (LinkPersonasTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
	LinkPersonasTests* _tmp0_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsTestLinkingPersonasAsyncData);
#line 33 "/home/treitter/collabora/folks/tests/eds/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 33 "/home/treitter/collabora/folks/tests/eds/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 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->self = _tmp0_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_test_linking_personas_async_co (_data_);
#line 979 "link-personas.c"
}


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


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


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


static void __link_personas_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 164 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_notify_pstore_cb (self, _sender, pspec);
#line 1015 "link-personas.c"
}


static gboolean _link_personas_tests_test_linking_personas_async_co (LinkPersonasTestsTestLinkingPersonasAsyncData* _data_) {
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	switch (_data_->_state_) {
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 0:
#line 1024 "link-personas.c"
		goto _state_0;
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 1:
#line 1028 "link-personas.c"
		goto _state_1;
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 2:
#line 1032 "link-personas.c"
		goto _state_2;
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 3:
#line 1036 "link-personas.c"
		goto _state_3;
		default:
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_assert_not_reached ();
#line 1041 "link-personas.c"
	}
	_state_0:
#line 151 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp0_ = NULL;
#line 151 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 151 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->store = _data_->_tmp0_;
#line 152 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_state_ = 1;
#line 152 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_backend_store_prepare (_data_->store, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 152 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return FALSE;
#line 1056 "link-personas.c"
	_state_1:
#line 152 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 153 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp1_ = folks_individual_aggregator_new ();
#line 153 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 153 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 154 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 154 "/home/treitter/collabora/folks/tests/eds/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 1070 "link-personas.c"
	{
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_state_ = 2;
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 1080 "link-personas.c"
		_state_2:
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 158 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 1086 "link-personas.c"
			goto __catch0_g_error;
		}
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp4_ = _data_->self->priv->_eds_backend;
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp5_ = eds_test_backend_get_address_book_uid (_data_->_tmp4_);
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp7_ = NULL;
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp7_ = _link_personas_tests_get_store (_data_->self, _data_->store, _data_->_tmp6_);
#line 160 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->pstore = _data_->_tmp7_;
#line 162 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp8_ = _data_->pstore;
#line 162 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_assert (_data_->_tmp8_ != NULL);
#line 164 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp9_ = _data_->pstore;
#line 164 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_signal_connect_object ((GObject*) _data_->_tmp9_, "notify::is-prepared", (GCallback) __link_personas_tests_notify_pstore_cb_g_object_notify, _data_->self, 0);
#line 165 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp10_ = _data_->pstore;
#line 165 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp11_ = folks_persona_store_get_is_prepared (_data_->_tmp10_);
#line 165 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp12_ = _data_->_tmp11_;
#line 165 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp12_) {
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp13_ = _data_->pstore;
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp14_ = _data_->pstore;
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_state_ = 3;
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_link_personas_tests_add_personas (_data_->self, _data_->_tmp13_, _data_->_tmp14_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			return FALSE;
#line 1127 "link-personas.c"
			_state_3:
#line 166 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_link_personas_tests_add_personas_finish (_data_->self, _data_->_res_);
#line 1131 "link-personas.c"
		}
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->pstore);
#line 1135 "link-personas.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 170 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp15_ = _data_->e;
#line 170 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp16_ = _data_->_tmp15_->message;
#line 170 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_warning ("link-personas.vala:170: Error when calling prepare: %s\n", _data_->_tmp16_);
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 1152 "link-personas.c"
	}
	__finally0:
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->store);
#line 156 "/home/treitter/collabora/folks/tests/eds/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 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 156 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 1165 "link-personas.c"
	}
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->store);
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1173 "link-personas.c"
	} else {
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1177 "link-personas.c"
	}
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 149 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return FALSE;
#line 1183 "link-personas.c"
}


static void _link_personas_tests_notify_pstore_cb (LinkPersonasTests* self, GObject* _pstore, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksPersonaStore* pstore;
#line 174 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 174 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (_pstore != NULL);
#line 174 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (ps != NULL);
#line 176 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = _pstore;
#line 176 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_PERSONA_STORE (_tmp0_));
#line 176 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	pstore = _tmp1_;
#line 177 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_add_personas (self, pstore, pstore, NULL, NULL);
#line 174 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (pstore);
#line 1207 "link-personas.c"
}


static FolksPersonaStore* _link_personas_tests_get_store (LinkPersonasTests* self, FolksBackendStore* store, const gchar* store_id) {
	FolksPersonaStore* result = NULL;
	FolksPersonaStore* pstore;
#line 180 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 180 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_val_if_fail (store != NULL, NULL);
#line 180 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_val_if_fail (store_id != NULL, NULL);
#line 182 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	pstore = NULL;
#line 1222 "link-personas.c"
	{
		FolksBackendStore* _tmp0_;
		GeeMap* _tmp1_;
		GeeMap* _tmp2_;
		GeeCollection* _tmp3_;
		GeeCollection* _tmp4_;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_ = NULL;
		GeeIterator* _tmp7_;
		GeeIterator* _backend_it;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp0_ = store;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp1_ = folks_backend_store_get_enabled_backends (_tmp0_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp2_ = _tmp1_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp3_ = gee_map_get_values (_tmp2_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp4_ = _tmp3_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp5_ = _tmp4_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp7_ = _tmp6_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_tmp5_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_backend_it = _tmp7_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		while (TRUE) {
#line 1255 "link-personas.c"
			GeeIterator* _tmp8_;
			gboolean _tmp9_ = FALSE;
			GeeIterator* _tmp10_;
			gpointer _tmp11_ = NULL;
			FolksBackend* backend;
			FolksBackend* _tmp12_;
			GeeMap* _tmp13_;
			GeeMap* _tmp14_;
			const gchar* _tmp15_;
			gpointer _tmp16_ = NULL;
			FolksPersonaStore* _tmp17_;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp8_ = _backend_it;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (!_tmp9_) {
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				break;
#line 1275 "link-personas.c"
			}
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp10_ = _backend_it;
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			backend = (FolksBackend*) _tmp11_;
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp12_ = backend;
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp13_ = folks_backend_get_persona_stores (_tmp12_);
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp14_ = _tmp13_;
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp15_ = store_id;
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp16_ = gee_map_get (_tmp14_, _tmp15_);
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (pstore);
#line 185 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			pstore = (FolksPersonaStore*) _tmp16_;
#line 186 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp17_ = pstore;
#line 186 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_tmp17_ != NULL) {
#line 187 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (backend);
#line 187 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				break;
#line 1305 "link-personas.c"
			}
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (backend);
#line 1309 "link-personas.c"
		}
#line 183 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_backend_it);
#line 1313 "link-personas.c"
	}
#line 189 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	result = pstore;
#line 189 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return result;
#line 1319 "link-personas.c"
}


static void _link_personas_tests_add_personas_data_free (gpointer _data) {
	LinkPersonasTestsAddPersonasData* _data_;
	_data_ = _data;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->pstore1);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->pstore2);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_slice_free (LinkPersonasTestsAddPersonasData, _data_);
#line 1334 "link-personas.c"
}


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


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


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


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


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


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


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


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


static gboolean _link_personas_tests_add_personas_co (LinkPersonasTestsAddPersonasData* _data_) {
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	switch (_data_->_state_) {
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 0:
#line 1437 "link-personas.c"
		goto _state_0;
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 1:
#line 1441 "link-personas.c"
		goto _state_1;
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 2:
#line 1445 "link-personas.c"
		goto _state_2;
		default:
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_assert_not_reached ();
#line 1450 "link-personas.c"
	}
	_state_0:
#line 205 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp0_ = g_str_hash;
#line 205 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp1_ = g_str_equal;
#line 205 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
#line 205 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->details1 = _data_->_tmp2_;
#line 208 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp3_ = NULL;
#line 208 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp3_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_WEB_SERVICE_ADDRESSES);
#line 208 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp4_ = g_strdup (_data_->_tmp3_);
#line 208 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->wsk = _data_->_tmp4_;
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp6_ = _data_->self->priv->_linking_method;
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp6_ == LINKING_METHOD_IM_ADDRESSES) {
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp5_ = TRUE;
#line 1475 "link-personas.c"
	} else {
#line 212 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp7_ = _data_->self->priv->_linking_method;
#line 212 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp5_ = _data_->_tmp7_ == LINKING_METHOD_EMAIL_AS_IM_ADDRESS;
#line 1481 "link-personas.c"
	}
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp8_ = _data_->_tmp5_;
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp8_) {
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		memset (&_data_->_tmp9_, 0, sizeof (GValue));
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_value_init (&_data_->_tmp9_, GEE_TYPE_MULTI_MAP);
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp11_ = __g_value_dup0 (&_data_->_tmp10_);
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v1);
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->v1 = _data_->_tmp11_;
#line 214 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		G_IS_VALUE (&_data_->_tmp10_) ? (g_value_unset (&_data_->_tmp10_), NULL) : NULL;
#line 215 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp12_ = 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 215 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->im_addrs1 = _data_->_tmp12_;
#line 219 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp13_ = _data_->self->priv->_linking_method;
#line 219 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp13_ == LINKING_METHOD_EMAIL_AS_IM_ADDRESS) {
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp14_ = _data_->im_addrs1;
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp15_ = _data_->self->priv->_auto_linkable_email;
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp16_ = folks_im_field_details_new (_data_->_tmp15_, NULL);
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp17_ = _data_->_tmp16_;
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_multi_map_set ((GeeMultiMap*) _data_->_tmp14_, "jabber", _data_->_tmp17_);
#line 220 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_tmp17_);
#line 1521 "link-personas.c"
		} else {
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp18_ = _data_->im_addrs1;
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp19_ = _data_->self->priv->_im_address_1;
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp20_ = folks_im_field_details_new (_data_->_tmp19_, NULL);
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp21_ = _data_->_tmp20_;
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_multi_map_set ((GeeMultiMap*) _data_->_tmp18_, "jabber", _data_->_tmp21_);
#line 223 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_tmp21_);
#line 1535 "link-personas.c"
		}
#line 224 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp22_ = _data_->v1;
#line 224 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp23_ = _data_->im_addrs1;
#line 224 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_value_set_object (_data_->_tmp22_, (GObject*) _data_->_tmp23_);
#line 225 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp24_ = _data_->details1;
#line 225 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp25_ = g_strdup ("im-addresses");
#line 225 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp26_ = _data_->v1;
#line 225 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->v1 = NULL;
#line 225 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_hash_table_insert (_data_->_tmp24_, _data_->_tmp25_, _data_->_tmp26_);
#line 211 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs1);
#line 1555 "link-personas.c"
	} else {
#line 227 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp27_ = _data_->self->priv->_linking_method;
#line 227 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp27_ == LINKING_METHOD_WEB_SERVICE_ADDRESSES) {
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			memset (&_data_->_tmp28_, 0, sizeof (GValue));
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_value_init (&_data_->_tmp28_, GEE_TYPE_MULTI_MAP);
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp29_ = _data_->_tmp28_;
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp30_ = __g_value_dup0 (&_data_->_tmp29_);
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->v1 = _data_->_tmp30_;
#line 229 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			G_IS_VALUE (&_data_->_tmp29_) ? (g_value_unset (&_data_->_tmp29_), NULL) : NULL;
#line 230 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp31_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 230 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->wsa1 = _data_->_tmp31_;
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp32_ = _data_->wsa1;
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp33_ = _data_->self->priv->_im_address_1;
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp34_ = folks_web_service_field_details_new (_data_->_tmp33_, NULL);
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp35_ = _data_->_tmp34_;
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_multi_map_set ((GeeMultiMap*) _data_->_tmp32_, "twitter", _data_->_tmp35_);
#line 234 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_tmp35_);
#line 235 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp36_ = _data_->v1;
#line 235 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp37_ = _data_->wsa1;
#line 235 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_value_set_object (_data_->_tmp36_, (GObject*) _data_->_tmp37_);
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp38_ = _data_->details1;
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp39_ = _data_->wsk;
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp40_ = g_strdup (_data_->_tmp39_);
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp41_ = _data_->v1;
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->v1 = NULL;
#line 236 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_hash_table_insert (_data_->_tmp38_, _data_->_tmp40_, _data_->_tmp41_);
#line 227 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->wsa1);
#line 1611 "link-personas.c"
		}
	}
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	memset (&_data_->_tmp42_, 0, sizeof (GValue));
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_value_init (&_data_->_tmp42_, G_TYPE_STRING);
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp43_ = _data_->_tmp42_;
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp44_ = __g_value_dup0 (&_data_->_tmp43_);
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp45_ = _data_->_tmp44_;
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp43_) ? (g_value_unset (&_data_->_tmp43_), NULL) : NULL;
#line 239 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->v2 = _data_->_tmp45_;
#line 240 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp46_ = _data_->v2;
#line 240 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp47_ = _data_->self->priv->_persona_fullname_1;
#line 240 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_value_set_string (_data_->_tmp46_, _data_->_tmp47_);
#line 241 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp48_ = _data_->details1;
#line 241 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp49_ = g_strdup ("full-name");
#line 241 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp50_ = _data_->v2;
#line 241 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->v2 = NULL;
#line 241 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_hash_table_insert (_data_->_tmp48_, _data_->_tmp49_, _data_->_tmp50_);
#line 243 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp51_ = g_str_hash;
#line 243 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp52_ = g_str_equal;
#line 243 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp53_ = g_hash_table_new_full (_data_->_tmp51_, _data_->_tmp52_, _g_free0_, __vala_GValue_free0_);
#line 243 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->details2 = _data_->_tmp53_;
#line 247 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp54_ = _data_->self->priv->_linking_method;
#line 247 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp54_ == LINKING_METHOD_IM_ADDRESSES) {
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		memset (&_data_->_tmp55_, 0, sizeof (GValue));
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_value_init (&_data_->_tmp55_, GEE_TYPE_MULTI_MAP);
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp56_ = _data_->_tmp55_;
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp57_ = __g_value_dup0 (&_data_->_tmp56_);
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v3);
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->v3 = _data_->_tmp57_;
#line 249 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		G_IS_VALUE (&_data_->_tmp56_) ? (g_value_unset (&_data_->_tmp56_), NULL) : NULL;
#line 250 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp58_ = 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 250 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->im_addrs2 = _data_->_tmp58_;
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp59_ = _data_->im_addrs2;
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp60_ = _data_->self->priv->_im_address_2;
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp61_ = folks_im_field_details_new (_data_->_tmp60_, NULL);
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp62_ = _data_->_tmp61_;
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		gee_multi_map_set ((GeeMultiMap*) _data_->_tmp59_, "yahoo", _data_->_tmp62_);
#line 254 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->_tmp62_);
#line 255 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp63_ = _data_->v3;
#line 255 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp64_ = _data_->im_addrs2;
#line 255 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_value_set_object (_data_->_tmp63_, (GObject*) _data_->_tmp64_);
#line 256 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp65_ = _data_->details2;
#line 256 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp66_ = g_strdup ("im-addresses");
#line 256 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp67_ = _data_->v3;
#line 256 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->v3 = NULL;
#line 256 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_hash_table_insert (_data_->_tmp65_, _data_->_tmp66_, _data_->_tmp67_);
#line 247 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs2);
#line 1704 "link-personas.c"
	} else {
#line 258 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp68_ = _data_->self->priv->_linking_method;
#line 258 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp68_ == LINKING_METHOD_WEB_SERVICE_ADDRESSES) {
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			memset (&_data_->_tmp69_, 0, sizeof (GValue));
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_value_init (&_data_->_tmp69_, GEE_TYPE_MULTI_MAP);
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp70_ = _data_->_tmp69_;
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp71_ = __g_value_dup0 (&_data_->_tmp70_);
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->v3 = _data_->_tmp71_;
#line 260 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			G_IS_VALUE (&_data_->_tmp70_) ? (g_value_unset (&_data_->_tmp70_), NULL) : NULL;
#line 261 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp72_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 261 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->wsa2 = _data_->_tmp72_;
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp73_ = _data_->wsa2;
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp74_ = _data_->self->priv->_im_address_2;
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp75_ = folks_web_service_field_details_new (_data_->_tmp74_, NULL);
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp76_ = _data_->_tmp75_;
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_multi_map_set ((GeeMultiMap*) _data_->_tmp73_, "lastfm", _data_->_tmp76_);
#line 265 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_tmp76_);
#line 266 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp77_ = _data_->v3;
#line 266 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp78_ = _data_->wsa2;
#line 266 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_value_set_object (_data_->_tmp77_, (GObject*) _data_->_tmp78_);
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp79_ = _data_->details2;
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp80_ = _data_->wsk;
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp81_ = g_strdup (_data_->_tmp80_);
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp82_ = _data_->v3;
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->v3 = NULL;
#line 267 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_hash_table_insert (_data_->_tmp79_, _data_->_tmp81_, _data_->_tmp82_);
#line 258 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->wsa2);
#line 1760 "link-personas.c"
		} else {
#line 269 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp83_ = _data_->self->priv->_linking_method;
#line 269 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_tmp83_ == LINKING_METHOD_EMAIL_AS_IM_ADDRESS) {
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				memset (&_data_->_tmp84_, 0, sizeof (GValue));
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				g_value_init (&_data_->_tmp84_, GEE_TYPE_SET);
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp85_ = _data_->_tmp84_;
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp86_ = __g_value_dup0 (&_data_->_tmp85_);
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				__vala_GValue_free0 (_data_->v3);
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->v3 = _data_->_tmp86_;
#line 271 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				G_IS_VALUE (&_data_->_tmp85_) ? (g_value_unset (&_data_->_tmp85_), NULL) : NULL;
#line 272 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp87_ = gee_hash_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 272 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->emails = _data_->_tmp87_;
#line 275 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp88_ = _data_->self->priv->_auto_linkable_email;
#line 275 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp89_ = folks_email_field_details_new (_data_->_tmp88_, NULL);
#line 275 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->email_1 = _data_->_tmp89_;
#line 276 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp90_ = _data_->emails;
#line 276 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp91_ = _data_->email_1;
#line 276 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp90_, _data_->_tmp91_);
#line 277 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp92_ = _data_->v3;
#line 277 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp93_ = _data_->emails;
#line 277 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				g_value_set_object (_data_->_tmp92_, (GObject*) _data_->_tmp93_);
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp94_ = _data_->details2;
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp95_ = NULL;
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp95_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_EMAIL_ADDRESSES);
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp96_ = g_strdup (_data_->_tmp95_);
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp97_ = _data_->v3;
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->v3 = NULL;
#line 278 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				g_hash_table_insert (_data_->_tmp94_, _data_->_tmp96_, _data_->_tmp97_);
#line 269 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (_data_->email_1);
#line 269 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (_data_->emails);
#line 1820 "link-personas.c"
			}
		}
	}
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	memset (&_data_->_tmp98_, 0, sizeof (GValue));
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_value_init (&_data_->_tmp98_, G_TYPE_STRING);
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp99_ = _data_->_tmp98_;
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp100_ = __g_value_dup0 (&_data_->_tmp99_);
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp101_ = _data_->_tmp100_;
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp99_) ? (g_value_unset (&_data_->_tmp99_), NULL) : NULL;
#line 283 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->v4 = _data_->_tmp101_;
#line 284 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp102_ = _data_->v4;
#line 284 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp103_ = _data_->self->priv->_persona_fullname_2;
#line 284 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_value_set_string (_data_->_tmp102_, _data_->_tmp103_);
#line 285 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp104_ = _data_->details2;
#line 285 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp105_ = g_strdup ("full-name");
#line 285 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp106_ = _data_->v4;
#line 285 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->v4 = NULL;
#line 285 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_hash_table_insert (_data_->_tmp104_, _data_->_tmp105_, _data_->_tmp106_);
#line 1854 "link-personas.c"
	{
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp107_ = _data_->self->priv->_aggregator;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp108_ = _data_->pstore1;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp109_ = _data_->details1;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_state_ = 1;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp107_, NULL, _data_->_tmp108_, _data_->_tmp109_, _link_personas_tests_add_personas_ready, _data_);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 1868 "link-personas.c"
		_state_1:
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp110_ = NULL;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp110_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp107_, _data_->_res_, &_data_->_inner_error_);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp111_ = _data_->_tmp110_;
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->_tmp111_);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1882 "link-personas.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_free0 (_data_->wsk);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 289 "/home/treitter/collabora/folks/tests/eds/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 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 289 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			return FALSE;
#line 1905 "link-personas.c"
		}
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp112_ = _data_->self->priv->_aggregator;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp113_ = _data_->pstore2;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp114_ = _data_->details2;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_state_ = 2;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp112_, NULL, _data_->_tmp113_, _data_->_tmp114_, _link_personas_tests_add_personas_ready, _data_);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 1919 "link-personas.c"
		_state_2:
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp115_ = NULL;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp115_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp112_, _data_->_res_, &_data_->_inner_error_);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp116_ = _data_->_tmp115_;
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->_tmp116_);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1933 "link-personas.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_free0 (_data_->wsk);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 292 "/home/treitter/collabora/folks/tests/eds/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 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 292 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			return FALSE;
#line 1956 "link-personas.c"
		}
	}
	goto __finally1;
	__catch1_folks_individual_aggregator_error:
	{
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 297 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp117_ = _data_->e;
#line 297 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp118_ = _data_->_tmp117_->message;
#line 297 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_warning ("link-personas.vala:297: [AddPersonaError] add_persona_from_details: %s" \
"\n", _data_->_tmp118_);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 1974 "link-personas.c"
	}
	__finally1:
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v4);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v3);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_hash_table_unref0 (_data_->details2);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v2);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_free0 (_data_->wsk);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		__vala_GValue_free0 (_data_->v1);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_hash_table_unref0 (_data_->details1);
#line 287 "/home/treitter/collabora/folks/tests/eds/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 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 287 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 1999 "link-personas.c"
	}
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	__vala_GValue_free0 (_data_->v4);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	__vala_GValue_free0 (_data_->v3);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_hash_table_unref0 (_data_->details2);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	__vala_GValue_free0 (_data_->v2);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (_data_->wsk);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	__vala_GValue_free0 (_data_->v1);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_hash_table_unref0 (_data_->details1);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2019 "link-personas.c"
	} else {
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2023 "link-personas.c"
	}
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 203 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return FALSE;
#line 2029 "link-personas.c"
}


static void _link_personas_tests_individuals_changed_cb (LinkPersonasTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
#line 302 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 302 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (changes != NULL);
#line 305 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = changes;
#line 305 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_individuals_changed_async (self, _tmp0_);
#line 2043 "link-personas.c"
}


static void _link_personas_tests_individuals_changed_async (LinkPersonasTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
#line 308 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 308 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_return_if_fail (changes != NULL);
#line 311 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = changes;
#line 311 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 311 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	added = _tmp1_;
#line 2061 "link-personas.c"
	{
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _i_it;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp2_ = added;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_i_it = _tmp3_;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		while (TRUE) {
#line 2074 "link-personas.c"
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp8_;
			LinkingMethod _tmp9_;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp4_ = _i_it;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (!_tmp5_) {
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				break;
#line 2090 "link-personas.c"
			}
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp6_ = _i_it;
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			i = (FolksIndividual*) _tmp7_;
#line 315 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp8_ = i;
#line 315 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_tmp8_ == NULL) {
#line 317 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (i);
#line 317 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				continue;
#line 2106 "link-personas.c"
			}
#line 320 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_tmp9_ = self->priv->_linking_method;
#line 320 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_tmp9_ == LINKING_METHOD_EMAIL_AS_IM_ADDRESS) {
#line 2112 "link-personas.c"
				FolksIndividual* _tmp10_;
#line 321 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_tmp10_ = i;
#line 321 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_link_personas_tests_check_auto_linked_personas (self, _tmp10_, NULL, NULL);
#line 2118 "link-personas.c"
			} else {
				FolksIndividual* _tmp11_;
#line 323 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_tmp11_ = i;
#line 323 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_link_personas_tests_check_personas (self, _tmp11_, NULL, NULL);
#line 2125 "link-personas.c"
			}
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (i);
#line 2129 "link-personas.c"
		}
#line 313 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_i_it);
#line 2133 "link-personas.c"
	}
#line 308 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (added);
#line 2137 "link-personas.c"
}


static void _link_personas_tests_check_personas_data_free (gpointer _data) {
	LinkPersonasTestsCheckPersonasData* _data_;
	_data_ = _data;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->i);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_slice_free (LinkPersonasTestsCheckPersonasData, _data_);
#line 2150 "link-personas.c"
}


static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsCheckPersonasData* _data_;
	LinkPersonasTests* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* _tmp2_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsCheckPersonasData);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_check_personas);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_check_personas_data_free);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->self = _tmp0_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = i;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->i = _tmp2_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_check_personas_co (_data_);
#line 2177 "link-personas.c"
}


static void _link_personas_tests_check_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsCheckPersonasData* _data_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 2185 "link-personas.c"
}


static void _link_personas_tests_check_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasTestsCheckPersonasData* _data_;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = _user_data_;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_source_object_ = source_object;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_res_ = _res_;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_check_personas_co (_data_);
#line 2199 "link-personas.c"
}


static gboolean _link_personas_tests_check_personas_co (LinkPersonasTestsCheckPersonasData* _data_) {
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	switch (_data_->_state_) {
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 0:
#line 2208 "link-personas.c"
		goto _state_0;
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 1:
#line 2212 "link-personas.c"
		goto _state_1;
		default:
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_assert_not_reached ();
#line 2217 "link-personas.c"
	}
	_state_0:
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp1_ = _data_->self->priv->_linking_props;
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp2_ = gee_map_get_size ((GeeMap*) _data_->_tmp1_);
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp3_ == 0) {
#line 340 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp4_ = _data_->self->priv->_linking_fired;
#line 340 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp0_ = _data_->_tmp4_;
#line 2232 "link-personas.c"
	} else {
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp0_ = FALSE;
#line 2236 "link-personas.c"
	}
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp5_ = _data_->_tmp0_;
#line 339 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp5_) {
#line 343 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_state_ == 0) {
#line 343 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2246 "link-personas.c"
		} else {
#line 343 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2250 "link-personas.c"
		}
#line 343 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_object_unref (_data_->_async_result);
#line 343 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 2256 "link-personas.c"
	}
#line 346 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->first_persona = NULL;
#line 2260 "link-personas.c"
	{
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp6_ = _data_->i;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp7_ = folks_individual_get_personas (_data_->_tmp6_);
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp9_ = NULL;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_p_it = _data_->_tmp9_;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		while (TRUE) {
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp10_ = _data_->_p_it;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp11_ = FALSE;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp11_ = gee_iterator_next (_data_->_tmp10_);
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (!_data_->_tmp11_) {
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				break;
#line 2286 "link-personas.c"
			}
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp12_ = _data_->_p_it;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp13_ = NULL;
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp13_ = gee_iterator_get (_data_->_tmp12_);
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->p = (FolksPersona*) _data_->_tmp13_;
#line 349 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp14_ = _data_->p;
#line 349 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
#line 349 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->first_persona);
#line 349 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->first_persona = _data_->_tmp15_;
#line 350 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->p);
#line 350 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			break;
#line 2308 "link-personas.c"
		}
#line 347 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_object_unref0 (_data_->_p_it);
#line 2312 "link-personas.c"
	}
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp17_ = _data_->i;
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp18_ = folks_name_details_get_full_name ((FolksNameDetails*) _data_->_tmp17_);
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp19_ = _data_->_tmp18_;
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp20_ = _data_->self->priv->_persona_fullname_1;
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (g_strcmp0 (_data_->_tmp19_, _data_->_tmp20_) == 0) {
#line 354 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp21_ = _data_->self->priv->_persona_iid_1;
#line 354 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp16_ = g_strcmp0 (_data_->_tmp21_, "") == 0;
#line 2328 "link-personas.c"
	} else {
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp16_ = FALSE;
#line 2332 "link-personas.c"
	}
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp22_ = _data_->_tmp16_;
#line 353 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp22_) {
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp23_ = _data_->first_persona;
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp24_ = folks_persona_get_iid (_data_->_tmp23_);
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp25_ = _data_->_tmp24_;
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp26_ = g_strdup (_data_->_tmp25_);
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_g_free0 (_data_->self->priv->_persona_iid_1);
#line 356 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->self->priv->_persona_iid_1 = _data_->_tmp26_;
#line 357 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp27_ = _data_->self->priv->_personas;
#line 357 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp28_ = _data_->first_persona;
#line 357 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp27_, _data_->_tmp28_);
#line 358 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp29_ = _data_->self->priv->_linking_method;
#line 358 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp29_ == LINKING_METHOD_LOCAL_IDS) {
#line 360 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp30_ = _data_->first_persona;
#line 360 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp31_ = folks_persona_get_iid ((FolksPersona*) EDSF_PERSONA (_data_->_tmp30_));
#line 360 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp32_ = _data_->_tmp31_;
#line 360 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp33_ = g_strdup (_data_->_tmp32_);
#line 360 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->contact_id1 = _data_->_tmp33_;
#line 361 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp34_ = _data_->self->priv->_linking_props;
#line 361 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp35_ = _data_->contact_id1;
#line 361 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp34_, "prop1", _data_->_tmp35_);
#line 358 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_free0 (_data_->contact_id1);
#line 2378 "link-personas.c"
		}
	} else {
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp37_ = _data_->i;
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp38_ = folks_name_details_get_full_name ((FolksNameDetails*) _data_->_tmp37_);
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp39_ = _data_->_tmp38_;
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp40_ = _data_->self->priv->_persona_fullname_2;
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (g_strcmp0 (_data_->_tmp39_, _data_->_tmp40_) == 0) {
#line 365 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp41_ = _data_->self->priv->_persona_iid_2;
#line 365 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp36_ = g_strcmp0 (_data_->_tmp41_, "") == 0;
#line 2395 "link-personas.c"
		} else {
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp36_ = FALSE;
#line 2399 "link-personas.c"
		}
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp42_ = _data_->_tmp36_;
#line 364 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_tmp42_) {
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp43_ = _data_->first_persona;
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp44_ = folks_persona_get_iid (_data_->_tmp43_);
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp45_ = _data_->_tmp44_;
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp46_ = g_strdup (_data_->_tmp45_);
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_free0 (_data_->self->priv->_persona_iid_2);
#line 367 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->self->priv->_persona_iid_2 = _data_->_tmp46_;
#line 368 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp47_ = _data_->self->priv->_personas;
#line 368 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp48_ = _data_->first_persona;
#line 368 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp47_, _data_->_tmp48_);
#line 369 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp49_ = _data_->self->priv->_linking_method;
#line 369 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_tmp49_ == LINKING_METHOD_LOCAL_IDS) {
#line 371 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp50_ = _data_->first_persona;
#line 371 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp51_ = folks_persona_get_iid ((FolksPersona*) EDSF_PERSONA (_data_->_tmp50_));
#line 371 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp52_ = _data_->_tmp51_;
#line 371 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp53_ = g_strdup (_data_->_tmp52_);
#line 371 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->contact_id2 = _data_->_tmp53_;
#line 372 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp54_ = _data_->self->priv->_linking_props;
#line 372 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp55_ = _data_->contact_id2;
#line 372 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp54_, "prop2", _data_->_tmp55_);
#line 369 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_free0 (_data_->contact_id2);
#line 2445 "link-personas.c"
			}
		} else {
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp56_ = _data_->i;
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp57_ = folks_individual_get_personas (_data_->_tmp56_);
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp58_ = _data_->_tmp57_;
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp59_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp58_);
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp60_ = _data_->_tmp59_;
#line 375 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_tmp60_ > 1) {
#line 378 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp61_ = _data_->self->priv->_linking_method;
#line 378 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				if (_data_->_tmp61_ == LINKING_METHOD_IM_ADDRESSES) {
#line 2464 "link-personas.c"
					{
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp62_ = _data_->i;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp63_ = folks_im_details_get_im_addresses ((FolksImDetails*) _data_->_tmp62_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp64_ = _data_->_tmp63_;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp65_ = NULL;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp65_ = gee_multi_map_get_keys (_data_->_tmp64_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp66_ = _data_->_tmp65_;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp67_ = NULL;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp67_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp66_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp68_ = _data_->_tmp67_;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_g_object_unref0 (_data_->_tmp66_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_proto_it = _data_->_tmp68_;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						while (TRUE) {
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp69_ = _data_->_proto_it;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp70_ = FALSE;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp70_ = gee_iterator_next (_data_->_tmp69_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							if (!_data_->_tmp70_) {
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								break;
#line 2500 "link-personas.c"
							}
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp71_ = _data_->_proto_it;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp72_ = NULL;
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp72_ = gee_iterator_get (_data_->_tmp71_);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->proto = (gchar*) _data_->_tmp72_;
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp73_ = _data_->i;
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp74_ = folks_im_details_get_im_addresses ((FolksImDetails*) _data_->_tmp73_);
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp75_ = _data_->_tmp74_;
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp76_ = _data_->proto;
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp77_ = NULL;
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp77_ = gee_multi_map_get (_data_->_tmp75_, _data_->_tmp76_);
#line 382 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->im_fds = _data_->_tmp77_;
#line 2524 "link-personas.c"
							{
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp78_ = _data_->im_fds;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp79_ = NULL;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp79_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp78_);
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_im_fd_it = _data_->_tmp79_;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								while (TRUE) {
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp80_ = _data_->_im_fd_it;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp81_ = FALSE;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp81_ = gee_iterator_next (_data_->_tmp80_);
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									if (!_data_->_tmp81_) {
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										break;
#line 2546 "link-personas.c"
									}
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp82_ = _data_->_im_fd_it;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp83_ = NULL;
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp83_ = gee_iterator_get (_data_->_tmp82_);
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->im_fd = (FolksImFieldDetails*) _data_->_tmp83_;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp84_ = _data_->im_fd;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp85_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp84_);
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp86_ = _data_->_tmp85_;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp87_ = _data_->self->priv->_linking_props;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp88_ = NULL;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp88_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp87_, "prop1");
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp89_ = (gchar*) _data_->_tmp88_;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp90_ = g_strcmp0 ((const gchar*) _data_->_tmp86_, _data_->_tmp89_) == 0;
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_g_free0 (_data_->_tmp89_);
#line 385 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									if (_data_->_tmp90_) {
#line 387 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp91_ = _data_->self->priv->_linking_props;
#line 387 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp91_, "prop1", NULL);
#line 2580 "link-personas.c"
									} else {
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp92_ = _data_->im_fd;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp93_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp92_);
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp94_ = _data_->_tmp93_;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp95_ = _data_->self->priv->_linking_props;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp96_ = NULL;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp96_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp95_, "prop2");
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp97_ = (gchar*) _data_->_tmp96_;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp98_ = g_strcmp0 ((const gchar*) _data_->_tmp94_, _data_->_tmp97_) == 0;
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_g_free0 (_data_->_tmp97_);
#line 389 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										if (_data_->_tmp98_) {
#line 391 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp99_ = _data_->self->priv->_linking_props;
#line 391 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp99_, "prop2", NULL);
#line 2606 "link-personas.c"
										}
									}
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_g_object_unref0 (_data_->im_fd);
#line 2611 "link-personas.c"
								}
#line 383 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_g_object_unref0 (_data_->_im_fd_it);
#line 2615 "link-personas.c"
							}
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_g_object_unref0 (_data_->im_fds);
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_g_free0 (_data_->proto);
#line 2621 "link-personas.c"
						}
#line 380 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_g_object_unref0 (_data_->_proto_it);
#line 2625 "link-personas.c"
					}
				} else {
#line 396 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp100_ = _data_->self->priv->_linking_method;
#line 396 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					if (_data_->_tmp100_ == LINKING_METHOD_LOCAL_IDS) {
#line 2632 "link-personas.c"
						{
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp101_ = _data_->i;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp102_ = folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) _data_->_tmp101_);
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp103_ = _data_->_tmp102_;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp104_ = NULL;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp104_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp103_);
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_local_id_it = _data_->_tmp104_;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							while (TRUE) {
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp105_ = _data_->_local_id_it;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp106_ = FALSE;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp106_ = gee_iterator_next (_data_->_tmp105_);
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								if (!_data_->_tmp106_) {
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									break;
#line 2658 "link-personas.c"
								}
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp107_ = _data_->_local_id_it;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp108_ = NULL;
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp108_ = gee_iterator_get (_data_->_tmp107_);
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->local_id = (gchar*) _data_->_tmp108_;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp109_ = _data_->local_id;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp110_ = _data_->self->priv->_linking_props;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp111_ = NULL;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp111_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp110_, "prop1");
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp112_ = (gchar*) _data_->_tmp111_;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp113_ = g_strcmp0 (_data_->_tmp109_, _data_->_tmp112_) == 0;
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_g_free0 (_data_->_tmp112_);
#line 400 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								if (_data_->_tmp113_) {
#line 402 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp114_ = _data_->self->priv->_linking_props;
#line 402 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp114_, "prop1", NULL);
#line 2688 "link-personas.c"
								} else {
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp115_ = _data_->local_id;
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp116_ = _data_->self->priv->_linking_props;
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp117_ = NULL;
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp117_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp116_, "prop2");
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp118_ = (gchar*) _data_->_tmp117_;
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp119_ = g_strcmp0 (_data_->_tmp115_, _data_->_tmp118_) == 0;
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_g_free0 (_data_->_tmp118_);
#line 404 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									if (_data_->_tmp119_) {
#line 406 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp120_ = _data_->self->priv->_linking_props;
#line 406 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp120_, "prop2", NULL);
#line 2710 "link-personas.c"
									}
								}
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_g_free0 (_data_->local_id);
#line 2715 "link-personas.c"
							}
#line 398 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_g_object_unref0 (_data_->_local_id_it);
#line 2719 "link-personas.c"
						}
					} else {
#line 410 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp121_ = _data_->self->priv->_linking_method;
#line 410 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						if (_data_->_tmp121_ == LINKING_METHOD_WEB_SERVICE_ADDRESSES) {
#line 2726 "link-personas.c"
							{
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp122_ = _data_->i;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp123_ = folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) _data_->_tmp122_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp124_ = _data_->_tmp123_;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp125_ = NULL;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp125_ = gee_multi_map_get_keys (_data_->_tmp124_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp126_ = _data_->_tmp125_;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp127_ = NULL;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp127_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp126_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_tmp128_ = _data_->_tmp127_;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_g_object_unref0 (_data_->_tmp126_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_data_->_service_it = _data_->_tmp128_;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								while (TRUE) {
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp129_ = _data_->_service_it;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp130_ = FALSE;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp130_ = gee_iterator_next (_data_->_tmp129_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									if (!_data_->_tmp130_) {
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										break;
#line 2762 "link-personas.c"
									}
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp131_ = _data_->_service_it;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp132_ = NULL;
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp132_ = gee_iterator_get (_data_->_tmp131_);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->service = (gchar*) _data_->_tmp132_;
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp133_ = _data_->i;
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp134_ = folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) _data_->_tmp133_);
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp135_ = _data_->_tmp134_;
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp136_ = _data_->service;
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp137_ = NULL;
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->_tmp137_ = gee_multi_map_get (_data_->_tmp135_, _data_->_tmp136_);
#line 414 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_data_->ws_fds = _data_->_tmp137_;
#line 2786 "link-personas.c"
									{
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp138_ = _data_->ws_fds;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp139_ = NULL;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_tmp139_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp138_);
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_data_->_ws_fd_it = _data_->_tmp139_;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										while (TRUE) {
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp140_ = _data_->_ws_fd_it;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp141_ = FALSE;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp141_ = gee_iterator_next (_data_->_tmp140_);
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											if (!_data_->_tmp141_) {
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												break;
#line 2808 "link-personas.c"
											}
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp142_ = _data_->_ws_fd_it;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp143_ = NULL;
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp143_ = gee_iterator_get (_data_->_tmp142_);
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->ws_fd = (FolksWebServiceFieldDetails*) _data_->_tmp143_;
#line 417 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp144_ = _data_->self->priv->_linking_props;
#line 417 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp145_ = NULL;
#line 417 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp145_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp144_, "prop1");
#line 417 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->prop1 = (gchar*) _data_->_tmp145_;
#line 418 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp146_ = _data_->self->priv->_linking_props;
#line 418 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp147_ = NULL;
#line 418 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp147_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp146_, "prop2");
#line 418 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->prop2 = (gchar*) _data_->_tmp147_;
#line 419 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp149_ = _data_->prop1;
#line 419 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											if (_data_->_tmp149_ != NULL) {
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp150_ = _data_->ws_fd;
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp151_ = _data_->prop1;
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp152_ = folks_web_service_field_details_new (_data_->_tmp151_, NULL);
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp153_ = _data_->_tmp152_;
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp154_ = FALSE;
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp154_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _data_->_tmp150_, (FolksAbstractFieldDetails*) _data_->_tmp153_);
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp148_ = _data_->_tmp154_;
#line 420 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_g_object_unref0 (_data_->_tmp153_);
#line 2854 "link-personas.c"
											} else {
#line 419 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp148_ = FALSE;
#line 2858 "link-personas.c"
											}
#line 419 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_data_->_tmp155_ = _data_->_tmp148_;
#line 419 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											if (_data_->_tmp155_) {
#line 422 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp156_ = _data_->self->priv->_linking_props;
#line 422 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp156_, "prop1", NULL);
#line 2868 "link-personas.c"
											} else {
#line 424 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp158_ = _data_->prop2;
#line 424 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												if (_data_->_tmp158_ != NULL) {
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp159_ = _data_->ws_fd;
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp160_ = _data_->prop2;
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp161_ = folks_web_service_field_details_new (_data_->_tmp160_, NULL);
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp162_ = _data_->_tmp161_;
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp163_ = FALSE;
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp163_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _data_->_tmp159_, (FolksAbstractFieldDetails*) _data_->_tmp162_);
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp157_ = _data_->_tmp163_;
#line 425 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_g_object_unref0 (_data_->_tmp162_);
#line 2890 "link-personas.c"
												} else {
#line 424 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp157_ = FALSE;
#line 2894 "link-personas.c"
												}
#line 424 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												_data_->_tmp164_ = _data_->_tmp157_;
#line 424 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
												if (_data_->_tmp164_) {
#line 427 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													_data_->_tmp165_ = _data_->self->priv->_linking_props;
#line 427 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
													gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp165_, "prop2", NULL);
#line 2904 "link-personas.c"
												}
											}
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_g_free0 (_data_->prop2);
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_g_free0 (_data_->prop1);
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
											_g_object_unref0 (_data_->ws_fd);
#line 2913 "link-personas.c"
										}
#line 415 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
										_g_object_unref0 (_data_->_ws_fd_it);
#line 2917 "link-personas.c"
									}
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_g_object_unref0 (_data_->ws_fds);
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
									_g_free0 (_data_->service);
#line 2923 "link-personas.c"
								}
#line 412 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
								_g_object_unref0 (_data_->_service_it);
#line 2927 "link-personas.c"
							}
						}
					}
				}
#line 433 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp166_ = _data_->self->priv->_linking_props;
#line 433 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp167_ = gee_map_get_size ((GeeMap*) _data_->_tmp166_);
#line 433 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp168_ = _data_->_tmp167_;
#line 433 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				if (_data_->_tmp168_ == 0) {
#line 435 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp169_ = _data_->self->priv->_main_loop;
#line 435 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					g_main_loop_quit (_data_->_tmp169_);
#line 2944 "link-personas.c"
				}
			}
		}
	}
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp171_ = _data_->self->priv->_personas;
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp172_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp171_);
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp173_ = _data_->_tmp172_;
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp173_ == 2) {
#line 442 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp174_ = _data_->self->priv->_linking_fired;
#line 442 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp170_ = _data_->_tmp174_ == FALSE;
#line 2961 "link-personas.c"
	} else {
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp170_ = FALSE;
#line 2965 "link-personas.c"
	}
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp175_ = _data_->_tmp170_;
#line 441 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp175_) {
#line 444 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->self->priv->_linking_fired = TRUE;
#line 2973 "link-personas.c"
		{
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp176_ = _data_->self->priv->_aggregator;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp177_ = _data_->self->priv->_personas;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_state_ = 1;
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			folks_individual_aggregator_link_personas (_data_->_tmp176_, (GeeSet*) _data_->_tmp177_, _link_personas_tests_check_personas_ready, _data_);
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			return FALSE;
#line 2985 "link-personas.c"
			_state_1:
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			folks_individual_aggregator_link_personas_finish (_data_->_tmp176_, _data_->_res_, &_data_->_inner_error_);
#line 447 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			if (_data_->_inner_error_ != NULL) {
#line 2991 "link-personas.c"
				goto __catch2_g_error;
			}
		}
		goto __finally2;
		__catch2_g_error:
		{
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->e = _data_->_inner_error_;
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_inner_error_ = NULL;
#line 451 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp178_ = _data_->e;
#line 451 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp179_ = _data_->_tmp178_->message;
#line 451 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_warning ("link-personas.vala:451: link_personas: %s\n", _data_->_tmp179_);
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_error_free0 (_data_->e);
#line 3010 "link-personas.c"
		}
		__finally2:
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->first_persona);
#line 445 "/home/treitter/collabora/folks/tests/eds/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 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 445 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			return FALSE;
#line 3023 "link-personas.c"
		}
	}
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->first_persona);
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3032 "link-personas.c"
	} else {
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 3036 "link-personas.c"
	}
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 337 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return FALSE;
#line 3042 "link-personas.c"
}


static void _link_personas_tests_check_auto_linked_personas_data_free (gpointer _data) {
	LinkPersonasTestsCheckAutoLinkedPersonasData* _data_;
	_data_ = _data;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->i);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_slice_free (LinkPersonasTestsCheckAutoLinkedPersonasData, _data_);
#line 3055 "link-personas.c"
}


static void _link_personas_tests_check_auto_linked_personas (LinkPersonasTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsCheckAutoLinkedPersonasData* _data_;
	LinkPersonasTests* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* _tmp2_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsCheckAutoLinkedPersonasData);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_check_auto_linked_personas);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_check_auto_linked_personas_data_free);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->self = _tmp0_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = i;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->i = _tmp2_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_link_personas_tests_check_auto_linked_personas_co (_data_);
#line 3082 "link-personas.c"
}


static void _link_personas_tests_check_auto_linked_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsCheckAutoLinkedPersonasData* _data_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 3090 "link-personas.c"
}


static gboolean _link_personas_tests_check_auto_linked_personas_co (LinkPersonasTestsCheckAutoLinkedPersonasData* _data_) {
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	switch (_data_->_state_) {
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		case 0:
#line 3099 "link-personas.c"
		goto _state_0;
		default:
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_assert_not_reached ();
#line 3104 "link-personas.c"
	}
	_state_0:
#line 464 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp0_ = _data_->self->priv->_linking_props;
#line 464 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp1_ = gee_map_get_size ((GeeMap*) _data_->_tmp0_);
#line 464 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 464 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp2_ == 0) {
#line 467 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		if (_data_->_state_ == 0) {
#line 467 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3119 "link-personas.c"
		} else {
#line 467 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 3123 "link-personas.c"
		}
#line 467 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_object_unref (_data_->_async_result);
#line 467 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		return FALSE;
#line 3129 "link-personas.c"
	}
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp3_ = _data_->i;
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp4_ = folks_individual_get_personas (_data_->_tmp3_);
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp6_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp5_);
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 470 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp7_ > 1) {
#line 3143 "link-personas.c"
		{
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp8_ = _data_->i;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp9_ = folks_email_details_get_email_addresses ((FolksEmailDetails*) _data_->_tmp8_);
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp10_ = _data_->_tmp9_;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp11_ = NULL;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp11_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp10_);
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_email_it = _data_->_tmp11_;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			while (TRUE) {
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp12_ = _data_->_email_it;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp13_ = FALSE;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp13_ = gee_iterator_next (_data_->_tmp12_);
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				if (!_data_->_tmp13_) {
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					break;
#line 3169 "link-personas.c"
				}
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp14_ = _data_->_email_it;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp15_ = NULL;
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp15_ = gee_iterator_get (_data_->_tmp14_);
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->email = (FolksEmailFieldDetails*) _data_->_tmp15_;
#line 474 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp16_ = _data_->email;
#line 474 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp17_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp16_);
#line 474 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp18_ = _data_->_tmp17_;
#line 474 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp19_ = _data_->self->priv->_auto_linkable_email;
#line 474 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				if (g_strcmp0 ((const gchar*) _data_->_tmp18_, _data_->_tmp19_) == 0) {
#line 476 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp20_ = _data_->self->priv->_linking_props;
#line 476 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp20_, "prop1", NULL);
#line 3193 "link-personas.c"
				}
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (_data_->email);
#line 3197 "link-personas.c"
			}
#line 472 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_email_it);
#line 3201 "link-personas.c"
		}
		{
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp21_ = _data_->i;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp22_ = folks_im_details_get_im_addresses ((FolksImDetails*) _data_->_tmp21_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp23_ = _data_->_tmp22_;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp24_ = NULL;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp24_ = gee_multi_map_get_keys (_data_->_tmp23_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp25_ = _data_->_tmp24_;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp26_ = NULL;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp26_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp25_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_tmp27_ = _data_->_tmp26_;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_tmp25_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_data_->_proto1_it = _data_->_tmp27_;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			while (TRUE) {
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp28_ = _data_->_proto1_it;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp29_ = FALSE;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp29_ = gee_iterator_next (_data_->_tmp28_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				if (!_data_->_tmp29_) {
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					break;
#line 3238 "link-personas.c"
				}
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp30_ = _data_->_proto1_it;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp31_ = NULL;
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp31_ = gee_iterator_get (_data_->_tmp30_);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->proto1 = (gchar*) _data_->_tmp31_;
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp32_ = _data_->i;
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp33_ = folks_im_details_get_im_addresses ((FolksImDetails*) _data_->_tmp32_);
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp34_ = _data_->_tmp33_;
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp35_ = _data_->proto1;
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp36_ = NULL;
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->_tmp36_ = gee_multi_map_get (_data_->_tmp34_, _data_->_tmp35_);
#line 482 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_data_->im_fds1 = _data_->_tmp36_;
#line 3262 "link-personas.c"
				{
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp37_ = _data_->im_fds1;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp38_ = NULL;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_tmp38_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp37_);
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_data_->_im_fd1_it = _data_->_tmp38_;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					while (TRUE) {
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp39_ = _data_->_im_fd1_it;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp40_ = FALSE;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp40_ = gee_iterator_next (_data_->_tmp39_);
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						if (!_data_->_tmp40_) {
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							break;
#line 3284 "link-personas.c"
						}
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp41_ = _data_->_im_fd1_it;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp42_ = NULL;
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp42_ = gee_iterator_get (_data_->_tmp41_);
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->im_fd1 = (FolksImFieldDetails*) _data_->_tmp42_;
#line 485 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp43_ = _data_->im_fd1;
#line 485 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp44_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp43_);
#line 485 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp45_ = _data_->_tmp44_;
#line 485 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_data_->_tmp46_ = _data_->self->priv->_auto_linkable_email;
#line 485 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						if (g_strcmp0 ((const gchar*) _data_->_tmp45_, _data_->_tmp46_) == 0) {
#line 487 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							_data_->_tmp47_ = _data_->self->priv->_linking_props;
#line 487 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
							gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp47_, "prop2", NULL);
#line 3308 "link-personas.c"
						}
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
						_g_object_unref0 (_data_->im_fd1);
#line 3312 "link-personas.c"
					}
#line 483 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
					_g_object_unref0 (_data_->_im_fd1_it);
#line 3316 "link-personas.c"
				}
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_object_unref0 (_data_->im_fds1);
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
				_g_free0 (_data_->proto1);
#line 3322 "link-personas.c"
			}
#line 480 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
			_g_object_unref0 (_data_->_proto1_it);
#line 3326 "link-personas.c"
		}
	}
#line 493 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp48_ = _data_->self->priv->_linking_props;
#line 493 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp49_ = gee_map_get_size ((GeeMap*) _data_->_tmp48_);
#line 493 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_data_->_tmp50_ = _data_->_tmp49_;
#line 493 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_tmp50_ == 0) {
#line 495 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		_data_->_tmp51_ = _data_->self->priv->_main_loop;
#line 495 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_main_loop_quit (_data_->_tmp51_);
#line 3341 "link-personas.c"
	}
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3347 "link-personas.c"
	} else {
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 3351 "link-personas.c"
	}
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 462 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return FALSE;
#line 3357 "link-personas.c"
}


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


static void link_personas_tests_instance_init (LinkPersonasTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv = LINK_PERSONAS_TESTS_GET_PRIVATE (self);
#line 40 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = g_strdup ("someone-1@jabber.example.org");
#line 40 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_im_address_1 = _tmp0_;
#line 41 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = g_strdup ("someone-2@jabber.example.org");
#line 41 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_im_address_2 = _tmp1_;
#line 42 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = g_strdup ("the.cool.dude@gmail.tld");
#line 42 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self->priv->_auto_linkable_email = _tmp2_;
#line 3394 "link-personas.c"
}


static void link_personas_tests_finalize (GObject* obj) {
	LinkPersonasTests * self;
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	self = LINK_PERSONAS_TESTS (obj);
#line 35 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 36 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 37 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 38 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 39 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 40 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_im_address_1);
#line 41 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_im_address_2);
#line 42 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_auto_linkable_email);
#line 46 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_1);
#line 47 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_2);
#line 48 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 49 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 33 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	G_OBJECT_CLASS (link_personas_tests_parent_class)->finalize (obj);
#line 3428 "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 502 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_test_init (&args_length1, &args, NULL);
#line 504 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp0_ = g_test_get_root ();
#line 504 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	root = _tmp0_;
#line 505 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp1_ = link_personas_tests_new ();
#line 505 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp2_ = _tmp1_;
#line 505 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 505 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 505 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	_g_object_unref0 (_tmp2_);
#line 507 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	g_test_run ();
#line 509 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	result = 0;
#line 509 "/home/treitter/collabora/folks/tests/eds/link-personas.vala"
	return result;
#line 3473 "link-personas.c"
}


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



