/* store-removed.c generated by valac 0.14.0.50-58097f, the Vala compiler
 * generated from store-removed.vala, do not modify */

/*
 * Copyright (C) 2011 Philip Withnall
 *
 * 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: Philip Withnall <philip@tecnocode.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 <folks/folks-eds.h>
#include <gio/gio.h>
#include <libedataserver/e-account.h>
#include <libedataserver/e-source.h>
#include <libebook/e-book-client.h>


#define TYPE_STORE_REMOVED_TESTS (store_removed_tests_get_type ())
#define STORE_REMOVED_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STORE_REMOVED_TESTS, StoreRemovedTests))
#define STORE_REMOVED_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STORE_REMOVED_TESTS, StoreRemovedTestsClass))
#define IS_STORE_REMOVED_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STORE_REMOVED_TESTS))
#define IS_STORE_REMOVED_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STORE_REMOVED_TESTS))
#define STORE_REMOVED_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STORE_REMOVED_TESTS, StoreRemovedTestsClass))

typedef struct _StoreRemovedTests StoreRemovedTests;
typedef struct _StoreRemovedTestsClass StoreRemovedTestsClass;
typedef struct _StoreRemovedTestsPrivate StoreRemovedTestsPrivate;
#define _eds_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (eds_test_backend_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_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 __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _StoreRemovedTestsTestSingleStorePart1AsyncData StoreRemovedTestsTestSingleStorePart1AsyncData;
typedef struct _Block2Data Block2Data;
typedef struct _StoreRemovedTestsTestSingleStorePart2AsyncData StoreRemovedTestsTestSingleStorePart2AsyncData;

struct _StoreRemovedTests {
	FolksTestCase parent_instance;
	StoreRemovedTestsPrivate * priv;
};

struct _StoreRemovedTestsClass {
	FolksTestCaseClass parent_class;
};

struct _StoreRemovedTestsPrivate {
	EdsTestBackend* _eds_backend;
	GMainLoop* _main_loop;
	FolksIndividualAggregator* _aggregator;
};

struct _Block1Data {
	int _ref_count_;
	StoreRemovedTests * self;
	gulong signal_id;
	gpointer _async_data_;
};

struct _StoreRemovedTestsTestSingleStorePart1AsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	StoreRemovedTests* self;
	Block1Data* _data1_;
	EdsTestBackend* _tmp0_;
	FolksBackendStore* _tmp1_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	gulong _tmp4_;
	FolksIndividualAggregator* _tmp5_;
	GError* e;
	GError* _tmp6_;
	const gchar* _tmp7_;
	GError * _inner_error_;
};

struct _Block2Data {
	int _ref_count_;
	StoreRemovedTests * self;
	gulong signal_id;
	gpointer _async_data_;
};

struct _StoreRemovedTestsTestSingleStorePart2AsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	StoreRemovedTests* self;
	Block2Data* _data2_;
	FolksIndividualAggregator* _tmp0_;
	gulong _tmp1_;
	ESourceList* source_list;
	ESourceList* _tmp2_;
	ESourceList* _tmp3_;
	EdsTestBackend* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GError* e1;
	GError* _tmp7_;
	const gchar* _tmp8_;
	GError * _inner_error_;
};


static gpointer store_removed_tests_parent_class = NULL;

GType store_removed_tests_get_type (void) G_GNUC_CONST;
#define STORE_REMOVED_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_STORE_REMOVED_TESTS, StoreRemovedTestsPrivate))
enum  {
	STORE_REMOVED_TESTS_DUMMY_PROPERTY
};
StoreRemovedTests* store_removed_tests_new (void);
StoreRemovedTests* store_removed_tests_construct (GType object_type);
void store_removed_tests_test_single_store (StoreRemovedTests* self);
static void _store_removed_tests_test_single_store_folks_test_case_test_method (gpointer self);
static void store_removed_tests_real_set_up (FolksTestCase* base);
static void store_removed_tests_real_tear_down (FolksTestCase* base);
static GValue* _g_value_dup (GValue* self);
static void _vala_GValue_free (GValue* self);
static void _store_removed_tests_test_single_store_part1_async (StoreRemovedTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _store_removed_tests_test_single_store_part1_finish (StoreRemovedTests* self, GAsyncResult* _res_);
static gboolean __lambda3_ (StoreRemovedTests* self);
static gboolean ___lambda3__gsource_func (gpointer self);
static void _store_removed_tests_test_single_store_part2_async (StoreRemovedTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _store_removed_tests_test_single_store_part2_finish (StoreRemovedTests* self, GAsyncResult* _res_);
static gboolean __lambda5_ (StoreRemovedTests* self);
static gboolean ___lambda5__gsource_func (gpointer self);
static void _store_removed_tests_test_single_store_part1_async_data_free (gpointer _data);
static gboolean _store_removed_tests_test_single_store_part1_async_co (StoreRemovedTestsTestSingleStorePart1AsyncData* _data_);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static void _store_removed_tests_test_single_store_part1_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda2_ (Block1Data* _data1_, GeeMultiMap* changes);
static void ___lambda2__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _store_removed_tests_test_single_store_part2_async_data_free (gpointer _data);
static gboolean _store_removed_tests_test_single_store_part2_async_co (StoreRemovedTestsTestSingleStorePart2AsyncData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static void __lambda4_ (Block2Data* _data2_, GeeMultiMap* changes);
static void ___lambda4__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void store_removed_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _store_removed_tests_test_single_store_folks_test_case_test_method (gpointer self) {
#line 35 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	store_removed_tests_test_single_store (self);
#line 175 "store-removed.c"
}


StoreRemovedTests* store_removed_tests_construct (GType object_type) {
	StoreRemovedTests * self = NULL;
#line 33 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = (StoreRemovedTests*) folks_test_case_construct (object_type, "StoreRemoved");
#line 35 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "single store", _store_removed_tests_test_single_store_folks_test_case_test_method, self);
#line 31 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return self;
#line 187 "store-removed.c"
}


StoreRemovedTests* store_removed_tests_new (void) {
#line 31 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return store_removed_tests_construct (TYPE_STORE_REMOVED_TESTS);
#line 194 "store-removed.c"
}


static void store_removed_tests_real_set_up (FolksTestCase* base) {
	StoreRemovedTests * self;
	EdsTestBackend* _tmp0_;
	EdsTestBackend* _tmp1_;
	EdsTestBackend* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* config_val;
#line 38 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = (StoreRemovedTests*) base;
#line 40 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = eds_test_backend_new ();
#line 40 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 40 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self->priv->_eds_backend = _tmp0_;
#line 41 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp1_ = self->priv->_eds_backend;
#line 41 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_set_up (_tmp1_, FALSE);
#line 44 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp2_ = self->priv->_eds_backend;
#line 44 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp3_ = eds_test_backend_get_address_book_uid (_tmp2_);
#line 44 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp4_ = _tmp3_;
#line 44 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp5_ = g_strdup_printf ("eds:%s", _tmp4_);
#line 44 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	config_val = _tmp5_;
#line 45 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", config_val, TRUE);
#line 38 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_free0 (config_val);
#line 233 "store-removed.c"
}


static void store_removed_tests_real_tear_down (FolksTestCase* base) {
	StoreRemovedTests * self;
	EdsTestBackend* _tmp0_;
#line 48 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = (StoreRemovedTests*) base;
#line 50 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 50 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_tear_down (_tmp0_);
#line 246 "store-removed.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 60 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 253 "store-removed.c"
}


static void _vala_GValue_free (GValue* self) {
#line 60 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_value_unset (self);
#line 60 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_free (self);
#line 262 "store-removed.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return self ? _g_value_dup (self) : NULL;
#line 269 "store-removed.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 70 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return self ? g_object_ref (self) : NULL;
#line 276 "store-removed.c"
}


static gboolean __lambda3_ (StoreRemovedTests* self) {
	gboolean result = FALSE;
#line 77 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_critical ("store-removed.vala:77: Timeout reached.");
#line 78 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	result = FALSE;
#line 78 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return result;
#line 288 "store-removed.c"
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
#line 75 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return result;
#line 297 "store-removed.c"
}


static gboolean __lambda5_ (StoreRemovedTests* self) {
	gboolean result = FALSE;
#line 93 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_critical ("store-removed.vala:93: Timeout reached.");
#line 94 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	result = FALSE;
#line 94 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return result;
#line 309 "store-removed.c"
}


static gboolean ___lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda5_ (self);
#line 91 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return result;
#line 318 "store-removed.c"
}


void store_removed_tests_test_single_store (StoreRemovedTests* self) {
	GMainLoop* _tmp0_;
	EdsTestBackend* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashMap* c1;
	GValue _tmp3_ = {0};
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* v;
	GValue* _tmp7_;
	GValue* _tmp8_;
	GValue* _tmp9_;
	GValue _tmp10_ = {0};
	GValue _tmp11_;
	GValue* _tmp12_;
	GValue* _tmp13_;
	const gchar* _tmp14_;
	GValue* _tmp15_;
	GValue* _tmp16_;
	EdsTestBackend* _tmp17_;
	GeeHashMap* _tmp18_;
	guint _tmp19_ = 0U;
	guint timeout_id;
	GMainLoop* _tmp20_;
	FolksIndividualAggregator* _tmp21_;
	GeeMap* _tmp22_;
	GeeMap* _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	guint _tmp26_;
	guint _tmp27_ = 0U;
	GMainLoop* _tmp28_;
	FolksIndividualAggregator* _tmp29_;
	GeeMap* _tmp30_;
	GeeMap* _tmp31_;
	gint _tmp32_;
	gint _tmp33_;
	guint _tmp34_;
#line 53 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_return_if_fail (self != NULL);
#line 55 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 55 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 55 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self->priv->_main_loop = _tmp0_;
#line 57 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp1_ = self->priv->_eds_backend;
#line 57 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_reset (_tmp1_);
#line 60 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, _vala_GValue_free, NULL, NULL, NULL);
#line 60 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	c1 = _tmp2_;
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_value_init (&_tmp3_, G_TYPE_STRING);
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp4_ = _tmp3_;
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp5_ = __g_value_dup0 (&_tmp4_);
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp6_ = _tmp5_;
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	G_IS_VALUE (&_tmp4_) ? (g_value_unset (&_tmp4_), NULL) : NULL;
#line 62 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	v = _tmp6_;
#line 63 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp7_ = v;
#line 63 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_value_set_string (_tmp7_, "Chancellor Brian Blessed");
#line 64 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp8_ = v;
#line 64 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	v = NULL;
#line 64 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp9_ = _tmp8_;
#line 64 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, "full_name", _tmp9_);
#line 64 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__vala_GValue_free0 (_tmp9_);
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_value_init (&_tmp10_, G_TYPE_STRING);
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp11_ = _tmp10_;
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp12_ = __g_value_dup0 (&_tmp11_);
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__vala_GValue_free0 (v);
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	v = _tmp12_;
#line 66 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	G_IS_VALUE (&_tmp11_) ? (g_value_unset (&_tmp11_), NULL) : NULL;
#line 67 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp13_ = v;
#line 67 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_value_set_string (_tmp13_, "brian@example.com");
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp14_ = EDSF_PERSONA_email_fields[0];
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp15_ = v;
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	v = NULL;
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp16_ = _tmp15_;
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, _tmp14_, _tmp16_);
#line 68 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__vala_GValue_free0 (_tmp16_);
#line 70 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp17_ = self->priv->_eds_backend;
#line 70 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp18_ = _g_object_ref0 (c1);
#line 70 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_add_contact (_tmp17_, _tmp18_);
#line 73 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_store_removed_tests_test_single_store_part1_async (self, NULL, NULL);
#line 75 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp19_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda3__gsource_func, g_object_ref (self), g_object_unref);
#line 75 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	timeout_id = _tmp19_;
#line 81 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp20_ = self->priv->_main_loop;
#line 81 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_main_loop_run (_tmp20_);
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp21_ = self->priv->_aggregator;
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp22_ = folks_individual_aggregator_get_individuals (_tmp21_);
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp23_ = _tmp22_;
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp24_ = gee_map_get_size (_tmp23_);
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp25_ = _tmp24_;
#line 84 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp25_ == 1);
#line 86 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp26_ = timeout_id;
#line 86 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_source_remove (_tmp26_);
#line 89 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_store_removed_tests_test_single_store_part2_async (self, NULL, NULL);
#line 91 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp27_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda5__gsource_func, g_object_ref (self), g_object_unref);
#line 91 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	timeout_id = _tmp27_;
#line 97 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp28_ = self->priv->_main_loop;
#line 97 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_main_loop_run (_tmp28_);
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp29_ = self->priv->_aggregator;
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp30_ = folks_individual_aggregator_get_individuals (_tmp29_);
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp31_ = _tmp30_;
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp32_ = gee_map_get_size (_tmp31_);
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp33_ = _tmp32_;
#line 100 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp33_ == 0);
#line 102 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp34_ = timeout_id;
#line 102 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_source_remove (_tmp34_);
#line 53 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__vala_GValue_free0 (v);
#line 53 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (c1);
#line 493 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part1_async_data_free (gpointer _data) {
	StoreRemovedTestsTestSingleStorePart1AsyncData* _data_;
	_data_ = _data;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_slice_free (StoreRemovedTestsTestSingleStorePart1AsyncData, _data_);
#line 504 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part1_async (StoreRemovedTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	StoreRemovedTestsTestSingleStorePart1AsyncData* _data_;
	StoreRemovedTests* _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_ = g_slice_new0 (StoreRemovedTestsTestSingleStorePart1AsyncData);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _store_removed_tests_test_single_store_part1_async);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _store_removed_tests_test_single_store_part1_async_data_free);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->self = _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_store_removed_tests_test_single_store_part1_async_co (_data_);
#line 523 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part1_finish (StoreRemovedTests* self, GAsyncResult* _res_) {
	StoreRemovedTestsTestSingleStorePart1AsyncData* _data_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 531 "store-removed.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return _data1_;
#line 540 "store-removed.c"
}


static void block1_data_unref (Block1Data* _data1_) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_data1_->self);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_slice_free (Block1Data, _data1_);
#line 551 "store-removed.c"
	}
}


static void _store_removed_tests_test_single_store_part1_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	StoreRemovedTestsTestSingleStorePart1AsyncData* _data_;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_ = _user_data_;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_source_object_ = source_object;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_res_ = _res_;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_store_removed_tests_test_single_store_part1_async_co (_data_);
#line 566 "store-removed.c"
}


static void __lambda2_ (Block1Data* _data1_, GeeMultiMap* changes) {
	StoreRemovedTests * self;
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
	GeeMultiMap* _tmp2_;
	GeeSet* _tmp3_ = NULL;
	GeeSet* removed;
	GeeCollection* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GeeSet* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	GMainLoop* _tmp24_;
	FolksIndividualAggregator* _tmp25_;
	gulong _tmp26_;
#line 116 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = _data1_->self;
#line 116 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_return_if_fail (changes != NULL);
#line 118 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = changes;
#line 118 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 118 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	added = _tmp1_;
#line 119 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp2_ = changes;
#line 119 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 119 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	removed = _tmp3_;
#line 121 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp4_ = added;
#line 121 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp5_ = gee_collection_get_size (_tmp4_);
#line 121 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp6_ = _tmp5_;
#line 121 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp6_ == 1);
#line 611 "store-removed.c"
	{
		GeeCollection* _tmp7_;
		GeeIterator* _tmp8_ = NULL;
		GeeIterator* _i_it;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp7_ = added;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_i_it = _tmp8_;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		while (TRUE) {
#line 624 "store-removed.c"
			GeeIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			GeeIterator* _tmp11_;
			gpointer _tmp12_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp13_;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp9_ = _i_it;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp10_ = gee_iterator_next (_tmp9_);
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			if (!_tmp10_) {
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
				break;
#line 639 "store-removed.c"
			}
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp11_ = _i_it;
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp12_ = gee_iterator_get (_tmp11_);
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			i = (FolksIndividual*) _tmp12_;
#line 127 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp13_ = i;
#line 127 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			g_assert (_tmp13_ != NULL);
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_g_object_unref0 (i);
#line 653 "store-removed.c"
		}
#line 125 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_i_it);
#line 657 "store-removed.c"
	}
#line 130 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp14_ = removed;
#line 130 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp15_ = gee_collection_get_size ((GeeCollection*) _tmp14_);
#line 130 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp16_ = _tmp15_;
#line 130 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp16_ == 1);
#line 667 "store-removed.c"
	{
		GeeSet* _tmp17_;
		GeeIterator* _tmp18_ = NULL;
		GeeIterator* _i_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp17_ = removed;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp18_ = gee_iterable_iterator ((GeeIterable*) _tmp17_);
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_i_it = _tmp18_;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		while (TRUE) {
#line 680 "store-removed.c"
			GeeIterator* _tmp19_;
			gboolean _tmp20_ = FALSE;
			GeeIterator* _tmp21_;
			gpointer _tmp22_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp23_;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp19_ = _i_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp20_ = gee_iterator_next (_tmp19_);
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			if (!_tmp20_) {
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
				break;
#line 695 "store-removed.c"
			}
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp21_ = _i_it;
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp22_ = gee_iterator_get (_tmp21_);
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			i = (FolksIndividual*) _tmp22_;
#line 134 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp23_ = i;
#line 134 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			g_assert (_tmp23_ == NULL);
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_g_object_unref0 (i);
#line 709 "store-removed.c"
		}
#line 132 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_i_it);
#line 713 "store-removed.c"
	}
#line 138 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp24_ = self->priv->_main_loop;
#line 138 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_main_loop_quit (_tmp24_);
#line 139 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp25_ = self->priv->_aggregator;
#line 139 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp26_ = _data1_->signal_id;
#line 139 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_signal_handler_disconnect ((GObject*) _tmp25_, _tmp26_);
#line 116 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (removed);
#line 116 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (added);
#line 729 "store-removed.c"
}


static void ___lambda2__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 115 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__lambda2_ (self, changes);
#line 736 "store-removed.c"
}


static gboolean _store_removed_tests_test_single_store_part1_async_co (StoreRemovedTestsTestSingleStorePart1AsyncData* _data_) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	switch (_data_->_state_) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		case 0:
#line 745 "store-removed.c"
		goto _state_0;
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		case 1:
#line 749 "store-removed.c"
		goto _state_1;
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		case 2:
#line 753 "store-removed.c"
		goto _state_2;
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		case 3:
#line 757 "store-removed.c"
		goto _state_3;
		default:
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_assert_not_reached ();
#line 762 "store-removed.c"
	}
	_state_0:
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_ = g_slice_new0 (Block1Data);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_->_ref_count_ = 1;
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_->self = g_object_ref (_data_->self);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_->_async_data_ = _data_;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp0_ = _data_->self->priv->_eds_backend;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_state_ = 1;
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _store_removed_tests_test_single_store_part1_async_ready, _data_);
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return FALSE;
#line 781 "store-removed.c"
	_state_1:
#line 107 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
#line 109 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp1_ = NULL;
#line 109 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp1_ = folks_backend_store_dup ();
#line 109 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->store = _data_->_tmp1_;
#line 110 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_state_ = 2;
#line 110 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	folks_backend_store_prepare (_data_->store, _store_removed_tests_test_single_store_part1_async_ready, _data_);
#line 110 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return FALSE;
#line 797 "store-removed.c"
	_state_2:
#line 110 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 112 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp2_ = folks_individual_aggregator_new ();
#line 112 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 112 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->self->priv->_aggregator = _data_->_tmp2_;
#line 114 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_->signal_id = (gulong) 0;
#line 115 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 115 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp4_ = 0UL;
#line 115 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp4_ = g_signal_connect_data (_data_->_tmp3_, "individuals-changed-detailed", (GCallback) ___lambda2__folks_individual_aggregator_individuals_changed_detailed, block1_data_ref (_data_->_data1_), (GClosureNotify) block1_data_unref, 0);
#line 115 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_->signal_id = _data_->_tmp4_;
#line 817 "store-removed.c"
	{
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp5_ = _data_->self->priv->_aggregator;
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_state_ = 3;
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		folks_individual_aggregator_prepare (_data_->_tmp5_, _store_removed_tests_test_single_store_part1_async_ready, _data_);
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		return FALSE;
#line 827 "store-removed.c"
		_state_3:
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
#line 144 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		if (_data_->_inner_error_ != NULL) {
#line 833 "store-removed.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->e = _data_->_inner_error_;
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_inner_error_ = NULL;
#line 148 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp6_ = _data_->e;
#line 148 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp7_ = _data_->_tmp6_->message;
#line 148 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_critical ("store-removed.vala:148: Error when calling prepare: %s", _data_->_tmp7_);
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_error_free0 (_data_->e);
#line 852 "store-removed.c"
	}
	__finally0:
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (_data_->_inner_error_ != NULL) {
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_data_->store);
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		block1_data_unref (_data_->_data1_);
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_data1_ = NULL;
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.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 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_clear_error (&_data_->_inner_error_);
#line 142 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		return FALSE;
#line 869 "store-removed.c"
	}
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_data_->store);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	block1_data_unref (_data_->_data1_);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data1_ = NULL;
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (_data_->_state_ == 0) {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 881 "store-removed.c"
	} else {
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 885 "store-removed.c"
	}
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_object_unref (_data_->_async_result);
#line 105 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return FALSE;
#line 891 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part2_async_data_free (gpointer _data) {
	StoreRemovedTestsTestSingleStorePart2AsyncData* _data_;
	_data_ = _data;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_slice_free (StoreRemovedTestsTestSingleStorePart2AsyncData, _data_);
#line 902 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part2_async (StoreRemovedTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	StoreRemovedTestsTestSingleStorePart2AsyncData* _data_;
	StoreRemovedTests* _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_ = g_slice_new0 (StoreRemovedTestsTestSingleStorePart2AsyncData);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _store_removed_tests_test_single_store_part2_async);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _store_removed_tests_test_single_store_part2_async_data_free);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->self = _tmp0_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_store_removed_tests_test_single_store_part2_async_co (_data_);
#line 921 "store-removed.c"
}


static void _store_removed_tests_test_single_store_part2_finish (StoreRemovedTests* self, GAsyncResult* _res_) {
	StoreRemovedTestsTestSingleStorePart2AsyncData* _data_;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 929 "store-removed.c"
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return _data2_;
#line 938 "store-removed.c"
}


static void block2_data_unref (Block2Data* _data2_) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_data2_->self);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_slice_free (Block2Data, _data2_);
#line 949 "store-removed.c"
	}
}


static void __lambda4_ (Block2Data* _data2_, GeeMultiMap* changes) {
	StoreRemovedTests * self;
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
	GeeMultiMap* _tmp2_;
	GeeSet* _tmp3_ = NULL;
	GeeSet* removed;
	GeeCollection* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GeeSet* _tmp14_;
	gint _tmp15_;
	gint _tmp16_;
	GMainLoop* _tmp24_;
	FolksIndividualAggregator* _tmp25_;
	gulong _tmp26_;
#line 156 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = _data2_->self;
#line 156 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_return_if_fail (changes != NULL);
#line 158 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = changes;
#line 158 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 158 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	added = _tmp1_;
#line 159 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp2_ = changes;
#line 159 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 159 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	removed = _tmp3_;
#line 161 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp4_ = added;
#line 161 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp5_ = gee_collection_get_size (_tmp4_);
#line 161 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp6_ = _tmp5_;
#line 161 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp6_ == 1);
#line 995 "store-removed.c"
	{
		GeeCollection* _tmp7_;
		GeeIterator* _tmp8_ = NULL;
		GeeIterator* _i_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp7_ = added;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_i_it = _tmp8_;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		while (TRUE) {
#line 1008 "store-removed.c"
			GeeIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			GeeIterator* _tmp11_;
			gpointer _tmp12_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp13_;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp9_ = _i_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp10_ = gee_iterator_next (_tmp9_);
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			if (!_tmp10_) {
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
				break;
#line 1023 "store-removed.c"
			}
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp11_ = _i_it;
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp12_ = gee_iterator_get (_tmp11_);
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			i = (FolksIndividual*) _tmp12_;
#line 165 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp13_ = i;
#line 165 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			g_assert (_tmp13_ == NULL);
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_g_object_unref0 (i);
#line 1037 "store-removed.c"
		}
#line 163 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_i_it);
#line 1041 "store-removed.c"
	}
#line 168 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp14_ = removed;
#line 168 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp15_ = gee_collection_get_size ((GeeCollection*) _tmp14_);
#line 168 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp16_ = _tmp15_;
#line 168 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_assert (_tmp16_ == 1);
#line 1051 "store-removed.c"
	{
		GeeSet* _tmp17_;
		GeeIterator* _tmp18_ = NULL;
		GeeIterator* _i_it;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp17_ = removed;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_tmp18_ = gee_iterable_iterator ((GeeIterable*) _tmp17_);
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_i_it = _tmp18_;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		while (TRUE) {
#line 1064 "store-removed.c"
			GeeIterator* _tmp19_;
			gboolean _tmp20_ = FALSE;
			GeeIterator* _tmp21_;
			gpointer _tmp22_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp23_;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp19_ = _i_it;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp20_ = gee_iterator_next (_tmp19_);
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			if (!_tmp20_) {
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
				break;
#line 1079 "store-removed.c"
			}
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp21_ = _i_it;
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp22_ = gee_iterator_get (_tmp21_);
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			i = (FolksIndividual*) _tmp22_;
#line 174 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_tmp23_ = i;
#line 174 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			g_assert (_tmp23_ != NULL);
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
			_g_object_unref0 (i);
#line 1093 "store-removed.c"
		}
#line 172 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_i_it);
#line 1097 "store-removed.c"
	}
#line 178 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp24_ = self->priv->_main_loop;
#line 178 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_main_loop_quit (_tmp24_);
#line 179 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp25_ = self->priv->_aggregator;
#line 179 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp26_ = _data2_->signal_id;
#line 179 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_signal_handler_disconnect ((GObject*) _tmp25_, _tmp26_);
#line 156 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (removed);
#line 156 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (added);
#line 1113 "store-removed.c"
}


static void ___lambda4__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 155 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	__lambda4_ (self, changes);
#line 1120 "store-removed.c"
}


static gboolean _store_removed_tests_test_single_store_part2_async_co (StoreRemovedTestsTestSingleStorePart2AsyncData* _data_) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	switch (_data_->_state_) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		case 0:
#line 1129 "store-removed.c"
		goto _state_0;
		default:
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_assert_not_reached ();
#line 1134 "store-removed.c"
	}
	_state_0:
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_ = g_slice_new0 (Block2Data);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_->_ref_count_ = 1;
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_->self = g_object_ref (_data_->self);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_->_async_data_ = _data_;
#line 154 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_->signal_id = (gulong) 0;
#line 155 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp0_ = _data_->self->priv->_aggregator;
#line 155 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp1_ = 0UL;
#line 155 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_tmp1_ = g_signal_connect_data (_data_->_tmp0_, "individuals-changed-detailed", (GCallback) ___lambda4__folks_individual_aggregator_individuals_changed_detailed, block2_data_ref (_data_->_data2_), (GClosureNotify) block2_data_unref, 0);
#line 155 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_->signal_id = _data_->_tmp1_;
#line 184 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->source_list = NULL;
#line 1157 "store-removed.c"
	{
#line 187 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp2_ = NULL;
#line 187 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		e_book_client_get_sources (&_data_->_tmp2_, &_data_->_inner_error_);
#line 187 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_data_->source_list);
#line 187 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->source_list = _data_->_tmp2_;
#line 187 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		if (_data_->_inner_error_ != NULL) {
#line 1169 "store-removed.c"
			goto __catch1_g_error;
		}
#line 188 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp3_ = _data_->source_list;
#line 188 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp4_ = _data_->self->priv->_eds_backend;
#line 188 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp5_ = eds_test_backend_get_address_book_uid (_data_->_tmp4_);
#line 188 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp6_ = _data_->_tmp5_;
#line 188 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		e_source_list_remove_source_by_uid (_data_->_tmp3_, _data_->_tmp6_);
#line 1182 "store-removed.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->e1 = _data_->_inner_error_;
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_inner_error_ = NULL;
#line 192 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp7_ = _data_->e1;
#line 192 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_tmp8_ = _data_->_tmp7_->message;
#line 192 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_critical ("store-removed.vala:192: Error getting source list: %s", _data_->_tmp8_);
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_error_free0 (_data_->e1);
#line 1199 "store-removed.c"
	}
	__finally1:
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (_data_->_inner_error_ != NULL) {
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_g_object_unref0 (_data_->source_list);
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		block2_data_unref (_data_->_data2_);
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		_data_->_data2_ = NULL;
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.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 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_clear_error (&_data_->_inner_error_);
#line 185 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		return FALSE;
#line 1216 "store-removed.c"
	}
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_data_->source_list);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	block2_data_unref (_data_->_data2_);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_data_->_data2_ = NULL;
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	if (_data_->_state_ == 0) {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1228 "store-removed.c"
	} else {
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1232 "store-removed.c"
	}
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_object_unref (_data_->_async_result);
#line 152 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return FALSE;
#line 1238 "store-removed.c"
}


static void store_removed_tests_class_init (StoreRemovedTestsClass * klass) {
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	store_removed_tests_parent_class = g_type_class_peek_parent (klass);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_type_class_add_private (klass, sizeof (StoreRemovedTestsPrivate));
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = store_removed_tests_real_set_up;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = store_removed_tests_real_tear_down;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	G_OBJECT_CLASS (klass)->finalize = store_removed_tests_finalize;
#line 1253 "store-removed.c"
}


static void store_removed_tests_instance_init (StoreRemovedTests * self) {
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self->priv = STORE_REMOVED_TESTS_GET_PRIVATE (self);
#line 1260 "store-removed.c"
}


static void store_removed_tests_finalize (GObject* obj) {
	StoreRemovedTests * self;
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	self = STORE_REMOVED_TESTS (obj);
#line 27 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 28 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 25 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	G_OBJECT_CLASS (store_removed_tests_parent_class)->finalize (obj);
#line 1276 "store-removed.c"
}


GType store_removed_tests_get_type (void) {
	static volatile gsize store_removed_tests_type_id__volatile = 0;
	if (g_once_init_enter (&store_removed_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (StoreRemovedTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) store_removed_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (StoreRemovedTests), 0, (GInstanceInitFunc) store_removed_tests_instance_init, NULL };
		GType store_removed_tests_type_id;
		store_removed_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "StoreRemovedTests", &g_define_type_info, 0);
		g_once_init_leave (&store_removed_tests_type_id__volatile, store_removed_tests_type_id);
	}
	return store_removed_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	StoreRemovedTests* _tmp1_;
	StoreRemovedTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 199 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_test_init (&args_length1, &args, NULL);
#line 201 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp0_ = g_test_get_root ();
#line 201 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	root = _tmp0_;
#line 202 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp1_ = store_removed_tests_new ();
#line 202 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp2_ = _tmp1_;
#line 202 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 202 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 202 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	_g_object_unref0 (_tmp2_);
#line 204 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_test_run ();
#line 206 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	result = 0;
#line 206 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return result;
#line 1321 "store-removed.c"
}


int main (int argc, char ** argv) {
#line 197 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	g_type_init ();
#line 197 "/home/treitter/collabora/folks/tests/eds/store-removed.vala"
	return _vala_main (argv, argc);
#line 1330 "store-removed.c"
}



