/* set-im-addresses.c generated by valac 0.13.4, the Vala compiler
 * generated from set-im-addresses.vala, do not modify */

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

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


#define TYPE_SET_IM_ADDRESSES_TESTS (set_im_addresses_tests_get_type ())
#define SET_IM_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTests))
#define SET_IM_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsClass))
#define IS_SET_IM_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_IM_ADDRESSES_TESTS))
#define IS_SET_IM_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_IM_ADDRESSES_TESTS))
#define SET_IM_ADDRESSES_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsClass))

typedef struct _SetIMAddressesTests SetIMAddressesTests;
typedef struct _SetIMAddressesTestsClass SetIMAddressesTestsClass;
typedef struct _SetIMAddressesTestsPrivate SetIMAddressesTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _tracker_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (tracker_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SetImAddressesTestsTestSetImAddressesAsyncData SetImAddressesTestsTestSetImAddressesAsyncData;

struct _SetIMAddressesTests {
	FolksTestCase parent_instance;
	SetIMAddressesTestsPrivate * priv;
};

struct _SetIMAddressesTestsClass {
	FolksTestCaseClass parent_class;
};

struct _SetIMAddressesTestsPrivate {
	GMainLoop* _main_loop;
	TrackerTestBackend* _tracker_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname;
	GList* _addresses;
	gboolean _initial_individual_found;
};

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


static gpointer set_im_addresses_tests_parent_class = NULL;

GType set_im_addresses_tests_get_type (void) G_GNUC_CONST;
#define SET_IM_ADDRESSES_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsPrivate))
enum  {
	SET_IM_ADDRESSES_TESTS_DUMMY_PROPERTY
};
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
SetIMAddressesTests* set_im_addresses_tests_new (void);
SetIMAddressesTests* set_im_addresses_tests_construct (GType object_type);
void set_im_addresses_tests_test_set_im_addresses (SetIMAddressesTests* self);
static void _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method (gpointer self);
static void set_im_addresses_tests_real_set_up (FolksTestCase* base);
static void set_im_addresses_tests_real_tear_down (FolksTestCase* base);
static void _set_im_addresses_tests_test_set_im_addresses_async (SetIMAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_im_addresses_tests_test_set_im_addresses_finish (SetIMAddressesTests* self, GAsyncResult* _res_);
static gboolean __lambda0_ (SetIMAddressesTests* self);
static gboolean ___lambda0__gsource_func (gpointer self);
static void _set_im_addresses_tests_test_set_im_addresses_async_data_free (gpointer _data);
static gboolean _set_im_addresses_tests_test_set_im_addresses_async_co (SetImAddressesTestsTestSetImAddressesAsyncData* _data_);
static void _set_im_addresses_tests_test_set_im_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _set_im_addresses_tests_individuals_changed_cb (SetIMAddressesTests* self, GeeMultiMap* changes);
static void __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_im_addresses_tests_notify_im_addresses_cb (SetIMAddressesTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _set_im_addresses_tests_check_im_addresses (SetIMAddressesTests* self, FolksIndividual* i);
static void set_im_addresses_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _g_free0_ (gpointer var) {
#line 32 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	var = (g_free (var), NULL);
#line 125 "set-im-addresses.c"
}


static void _g_list_free__g_free0_ (GList* self) {
#line 32 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
#line 32 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_list_free (self);
#line 134 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method (gpointer self) {
#line 42 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	set_im_addresses_tests_test_set_im_addresses (self);
#line 141 "set-im-addresses.c"
}


SetIMAddressesTests* set_im_addresses_tests_construct (GType object_type) {
	SetIMAddressesTests * self = NULL;
	TrackerTestBackend* _tmp0_;
#line 38 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self = (SetIMAddressesTests*) folks_test_case_construct (object_type, "SetIMAddressesTests");
#line 40 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = tracker_test_backend_new ();
#line 40 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 40 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_tracker_backend = _tmp0_;
#line 42 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test setting im_addresses ", _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method, self);
#line 36 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return self;
#line 160 "set-im-addresses.c"
}


SetIMAddressesTests* set_im_addresses_tests_new (void) {
#line 36 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return set_im_addresses_tests_construct (TYPE_SET_IM_ADDRESSES_TESTS);
#line 167 "set-im-addresses.c"
}


static void set_im_addresses_tests_real_set_up (FolksTestCase* base) {
	SetIMAddressesTests * self;
#line 45 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self = (SetIMAddressesTests*) base;
#line 175 "set-im-addresses.c"
}


static void set_im_addresses_tests_real_tear_down (FolksTestCase* base) {
	SetIMAddressesTests * self;
#line 49 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self = (SetIMAddressesTests*) base;
#line 183 "set-im-addresses.c"
}


static gboolean __lambda0_ (SetIMAddressesTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 75 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = self->priv->_main_loop;
#line 75 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_main_loop_quit (_tmp0_);
#line 76 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_assert_not_reached ();
#line 73 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 198 "set-im-addresses.c"
}


static gboolean ___lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda0_ (self);
#line 73 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 207 "set-im-addresses.c"
}


void set_im_addresses_tests_test_set_im_addresses (SetIMAddressesTests* self) {
	GMainLoop* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* c1;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	TrackerTestBackend* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	TrackerTestBackend* _tmp9_;
	GMainLoop* _tmp10_;
	gboolean _tmp11_;
	GList* _tmp12_;
	guint _tmp13_ = 0U;
	TrackerTestBackend* _tmp14_;
#line 53 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 55 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_initial_individual_found = FALSE;
#line 56 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 56 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 56 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_main_loop = _tmp0_;
#line 57 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 57 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	c1 = _tmp1_;
#line 59 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp2_ = g_strdup ("persona #1");
#line 59 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 59 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_persona_fullname = _tmp2_;
#line 61 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp3_ = self->priv->_persona_fullname;
#line 61 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, TRF_ONTOLOGY_DEFS_NCO_FULLNAME, _tmp3_);
#line 62 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp4_ = self->priv->_tracker_backend;
#line 62 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	tracker_test_backend_add_contact (_tmp4_, c1);
#line 64 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp5_ = g_strdup ("one@example.org");
#line 64 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp5_);
#line 65 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp6_ = g_strdup ("two@example.org");
#line 65 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp6_);
#line 66 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp7_ = g_strdup ("three@example.org");
#line 66 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp7_);
#line 67 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp8_ = g_strdup ("four@example.org");
#line 67 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp8_);
#line 69 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp9_ = self->priv->_tracker_backend;
#line 69 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	tracker_test_backend_set_up (_tmp9_);
#line 71 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async (self, NULL, NULL);
#line 73 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda0__gsource_func, g_object_ref (self), g_object_unref);
#line 79 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp10_ = self->priv->_main_loop;
#line 79 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_main_loop_run (_tmp10_);
#line 81 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp11_ = self->priv->_initial_individual_found;
#line 81 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_assert (_tmp11_);
#line 82 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp12_ = self->priv->_addresses;
#line 82 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp13_ = g_list_length (_tmp12_);
#line 82 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_assert (_tmp13_ == ((guint) 0));
#line 84 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp14_ = self->priv->_tracker_backend;
#line 84 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	tracker_test_backend_tear_down (_tmp14_);
#line 53 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (c1);
#line 300 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async_data_free (gpointer _data) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
	_data_ = _data;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_slice_free (SetImAddressesTestsTestSetImAddressesAsyncData, _data_);
#line 311 "set-im-addresses.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return self ? g_object_ref (self) : NULL;
#line 318 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async (SetIMAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
	SetIMAddressesTests* _tmp0_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_ = g_slice_new0 (SetImAddressesTestsTestSetImAddressesAsyncData);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_im_addresses_tests_test_set_im_addresses_async);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_im_addresses_tests_test_set_im_addresses_async_data_free);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->self = _tmp0_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async_co (_data_);
#line 337 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_finish (SetIMAddressesTests* self, GAsyncResult* _res_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 345 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_ = _user_data_;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_source_object_ = source_object;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_res_ = _res_;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async_co (_data_);
#line 359 "set-im-addresses.c"
}


static void __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 92 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_individuals_changed_cb (self, changes);
#line 366 "set-im-addresses.c"
}


static gboolean _set_im_addresses_tests_test_set_im_addresses_async_co (SetImAddressesTestsTestSetImAddressesAsyncData* _data_) {
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	switch (_data_->_state_) {
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		case 0:
#line 375 "set-im-addresses.c"
		goto _state_0;
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		case 1:
#line 379 "set-im-addresses.c"
		goto _state_1;
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		case 2:
#line 383 "set-im-addresses.c"
		goto _state_2;
		default:
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_assert_not_reached ();
#line 388 "set-im-addresses.c"
	}
	_state_0:
#line 89 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp0_ = NULL;
#line 89 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 89 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->store = _data_->_tmp0_;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_state_ = 1;
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	folks_backend_store_prepare (_data_->store, _set_im_addresses_tests_test_set_im_addresses_async_ready, _data_);
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return FALSE;
#line 403 "set-im-addresses.c"
	_state_1:
#line 90 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 91 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp1_ = folks_individual_aggregator_new ();
#line 91 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 91 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 92 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 92 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 417 "set-im-addresses.c"
	{
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->_state_ = 2;
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _set_im_addresses_tests_test_set_im_addresses_async_ready, _data_);
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		return FALSE;
#line 427 "set-im-addresses.c"
		_state_2:
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 96 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		if (_data_->_inner_error_ != NULL) {
#line 433 "set-im-addresses.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->e = _data_->_inner_error_;
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->_inner_error_ = NULL;
#line 100 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp4_ = _data_->e;
#line 100 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 100 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_warning ("set-im-addresses.vala:100: Error when calling prepare: %s\n", _data_->_tmp5_);
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_g_error_free0 (_data_->e);
#line 452 "set-im-addresses.c"
	}
	__finally0:
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	if (_data_->_inner_error_ != NULL) {
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_data_->store);
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.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 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_clear_error (&_data_->_inner_error_);
#line 94 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		return FALSE;
#line 465 "set-im-addresses.c"
	}
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->store);
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	if (_data_->_state_ == 0) {
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 473 "set-im-addresses.c"
	} else {
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 477 "set-im-addresses.c"
	}
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_object_unref (_data_->_async_result);
#line 87 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return FALSE;
#line 483 "set-im-addresses.c"
}


static void __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 119 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_notify_im_addresses_cb (self, _sender, pspec);
#line 490 "set-im-addresses.c"
}


static void _set_im_addresses_tests_individuals_changed_cb (SetIMAddressesTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
#line 104 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 104 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (changes != NULL);
#line 107 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = changes;
#line 107 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 107 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	added = _tmp1_;
#line 508 "set-im-addresses.c"
	{
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _i_it;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp2_ = added;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_i_it = _tmp3_;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		while (TRUE) {
#line 521 "set-im-addresses.c"
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp8_;
			FolksIndividual* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			gboolean _tmp13_;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp4_ = _i_it;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp5_) {
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				break;
#line 541 "set-im-addresses.c"
			}
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp6_ = _i_it;
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			i = (FolksIndividual*) _tmp7_;
#line 111 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp8_ = i;
#line 111 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			g_assert (_tmp8_ != NULL);
#line 113 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp9_ = i;
#line 113 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp10_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp9_);
#line 113 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp11_ = _tmp10_;
#line 113 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp12_ = self->priv->_persona_fullname;
#line 113 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			if (g_strcmp0 (_tmp11_, _tmp12_) != 0) {
#line 114 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (i);
#line 114 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				continue;
#line 567 "set-im-addresses.c"
			}
#line 116 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp13_ = self->priv->_initial_individual_found;
#line 116 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp13_) {
#line 573 "set-im-addresses.c"
				FolksIndividual* _tmp14_;
				GeeHashMultiMap* _tmp15_;
				GeeHashMultiMap* im_addresses;
				GeeHashMultiMap* _tmp16_;
				FolksImFieldDetails* _tmp17_;
				FolksImFieldDetails* _tmp18_;
				GeeHashMultiMap* _tmp19_;
				FolksImFieldDetails* _tmp20_;
				FolksImFieldDetails* _tmp21_;
				GeeHashMultiMap* _tmp22_;
				FolksImFieldDetails* _tmp23_;
				FolksImFieldDetails* _tmp24_;
				GeeHashMultiMap* _tmp25_;
				FolksImFieldDetails* _tmp26_;
				FolksImFieldDetails* _tmp27_;
#line 118 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				self->priv->_initial_individual_found = TRUE;
#line 119 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp14_ = i;
#line 119 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				g_signal_connect_object ((GObject*) _tmp14_, "notify::im-addresses", (GCallback) __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify, self, 0);
#line 121 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp15_ = 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 121 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				im_addresses = _tmp15_;
#line 126 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp16_ = im_addresses;
#line 126 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp17_ = folks_im_field_details_new ("one@example.org", NULL);
#line 126 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp18_ = _tmp17_;
#line 126 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp16_, "aim", _tmp18_);
#line 126 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp18_);
#line 127 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp19_ = im_addresses;
#line 127 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp20_ = folks_im_field_details_new ("two@example.org", NULL);
#line 127 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp21_ = _tmp20_;
#line 127 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp19_, "aim", _tmp21_);
#line 127 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp21_);
#line 129 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp22_ = im_addresses;
#line 129 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp23_ = folks_im_field_details_new ("three@example.org", NULL);
#line 129 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp24_ = _tmp23_;
#line 129 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp22_, "yahoo", _tmp24_);
#line 129 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp24_);
#line 131 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp25_ = im_addresses;
#line 131 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp26_ = folks_im_field_details_new ("four@example.org", NULL);
#line 131 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp27_ = _tmp26_;
#line 131 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp25_, "yahoo", _tmp27_);
#line 131 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp27_);
#line 639 "set-im-addresses.c"
				{
					FolksIndividual* _tmp28_;
					GeeSet* _tmp29_;
					GeeSet* _tmp30_;
					GeeIterator* _tmp31_ = NULL;
					GeeIterator* _p_it;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp28_ = i;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp29_ = folks_individual_get_personas (_tmp28_);
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp30_ = _tmp29_;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp31_ = gee_iterable_iterator ((GeeIterable*) _tmp30_);
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_p_it = _tmp31_;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					while (TRUE) {
#line 658 "set-im-addresses.c"
						GeeIterator* _tmp32_;
						gboolean _tmp33_ = FALSE;
						GeeIterator* _tmp34_;
						gpointer _tmp35_ = NULL;
						FolksPersona* p;
						FolksPersona* _tmp36_;
						GeeHashMultiMap* _tmp37_;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp32_ = _p_it;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp33_ = gee_iterator_next (_tmp32_);
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						if (!_tmp33_) {
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
							break;
#line 674 "set-im-addresses.c"
						}
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp34_ = _p_it;
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp35_ = gee_iterator_get (_tmp34_);
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						p = (FolksPersona*) _tmp35_;
#line 136 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp36_ = p;
#line 136 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_tmp37_ = im_addresses;
#line 136 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						folks_im_details_set_im_addresses (FOLKS_IM_DETAILS (_tmp36_), (GeeMultiMap*) _tmp37_);
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						_g_object_unref0 (p);
#line 690 "set-im-addresses.c"
					}
#line 134 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_g_object_unref0 (_p_it);
#line 694 "set-im-addresses.c"
				}
#line 116 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (im_addresses);
#line 698 "set-im-addresses.c"
			} else {
				FolksIndividual* _tmp38_;
				FolksIndividual* _tmp39_;
#line 141 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp38_ = i;
#line 141 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				g_signal_connect_object ((GObject*) _tmp38_, "notify::im-addresses", (GCallback) __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify, self, 0);
#line 142 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp39_ = i;
#line 142 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_set_im_addresses_tests_check_im_addresses (self, _tmp39_);
#line 710 "set-im-addresses.c"
			}
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_g_object_unref0 (i);
#line 714 "set-im-addresses.c"
		}
#line 109 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_i_it);
#line 718 "set-im-addresses.c"
	}
#line 104 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (added);
#line 722 "set-im-addresses.c"
}


static void _set_im_addresses_tests_notify_im_addresses_cb (SetIMAddressesTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
#line 147 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 147 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (individual_obj != NULL);
#line 147 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (ps != NULL);
#line 149 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = individual_obj;
#line 149 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
#line 149 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	i = _tmp1_;
#line 150 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_check_im_addresses (self, i);
#line 147 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (i);
#line 746 "set-im-addresses.c"
}


static void _set_im_addresses_tests_check_im_addresses (SetIMAddressesTests* self, FolksIndividual* i) {
	GList* _tmp28_;
	guint _tmp29_ = 0U;
#line 153 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 153 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (i != NULL);
#line 757 "set-im-addresses.c"
	{
		FolksIndividual* _tmp0_;
		GeeMultiMap* _tmp1_;
		GeeMultiMap* _tmp2_;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_;
		GeeIterator* _proto_it;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp0_ = i;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp1_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp0_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp2_ = _tmp1_;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp4_ = _tmp3_;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp6_ = _tmp5_;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_tmp4_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_proto_it = _tmp6_;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		while (TRUE) {
#line 787 "set-im-addresses.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_ = FALSE;
			GeeIterator* _tmp9_;
			gpointer _tmp10_ = NULL;
			gchar* proto;
			FolksIndividual* _tmp11_;
			GeeMultiMap* _tmp12_;
			GeeMultiMap* _tmp13_;
			const gchar* _tmp14_;
			GeeCollection* _tmp15_ = NULL;
			GeeCollection* im_fds;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp7_ = _proto_it;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp8_) {
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				break;
#line 807 "set-im-addresses.c"
			}
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp9_ = _proto_it;
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			proto = (gchar*) _tmp10_;
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp11_ = i;
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp12_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp11_);
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp13_ = _tmp12_;
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp14_ = proto;
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_tmp15_ = gee_multi_map_get (_tmp13_, _tmp14_);
#line 157 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			im_fds = _tmp15_;
#line 827 "set-im-addresses.c"
			{
				GeeCollection* _tmp16_;
				GeeIterator* _tmp17_ = NULL;
				GeeIterator* _im_fd_it;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp16_ = im_fds;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_im_fd_it = _tmp17_;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				while (TRUE) {
#line 840 "set-im-addresses.c"
					GeeIterator* _tmp18_;
					gboolean _tmp19_ = FALSE;
					GeeIterator* _tmp20_;
					gpointer _tmp21_ = NULL;
					FolksImFieldDetails* im_fd;
					GList* _tmp22_;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp18_ = _im_fd_it;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp19_ = gee_iterator_next (_tmp18_);
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					if (!_tmp19_) {
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						break;
#line 855 "set-im-addresses.c"
					}
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp20_ = _im_fd_it;
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp21_ = gee_iterator_get (_tmp20_);
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					im_fd = (FolksImFieldDetails*) _tmp21_;
#line 160 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_tmp22_ = self->priv->_addresses;
#line 865 "set-im-addresses.c"
					{
						GList* my_a_collection = NULL;
						GList* my_a_it = NULL;
#line 160 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						my_a_collection = _tmp22_;
#line 160 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
						for (my_a_it = my_a_collection; my_a_it != NULL; my_a_it = my_a_it->next) {
#line 873 "set-im-addresses.c"
							const gchar* my_a = NULL;
#line 160 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
							my_a = (const gchar*) my_a_it->data;
#line 877 "set-im-addresses.c"
							{
								const gchar* _tmp23_;
								FolksImFieldDetails* _tmp24_;
								gconstpointer _tmp25_;
								const gchar* _tmp26_;
#line 162 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
								_tmp23_ = my_a;
#line 162 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
								_tmp24_ = im_fd;
#line 162 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
								_tmp25_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp24_);
#line 162 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
								_tmp26_ = _tmp25_;
#line 162 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
								if (g_strcmp0 (_tmp23_, (const gchar*) _tmp26_) == 0) {
#line 893 "set-im-addresses.c"
									const gchar* _tmp27_;
#line 164 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
									_tmp27_ = my_a;
#line 164 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
									self->priv->_addresses = g_list_remove (self->priv->_addresses, _tmp27_);
#line 165 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
									break;
#line 901 "set-im-addresses.c"
								}
							}
						}
					}
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
					_g_object_unref0 (im_fd);
#line 908 "set-im-addresses.c"
				}
#line 158 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_im_fd_it);
#line 912 "set-im-addresses.c"
			}
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_g_object_unref0 (im_fds);
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
			_g_free0 (proto);
#line 918 "set-im-addresses.c"
		}
#line 155 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_proto_it);
#line 922 "set-im-addresses.c"
	}
#line 171 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp28_ = self->priv->_addresses;
#line 171 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp29_ = g_list_length (_tmp28_);
#line 171 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	if (_tmp29_ == ((guint) 0)) {
#line 930 "set-im-addresses.c"
		GMainLoop* _tmp30_;
#line 173 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		_tmp30_ = self->priv->_main_loop;
#line 173 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
		g_main_loop_quit (_tmp30_);
#line 936 "set-im-addresses.c"
	}
}


static void set_im_addresses_tests_class_init (SetIMAddressesTestsClass * klass) {
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	set_im_addresses_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_type_class_add_private (klass, sizeof (SetIMAddressesTestsPrivate));
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = set_im_addresses_tests_real_set_up;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = set_im_addresses_tests_real_tear_down;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	G_OBJECT_CLASS (klass)->finalize = set_im_addresses_tests_finalize;
#line 952 "set-im-addresses.c"
}


static void set_im_addresses_tests_instance_init (SetIMAddressesTests * self) {
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv = SET_IM_ADDRESSES_TESTS_GET_PRIVATE (self);
#line 32 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = NULL;
#line 961 "set-im-addresses.c"
}


static void set_im_addresses_tests_finalize (GObject* obj) {
	SetIMAddressesTests * self;
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	self = SET_IM_ADDRESSES_TESTS (obj);
#line 28 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 30 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 31 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 32 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	__g_list_free__g_free0_0 (self->priv->_addresses);
#line 26 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	G_OBJECT_CLASS (set_im_addresses_tests_parent_class)->finalize (obj);
#line 981 "set-im-addresses.c"
}


GType set_im_addresses_tests_get_type (void) {
	static volatile gsize set_im_addresses_tests_type_id__volatile = 0;
	if (g_once_init_enter (&set_im_addresses_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetIMAddressesTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_im_addresses_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetIMAddressesTests), 0, (GInstanceInitFunc) set_im_addresses_tests_instance_init, NULL };
		GType set_im_addresses_tests_type_id;
		set_im_addresses_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "SetIMAddressesTests", &g_define_type_info, 0);
		g_once_init_leave (&set_im_addresses_tests_type_id__volatile, set_im_addresses_tests_type_id);
	}
	return set_im_addresses_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	SetIMAddressesTests* _tmp1_;
	SetIMAddressesTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 180 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_test_init (&args_length1, &args, NULL);
#line 182 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = g_test_get_root ();
#line 182 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	root = _tmp0_;
#line 183 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = set_im_addresses_tests_new ();
#line 183 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp2_ = _tmp1_;
#line 183 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 183 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 183 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_tmp2_);
#line 185 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_test_run ();
#line 187 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	result = 0;
#line 187 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 1026 "set-im-addresses.c"
}


int main (int argc, char ** argv) {
#line 178 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	g_type_init ();
#line 178 "/debian/rgs/devel/folks/tests/tracker/set-im-addresses.vala"
	return _vala_main (argv, argc);
#line 1035 "set-im-addresses.c"
}



