/* dummy-lsw.c generated by valac 0.13.1.106-1068, the Vala compiler
 * generated from dummy-lsw.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: Alban Crequy <alban.crequy@collabora.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <libsocialweb-test.h>
#include <stdlib.h>
#include <string.h>
#include <folks/folks.h>
#include <libsocialweb-client/libsocialweb-client-hack-for-vala.h>
#include <gio/gio.h>
#include <gee.h>
#include <folks/folks-libsocialweb.h>


#define TYPE_DUMMY_LSW_TESTS (dummy_lsw_tests_get_type ())
#define DUMMY_LSW_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUMMY_LSW_TESTS, DummyLswTests))
#define DUMMY_LSW_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUMMY_LSW_TESTS, DummyLswTestsClass))
#define IS_DUMMY_LSW_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUMMY_LSW_TESTS))
#define IS_DUMMY_LSW_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUMMY_LSW_TESTS))
#define DUMMY_LSW_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUMMY_LSW_TESTS, DummyLswTestsClass))

typedef struct _DummyLswTests DummyLswTests;
typedef struct _DummyLswTestsClass DummyLswTestsClass;
typedef struct _DummyLswTestsPrivate DummyLswTestsPrivate;
#define _libsocialweb_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (libsocialweb_test_backend_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_SwContact_free0(var) ((var == NULL) ? NULL : (var = (_vala_SwContact_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block3Data Block3Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _DummyLswTests {
	FolksTestCase parent_instance;
	DummyLswTestsPrivate * priv;
};

struct _DummyLswTestsClass {
	FolksTestCaseClass parent_class;
};

struct _DummyLswTestsPrivate {
	LibsocialwebTestBackend* _lsw_backend;
};

struct _Block1Data {
	int _ref_count_;
	DummyLswTests * self;
	GMainLoop* main_loop;
	LibsocialwebTestLibsocialwebServiceTest* mysocialnetwork;
	gchar* view_path;
	FolksIndividual* i1;
	FolksIndividual* i2;
	SwContact* contact1;
};

struct _Block2Data {
	int _ref_count_;
	Block1Data * _data1_;
	char* view_path;
};

struct _Block3Data {
	int _ref_count_;
	DummyLswTests * self;
	gchar* path;
};


static gpointer dummy_lsw_tests_parent_class = NULL;

GType dummy_lsw_tests_get_type (void) G_GNUC_CONST;
#define DUMMY_LSW_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DUMMY_LSW_TESTS, DummyLswTestsPrivate))
enum  {
	DUMMY_LSW_TESTS_DUMMY_PROPERTY
};
DummyLswTests* dummy_lsw_tests_new (void);
DummyLswTests* dummy_lsw_tests_construct (GType object_type);
void dummy_lsw_tests_test_dummy_libsocialweb (DummyLswTests* self);
static void _dummy_lsw_tests_test_dummy_libsocialweb_folks_test_case_test_method (gpointer self);
static void dummy_lsw_tests_real_set_up (FolksTestCase* base);
static void dummy_lsw_tests_real_tear_down (FolksTestCase* base);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void _vala_SwContact_free (SwContact* self);
static void block1_data_unref (Block1Data* _data1_);
static void _lambda0_ (Block1Data* _data1_);
static void __lambda0__libsocialweb_test_backend_ready (LibsocialwebTestBackend* _sender, gpointer self);
static gboolean _lambda1_ (DummyLswTests* self);
static gboolean __lambda1__gsource_func (gpointer self);
static void _g_free0_ (gpointer var);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static void _lambda2_ (GObject* v, Block2Data* _data2_);
static void _vala_LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement_array_free (LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* array, gint array_length);
static void __lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean _lambda3_ (DummyLswTests* self);
static gboolean __lambda3__gsource_func (gpointer self);
static void _lambda4_ (const gchar* query, GHashTable* p, const gchar* path, Block1Data* _data1_);
static void _lambda5_ (const gchar* path, DummyLswTests* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (Block3Data* _data3_);
static gboolean _lambda6_ (Block3Data* _data3_);
static gboolean __lambda6__gsource_func (gpointer self);
static void __lambda5__libsocialweb_test_libsocialweb_contact_view_test_start_called (LibsocialwebTestLibsocialwebContactViewTest* _sender, const gchar* path, gpointer self);
static void __lambda4__libsocialweb_test_libsocialweb_service_test_open_view_called (LibsocialwebTestLibsocialwebServiceTest* _sender, const gchar* query, GHashTable* p, const gchar* path, gpointer self);
static void _lambda7_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_);
static void __lambda7__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static gboolean _lambda8_ (DummyLswTests* self);
static gboolean __lambda8__gsource_func (gpointer self);
static SwContact* _vala_SwContact_copy (SwContact* self);
static gboolean _lambda9_ (Block1Data* _data1_);
static gboolean __lambda9__gsource_func (gpointer self);
static void _lambda10_ (Block1Data* _data1_);
static void __lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean _lambda11_ (DummyLswTests* self);
static gboolean __lambda11__gsource_func (gpointer self);
static gboolean _lambda12_ (Block1Data* _data1_);
static gboolean __lambda12__gsource_func (gpointer self);
static void _lambda13_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_);
static void __lambda13__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static gboolean _lambda14_ (DummyLswTests* self);
static gboolean __lambda14__gsource_func (gpointer self);
static void dummy_lsw_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _dummy_lsw_tests_test_dummy_libsocialweb_folks_test_case_test_method (gpointer self) {
	dummy_lsw_tests_test_dummy_libsocialweb (self);
}


DummyLswTests* dummy_lsw_tests_construct (GType object_type) {
	DummyLswTests * self = NULL;
	LibsocialwebTestBackend* _tmp0_;
	self = (DummyLswTests*) folks_test_case_construct (object_type, "DummyLsw");
	_tmp0_ = libsocialweb_test_backend_new ();
	_libsocialweb_test_backend_unref0 (self->priv->_lsw_backend);
	self->priv->_lsw_backend = _tmp0_;
	folks_test_case_add_test ((FolksTestCase*) self, "dummy libsocialweb", _dummy_lsw_tests_test_dummy_libsocialweb_folks_test_case_test_method, self);
	return self;
}


DummyLswTests* dummy_lsw_tests_new (void) {
	return dummy_lsw_tests_construct (TYPE_DUMMY_LSW_TESTS);
}


static void dummy_lsw_tests_real_set_up (FolksTestCase* base) {
	DummyLswTests * self;
	self = (DummyLswTests*) base;
}


static void dummy_lsw_tests_real_tear_down (FolksTestCase* base) {
	DummyLswTests * self;
	self = (DummyLswTests*) base;
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void _vala_SwContact_free (SwContact* self) {
	g_boxed_free (sw_contact_get_type (), self);
}


static void block1_data_unref (Block1Data* _data1_) {
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->self);
		__vala_SwContact_free0 (_data1_->contact1);
		_g_object_unref0 (_data1_->i2);
		_g_object_unref0 (_data1_->i1);
		_g_free0 (_data1_->view_path);
		_g_object_unref0 (_data1_->mysocialnetwork);
		_g_main_loop_unref0 (_data1_->main_loop);
		g_slice_free (Block1Data, _data1_);
	}
}


static void _lambda0_ (Block1Data* _data1_) {
	DummyLswTests * self;
	GMainLoop* _tmp0_;
	self = _data1_->self;
	_tmp0_ = _data1_->main_loop;
	g_main_loop_quit (_tmp0_);
}


static void __lambda0__libsocialweb_test_backend_ready (LibsocialwebTestBackend* _sender, gpointer self) {
	_lambda0_ (self);
}


static gboolean _lambda1_ (DummyLswTests* self) {
	gboolean result = FALSE;
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda1__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda1_ (self);
	return result;
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (Block2Data* _data2_) {
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		block1_data_unref (_data2_->_data1_);
		_data2_->_data1_ = NULL;
		_g_free0 (_data2_->view_path);
		g_slice_free (Block2Data, _data2_);
	}
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _vala_LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement_array_free (LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			libsocialweb_test_libsocialweb_contact_view_test_contacts_added_element_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void _lambda2_ (GObject* v, Block2Data* _data2_) {
	Block1Data* _data1_;
	DummyLswTests * self;
	GObject* _tmp0_;
	LibsocialwebTestContactView* _tmp1_;
	LibsocialwebTestContactView* view;
	LibsocialwebTestContactView* _tmp2_;
	LibsocialwebTestLibsocialwebServiceTest* _tmp3_;
	GeeHashMap* _tmp4_;
	const char* _tmp5_;
	gpointer _tmp6_ = NULL;
	LibsocialwebTestLibsocialwebContactViewTest* _tmp7_;
	LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* _tmp8_ = NULL;
	LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* _tmp9_;
	gint _tmp9__length1;
	LibsocialwebTestLibsocialwebServiceTest* _tmp10_;
	GeeHashMap* _tmp11_;
	const char* _tmp12_;
	gpointer _tmp13_ = NULL;
	LibsocialwebTestLibsocialwebContactViewTest* _tmp14_;
	LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* _tmp15_ = NULL;
	LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement* _tmp16_;
	gint _tmp16__length1;
	GMainLoop* _tmp17_;
	_data1_ = _data2_->_data1_;
	self = _data1_->self;
	_tmp0_ = v;
	_tmp1_ = _g_object_ref0 (LIBSOCIALWEB_TEST_CONTACT_VIEW (_tmp0_));
	view = _tmp1_;
	_tmp2_ = view;
	libsocialweb_test_contact_view_Start (_tmp2_, NULL, NULL);
	_tmp3_ = _data1_->mysocialnetwork;
	_tmp4_ = _tmp3_->contact_views;
	_tmp5_ = _data2_->view_path;
	_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, (const gchar*) _tmp5_);
	_tmp7_ = (LibsocialwebTestLibsocialwebContactViewTest*) _tmp6_;
	_tmp8_ = g_new0 (LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement, 0);
	_tmp9_ = _tmp8_;
	_tmp9__length1 = 0;
	g_signal_emit_by_name (_tmp7_, "contacts-added", _tmp9_, 0);
	_tmp9_ = (_vala_LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement_array_free (_tmp9_, _tmp9__length1), NULL);
	_g_object_unref0 (_tmp7_);
	_tmp10_ = _data1_->mysocialnetwork;
	_tmp11_ = _tmp10_->contact_views;
	_tmp12_ = _data2_->view_path;
	_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, (const gchar*) _tmp12_);
	_tmp14_ = (LibsocialwebTestLibsocialwebContactViewTest*) _tmp13_;
	_tmp15_ = g_new0 (LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement, 0);
	_tmp16_ = _tmp15_;
	_tmp16__length1 = 0;
	g_signal_emit_by_name (_tmp14_, "contacts-added", _tmp16_, 0);
	_tmp16_ = (_vala_LibsocialwebTestLibsocialwebContactViewTestContactsAddedElement_array_free (_tmp16_, _tmp16__length1), NULL);
	_g_object_unref0 (_tmp14_);
	_tmp17_ = _data1_->main_loop;
	g_main_loop_quit (_tmp17_);
	_g_object_unref0 (view);
}


static void __lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_lambda2_ (source_object, self);
	block2_data_unref (self);
}


static gboolean _lambda3_ (DummyLswTests* self) {
	gboolean result = FALSE;
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda3_ (self);
	return result;
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (Block3Data* _data3_) {
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		_g_object_unref0 (_data3_->self);
		_g_free0 (_data3_->path);
		g_slice_free (Block3Data, _data3_);
	}
}


static gboolean _lambda6_ (Block3Data* _data3_) {
	DummyLswTests * self;
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar* text;
	const gchar* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* v;
	GError * _inner_error_ = NULL;
	self = _data3_->self;
	_tmp0_ = g_strdup ("([('mysocialnetwork', 'id01', %x, " "{'id': ['id01'], 'name': ['Gargantua'], " "'X-foo': ['secret']}), " "('mysocialnetwork', 'id02', %x, " "{'id': ['id02'], 'name': ['Pantagruel']})],)");
	text = _tmp0_;
	_tmp1_ = text;
	_tmp2_ = g_variant_new_parsed (_tmp1_, 1300792578, 1300792579, NULL);
	_tmp3_ = g_variant_ref_sink (_tmp2_);
	v = _tmp3_;
	{
		GDBusConnection* _tmp4_ = NULL;
		GDBusConnection* conn;
		GDBusConnection* _tmp5_;
		const gchar* _tmp6_;
		GVariant* _tmp7_;
		_tmp4_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
		conn = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch1_g_io_error;
			}
			goto __catch1_g_error;
		}
		_tmp5_ = conn;
		_tmp6_ = _data3_->path;
		_tmp7_ = v;
		g_dbus_connection_emit_signal (_tmp5_, NULL, _tmp6_, "com.meego.libsocialweb.ContactView", "ContactsAdded", _tmp7_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (conn);
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch1_g_io_error;
			}
			goto __catch1_g_error;
		}
		_g_object_unref0 (conn);
	}
	goto __finally1;
	__catch1_g_io_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		_g_variant_unref0 (v);
		_g_free0 (text);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	result = FALSE;
	_g_variant_unref0 (v);
	_g_free0 (text);
	return result;
}


static gboolean __lambda6__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda6_ (self);
	return result;
}


static void _lambda5_ (const gchar* path, DummyLswTests* self) {
	Block3Data* _data3_;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (path != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = path;
	_tmp1_ = g_strdup (_tmp0_);
	_data3_->path = _tmp1_;
	g_debug ("dummy-lsw.vala:109: OpenViewCalled.connect");
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda6__gsource_func, block3_data_ref (_data3_), block3_data_unref);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


static void __lambda5__libsocialweb_test_libsocialweb_contact_view_test_start_called (LibsocialwebTestLibsocialwebContactViewTest* _sender, const gchar* path, gpointer self) {
	_lambda5_ (path, self);
}


static void _lambda4_ (const gchar* query, GHashTable* p, const gchar* path, Block1Data* _data1_) {
	DummyLswTests * self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	LibsocialwebTestLibsocialwebServiceTest* _tmp2_;
	GeeHashMap* _tmp3_;
	const gchar* _tmp4_;
	gpointer _tmp5_ = NULL;
	LibsocialwebTestLibsocialwebContactViewTest* _tmp6_;
	self = _data1_->self;
	g_return_if_fail (query != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (path != NULL);
	g_debug ("dummy-lsw.vala:105: mysocialnetwork.OpenViewCalled.connect");
	_tmp0_ = path;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (_data1_->view_path);
	_data1_->view_path = _tmp1_;
	_tmp2_ = _data1_->mysocialnetwork;
	_tmp3_ = _tmp2_->contact_views;
	_tmp4_ = path;
	_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp4_);
	_tmp6_ = (LibsocialwebTestLibsocialwebContactViewTest*) _tmp5_;
	g_signal_connect_object (_tmp6_, "start-called", (GCallback) __lambda5__libsocialweb_test_libsocialweb_contact_view_test_start_called, self, 0);
	_g_object_unref0 (_tmp6_);
}


static void __lambda4__libsocialweb_test_libsocialweb_service_test_open_view_called (LibsocialwebTestLibsocialwebServiceTest* _sender, const gchar* query, GHashTable* p, const gchar* path, gpointer self) {
	_lambda4_ (query, p, path, self);
}


static void _lambda7_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_) {
	DummyLswTests * self;
	GeeSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GeeSet* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	GMainLoop* _tmp22_;
	self = _data1_->self;
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	g_debug ("dummy-lsw.vala:144: Aggregator got some data!");
	_tmp0_ = added;
	_tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_assert (_tmp2_ == 2);
	_tmp3_ = removed;
	_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_assert (_tmp5_ == 0);
	{
		GeeSet* _tmp6_;
		GeeIterator* _tmp7_ = NULL;
		GeeIterator* _i_it;
		_tmp6_ = added;
		_tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
		_i_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			gboolean _tmp9_ = FALSE;
			GeeIterator* _tmp10_;
			gpointer _tmp11_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* nickname;
			const gchar* _tmp16_;
			const gchar* _tmp19_;
			_tmp8_ = _i_it;
			_tmp9_ = gee_iterator_next (_tmp8_);
			if (!_tmp9_) {
				break;
			}
			_tmp10_ = _i_it;
			_tmp11_ = gee_iterator_get (_tmp10_);
			i = (FolksIndividual*) _tmp11_;
			_tmp12_ = i;
			_tmp13_ = folks_name_details_get_nickname (FOLKS_NAME_DETAILS (_tmp12_));
			_tmp14_ = _tmp13_;
			_tmp15_ = g_strdup (_tmp14_);
			nickname = _tmp15_;
			_tmp16_ = nickname;
			if (g_strcmp0 (_tmp16_, "Gargantua") == 0) {
				FolksIndividual* _tmp17_;
				FolksIndividual* _tmp18_;
				_tmp17_ = i;
				_tmp18_ = _g_object_ref0 (_tmp17_);
				_g_object_unref0 (_data1_->i1);
				_data1_->i1 = _tmp18_;
			}
			_tmp19_ = nickname;
			if (g_strcmp0 (_tmp19_, "Pantagruel") == 0) {
				FolksIndividual* _tmp20_;
				FolksIndividual* _tmp21_;
				_tmp20_ = i;
				_tmp21_ = _g_object_ref0 (_tmp20_);
				_g_object_unref0 (_data1_->i2);
				_data1_->i2 = _tmp21_;
			}
			_g_free0 (nickname);
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp22_ = _data1_->main_loop;
	g_main_loop_quit (_tmp22_);
}


static void __lambda7__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_lambda7_ (added, removed, message, actor, reason, self);
}


static gboolean _lambda8_ (DummyLswTests* self) {
	gboolean result = FALSE;
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda8__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda8_ (self);
	return result;
}


static SwContact* _vala_SwContact_copy (SwContact* self) {
	return g_boxed_copy (sw_contact_get_type (), self);
}


static gpointer __vala_SwContact_copy0 (gpointer self) {
	return self ? _vala_SwContact_copy (self) : NULL;
}


static gboolean _lambda9_ (Block1Data* _data1_) {
	DummyLswTests * self;
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar* text;
	const gchar* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* v;
	GError * _inner_error_ = NULL;
	self = _data1_->self;
	_tmp0_ = g_strdup ("([('mysocialnetwork', 'id01', %x, " "{'id': ['id01'], 'name': ['Rabelais'], " "'X-foo': ['secret'], 'X-bar': ['bar']})],)");
	text = _tmp0_;
	_tmp1_ = text;
	_tmp2_ = g_variant_new_parsed (_tmp1_, 1300792581, NULL);
	_tmp3_ = g_variant_ref_sink (_tmp2_);
	v = _tmp3_;
	{
		GDBusConnection* _tmp4_ = NULL;
		GDBusConnection* conn;
		GDBusConnection* _tmp5_;
		const gchar* _tmp6_;
		GVariant* _tmp7_;
		_tmp4_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
		conn = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch2_g_io_error;
			}
			goto __catch2_g_error;
		}
		_tmp5_ = conn;
		_tmp6_ = _data1_->view_path;
		_tmp7_ = v;
		g_dbus_connection_emit_signal (_tmp5_, NULL, _tmp6_, "com.meego.libsocialweb.ContactView", "ContactsChanged", _tmp7_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (conn);
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch2_g_io_error;
			}
			goto __catch2_g_error;
		}
		_g_object_unref0 (conn);
	}
	goto __finally2;
	__catch2_g_io_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally2:
	if (_inner_error_ != NULL) {
		_g_variant_unref0 (v);
		_g_free0 (text);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	result = FALSE;
	_g_variant_unref0 (v);
	_g_free0 (text);
	return result;
}


static gboolean __lambda9__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda9_ (self);
	return result;
}


static void _lambda10_ (Block1Data* _data1_) {
	DummyLswTests * self;
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* nickname;
	const gchar* _tmp4_;
	SwContact* _tmp5_;
	const gchar* _tmp6_ = NULL;
	SwContact* _tmp7_;
	const gchar* _tmp8_ = NULL;
	SwContact* _tmp9_;
	const gchar* _tmp10_ = NULL;
	GMainLoop* _tmp11_;
	self = _data1_->self;
	g_debug ("dummy-lsw.vala:220: Aggregator changed some data!");
	_tmp0_ = _data1_->i1;
	_tmp1_ = folks_name_details_get_nickname (FOLKS_NAME_DETAILS (_tmp0_));
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	nickname = _tmp3_;
	_tmp4_ = nickname;
	g_assert (g_strcmp0 (_tmp4_, "Rabelais") == 0);
	_tmp5_ = _data1_->contact1;
	_tmp6_ = sw_contact_get_value (_tmp5_, "id");
	g_assert (g_strcmp0 (_tmp6_, "id01") == 0);
	_tmp7_ = _data1_->contact1;
	_tmp8_ = sw_contact_get_value (_tmp7_, "X-foo");
	g_assert (g_strcmp0 (_tmp8_, "secret") == 0);
	_tmp9_ = _data1_->contact1;
	_tmp10_ = sw_contact_get_value (_tmp9_, "X-bar");
	g_assert (g_strcmp0 (_tmp10_, "bar") == 0);
	_tmp11_ = _data1_->main_loop;
	g_main_loop_quit (_tmp11_);
	_g_free0 (nickname);
}


static void __lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_lambda10_ (self);
}


static gboolean _lambda11_ (DummyLswTests* self) {
	gboolean result = FALSE;
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda11__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda11_ (self);
	return result;
}


static gboolean _lambda12_ (Block1Data* _data1_) {
	DummyLswTests * self;
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar* text;
	const gchar* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* v;
	GError * _inner_error_ = NULL;
	self = _data1_->self;
	_tmp0_ = g_strdup ("([('mysocialnetwork', 'id01'), " "('mysocialnetwork', 'id02')],)");
	text = _tmp0_;
	_tmp1_ = text;
	_tmp2_ = g_variant_new_parsed (_tmp1_, NULL);
	_tmp3_ = g_variant_ref_sink (_tmp2_);
	v = _tmp3_;
	{
		GDBusConnection* _tmp4_ = NULL;
		GDBusConnection* conn;
		GDBusConnection* _tmp5_;
		const gchar* _tmp6_;
		GVariant* _tmp7_;
		_tmp4_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
		conn = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch3_g_io_error;
			}
			goto __catch3_g_error;
		}
		_tmp5_ = conn;
		_tmp6_ = _data1_->view_path;
		_tmp7_ = v;
		g_dbus_connection_emit_signal (_tmp5_, NULL, _tmp6_, "com.meego.libsocialweb.ContactView", "ContactsRemoved", _tmp7_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (conn);
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch3_g_io_error;
			}
			goto __catch3_g_error;
		}
		_g_object_unref0 (conn);
	}
	goto __finally3;
	__catch3_g_io_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally3:
	if (_inner_error_ != NULL) {
		_g_variant_unref0 (v);
		_g_free0 (text);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return FALSE;
	}
	result = FALSE;
	_g_variant_unref0 (v);
	_g_free0 (text);
	return result;
}


static gboolean __lambda12__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda12_ (self);
	return result;
}


static void _lambda13_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_) {
	DummyLswTests * self;
	GeeSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GeeSet* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	GMainLoop* _tmp17_;
	self = _data1_->self;
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	g_debug ("dummy-lsw.vala:264: Aggregator deleted some data!");
	_tmp0_ = added;
	_tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_assert (_tmp2_ == 0);
	_tmp3_ = removed;
	_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_assert (_tmp5_ == 2);
	{
		GeeSet* _tmp6_;
		GeeIterator* _tmp7_ = NULL;
		GeeIterator* _i_it;
		_tmp6_ = removed;
		_tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
		_i_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			gboolean _tmp9_ = FALSE;
			GeeIterator* _tmp10_;
			gpointer _tmp11_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* nickname;
			const gchar* _tmp16_;
			_tmp8_ = _i_it;
			_tmp9_ = gee_iterator_next (_tmp8_);
			if (!_tmp9_) {
				break;
			}
			_tmp10_ = _i_it;
			_tmp11_ = gee_iterator_get (_tmp10_);
			i = (FolksIndividual*) _tmp11_;
			_tmp12_ = i;
			_tmp13_ = folks_name_details_get_nickname (FOLKS_NAME_DETAILS (_tmp12_));
			_tmp14_ = _tmp13_;
			_tmp15_ = g_strdup (_tmp14_);
			nickname = _tmp15_;
			_tmp16_ = nickname;
			g_debug ("dummy-lsw.vala:270: deleted nickname: %s", _tmp16_);
			_g_free0 (nickname);
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp17_ = _data1_->main_loop;
	g_main_loop_quit (_tmp17_);
}


static void __lambda13__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_lambda13_ (added, removed, message, actor, reason, self);
}


static gboolean _lambda14_ (DummyLswTests* self) {
	gboolean result = FALSE;
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda14__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda14_ (self);
	return result;
}


void dummy_lsw_tests_test_dummy_libsocialweb (DummyLswTests* self) {
	Block1Data* _data1_;
	GMainLoop* _tmp0_;
	LibsocialwebTestBackend* _tmp1_;
	guint _tmp2_ = 0U;
	guint timer_id;
	LibsocialwebTestBackend* _tmp3_;
	GMainLoop* _tmp4_;
	guint _tmp5_;
	LibsocialwebTestBackend* _tmp6_;
	LibsocialwebTestLibsocialwebServiceTest* _tmp7_ = NULL;
	GHashTable* _tmp8_;
	GHashTable* p;
	guint _tmp15_ = 0U;
	GMainLoop* _tmp16_;
	guint _tmp17_;
	gchar* _tmp18_;
	LibsocialwebTestLibsocialwebServiceTest* _tmp19_;
	FolksIndividualAggregator* _tmp20_;
	FolksIndividualAggregator* aggregator;
	FolksIndividualAggregator* _tmp21_;
	gulong _tmp22_ = 0UL;
	gulong handler_id;
	FolksIndividualAggregator* _tmp23_;
	guint _tmp24_ = 0U;
	GMainLoop* _tmp25_;
	guint _tmp26_;
	FolksIndividualAggregator* _tmp27_;
	gulong _tmp28_;
	FolksIndividual* _tmp29_;
	FolksIndividual* _tmp30_;
	FolksPersona* persona1;
	FolksPersona* persona2;
	FolksPersona* _tmp51_;
	FolksPersona* _tmp52_;
	FolksPersona* _tmp53_;
	SwContact* _tmp54_;
	SwContact* _tmp55_;
	SwContact* _tmp56_;
	FolksPersona* _tmp57_;
	SwContact* _tmp58_;
	SwContact* _tmp59_;
	SwContact* _tmp60_;
	SwContact* contact2;
	SwContact* _tmp61_;
	SwContact* _tmp62_;
	SwContact* _tmp63_;
	const gchar* _tmp64_ = NULL;
	SwContact* _tmp65_;
	const gchar* _tmp66_ = NULL;
	SwContact* _tmp67_;
	const gchar* _tmp68_ = NULL;
	SwContact* _tmp69_;
	const gchar* _tmp70_ = NULL;
	SwContact* _tmp71_;
	const gchar* _tmp72_ = NULL;
	FolksIndividual* _tmp73_;
	gulong _tmp74_ = 0UL;
	guint _tmp75_ = 0U;
	GMainLoop* _tmp76_;
	guint _tmp77_;
	FolksIndividual* _tmp78_;
	gulong _tmp79_;
	FolksIndividualAggregator* _tmp80_;
	gulong _tmp81_ = 0UL;
	guint _tmp82_ = 0U;
	GMainLoop* _tmp83_;
	guint _tmp84_;
	FolksIndividualAggregator* _tmp85_;
	gulong _tmp86_;
	LibsocialwebTestBackend* _tmp87_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_data1_->main_loop = _tmp0_;
	_tmp1_ = self->priv->_lsw_backend;
	g_signal_connect_data (_tmp1_, "ready", (GCallback) __lambda0__libsocialweb_test_backend_ready, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	_tmp2_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda1__gsource_func, g_object_ref (self), g_object_unref);
	timer_id = _tmp2_;
	_tmp3_ = self->priv->_lsw_backend;
	libsocialweb_test_backend_set_up (_tmp3_);
	_tmp4_ = _data1_->main_loop;
	g_main_loop_run (_tmp4_);
	_tmp5_ = timer_id;
	g_source_remove (_tmp5_);
	_tmp6_ = self->priv->_lsw_backend;
	_tmp7_ = libsocialweb_test_backend_add_service (_tmp6_, "mysocialnetwork");
	_data1_->mysocialnetwork = _tmp7_;
	_tmp8_ = g_hash_table_new_full (NULL, NULL, _g_free0_, _g_free0_);
	p = _tmp8_;
	{
		Block2Data* _data2_;
		LibsocialwebTestLibsocialwebServiceTest* _tmp9_;
		GHashTable* _tmp10_;
		char* _tmp11_ = NULL;
		GDBusConnection* _tmp12_ = NULL;
		GDBusConnection* conn;
		GDBusConnection* _tmp13_;
		const char* _tmp14_;
		_data2_ = g_slice_new0 (Block2Data);
		_data2_->_ref_count_ = 1;
		_data2_->_data1_ = block1_data_ref (_data1_);
		_tmp9_ = _data1_->mysocialnetwork;
		_tmp10_ = p;
		_tmp11_ = libsocialweb_test_libsocialweb_service_query_test_OpenView ((LibsocialwebTestLibsocialwebServiceQueryTest*) _tmp9_, "feed", _tmp10_, &_inner_error_);
		_data2_->view_path = _tmp11_;
		if (_inner_error_ != NULL) {
			block2_data_unref (_data2_);
			_data2_ = NULL;
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			block2_data_unref (_data2_);
			_data2_ = NULL;
			_g_hash_table_unref0 (p);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp12_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
		conn = _tmp12_;
		if (_inner_error_ != NULL) {
			block2_data_unref (_data2_);
			_data2_ = NULL;
			if (_inner_error_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			block2_data_unref (_data2_);
			_data2_ = NULL;
			_g_hash_table_unref0 (p);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp13_ = conn;
		_tmp14_ = _data2_->view_path;
		g_async_initable_new_async (LIBSOCIALWEB_TEST_TYPE_CONTACT_VIEW_PROXY, 0, NULL, __lambda2__gasync_ready_callback, block2_data_ref (_data2_), "g-flags", 0, "g-name", "com.meego.libsocialweb", "g-connection", _tmp13_, "g-object-path", (const gchar*) _tmp14_, "g-interface-name", "com.meego.libsocialweb.ContactView", NULL);
		_g_object_unref0 (conn);
		block2_data_unref (_data2_);
		_data2_ = NULL;
	}
	goto __finally0;
	__catch0_g_io_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		_g_hash_table_unref0 (p);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp15_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda3__gsource_func, g_object_ref (self), g_object_unref);
	timer_id = _tmp15_;
	_tmp16_ = _data1_->main_loop;
	g_main_loop_run (_tmp16_);
	_tmp17_ = timer_id;
	g_source_remove (_tmp17_);
	_tmp18_ = g_strdup ("");
	_data1_->view_path = _tmp18_;
	_tmp19_ = _data1_->mysocialnetwork;
	g_signal_connect_data (_tmp19_, "open-view-called", (GCallback) __lambda4__libsocialweb_test_libsocialweb_service_test_open_view_called, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	_tmp20_ = folks_individual_aggregator_new ();
	aggregator = _tmp20_;
	_data1_->i1 = NULL;
	_data1_->i2 = NULL;
	_tmp21_ = aggregator;
	_tmp22_ = g_signal_connect_data (_tmp21_, "individuals-changed", (GCallback) __lambda7__folks_individual_aggregator_individuals_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	handler_id = _tmp22_;
	_tmp23_ = aggregator;
	folks_individual_aggregator_prepare (_tmp23_, NULL, NULL);
	_tmp24_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda8__gsource_func, g_object_ref (self), g_object_unref);
	timer_id = _tmp24_;
	_tmp25_ = _data1_->main_loop;
	g_main_loop_run (_tmp25_);
	_tmp26_ = timer_id;
	g_source_remove (_tmp26_);
	_tmp27_ = aggregator;
	_tmp28_ = handler_id;
	g_signal_handler_disconnect ((GObject*) _tmp27_, _tmp28_);
	_tmp29_ = _data1_->i1;
	g_assert (_tmp29_ != NULL);
	_tmp30_ = _data1_->i2;
	g_assert (_tmp30_ != NULL);
	persona1 = NULL;
	persona2 = NULL;
	{
		FolksIndividual* _tmp31_;
		GeeSet* _tmp32_;
		GeeSet* _tmp33_;
		GeeIterator* _tmp34_ = NULL;
		GeeIterator* _p1_it;
		_tmp31_ = _data1_->i1;
		_tmp32_ = folks_individual_get_personas (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = gee_iterable_iterator ((GeeIterable*) _tmp33_);
		_p1_it = _tmp34_;
		while (TRUE) {
			GeeIterator* _tmp35_;
			gboolean _tmp36_ = FALSE;
			GeeIterator* _tmp37_;
			gpointer _tmp38_ = NULL;
			FolksPersona* p1;
			FolksPersona* _tmp39_;
			FolksPersona* _tmp40_;
			_tmp35_ = _p1_it;
			_tmp36_ = gee_iterator_next (_tmp35_);
			if (!_tmp36_) {
				break;
			}
			_tmp37_ = _p1_it;
			_tmp38_ = gee_iterator_get (_tmp37_);
			p1 = (FolksPersona*) _tmp38_;
			_tmp39_ = p1;
			_tmp40_ = _g_object_ref0 (_tmp39_);
			_g_object_unref0 (persona1);
			persona1 = _tmp40_;
			_g_object_unref0 (p1);
			break;
		}
		_g_object_unref0 (_p1_it);
	}
	{
		FolksIndividual* _tmp41_;
		GeeSet* _tmp42_;
		GeeSet* _tmp43_;
		GeeIterator* _tmp44_ = NULL;
		GeeIterator* _p2_it;
		_tmp41_ = _data1_->i2;
		_tmp42_ = folks_individual_get_personas (_tmp41_);
		_tmp43_ = _tmp42_;
		_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
		_p2_it = _tmp44_;
		while (TRUE) {
			GeeIterator* _tmp45_;
			gboolean _tmp46_ = FALSE;
			GeeIterator* _tmp47_;
			gpointer _tmp48_ = NULL;
			FolksPersona* p2;
			FolksPersona* _tmp49_;
			FolksPersona* _tmp50_;
			_tmp45_ = _p2_it;
			_tmp46_ = gee_iterator_next (_tmp45_);
			if (!_tmp46_) {
				break;
			}
			_tmp47_ = _p2_it;
			_tmp48_ = gee_iterator_get (_tmp47_);
			p2 = (FolksPersona*) _tmp48_;
			_tmp49_ = p2;
			_tmp50_ = _g_object_ref0 (_tmp49_);
			_g_object_unref0 (persona2);
			persona2 = _tmp50_;
			_g_object_unref0 (p2);
			break;
		}
		_g_object_unref0 (_p2_it);
	}
	_tmp51_ = persona1;
	g_assert (SWF_IS_PERSONA (_tmp51_));
	_tmp52_ = persona2;
	g_assert (SWF_IS_PERSONA (_tmp52_));
	_tmp53_ = persona1;
	_tmp54_ = swf_persona_get_lsw_contact (SWF_PERSONA (_tmp53_));
	_tmp55_ = _tmp54_;
	_tmp56_ = __vala_SwContact_copy0 (_tmp55_);
	_data1_->contact1 = _tmp56_;
	_tmp57_ = persona2;
	_tmp58_ = swf_persona_get_lsw_contact (SWF_PERSONA (_tmp57_));
	_tmp59_ = _tmp58_;
	_tmp60_ = __vala_SwContact_copy0 (_tmp59_);
	contact2 = _tmp60_;
	_tmp61_ = _data1_->contact1;
	g_assert (_tmp61_ != NULL);
	_tmp62_ = contact2;
	g_assert (_tmp62_ != NULL);
	_tmp63_ = _data1_->contact1;
	_tmp64_ = sw_contact_get_value (_tmp63_, "id");
	g_assert (g_strcmp0 (_tmp64_, "id01") == 0);
	_tmp65_ = _data1_->contact1;
	_tmp66_ = sw_contact_get_value (_tmp65_, "X-foo");
	g_assert (g_strcmp0 (_tmp66_, "secret") == 0);
	_tmp67_ = _data1_->contact1;
	_tmp68_ = sw_contact_get_value (_tmp67_, "X-bar");
	g_assert (_tmp68_ == NULL);
	_tmp69_ = contact2;
	_tmp70_ = sw_contact_get_value (_tmp69_, "id");
	g_assert (g_strcmp0 (_tmp70_, "id02") == 0);
	_tmp71_ = contact2;
	_tmp72_ = sw_contact_get_value (_tmp71_, "X-foo");
	g_assert (_tmp72_ == NULL);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda9__gsource_func, block1_data_ref (_data1_), block1_data_unref);
	_tmp73_ = _data1_->i1;
	_tmp74_ = g_signal_connect_data ((GObject*) _tmp73_, "notify::nickname", (GCallback) __lambda10__g_object_notify, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	handler_id = _tmp74_;
	_tmp75_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda11__gsource_func, g_object_ref (self), g_object_unref);
	timer_id = _tmp75_;
	_tmp76_ = _data1_->main_loop;
	g_main_loop_run (_tmp76_);
	_tmp77_ = timer_id;
	g_source_remove (_tmp77_);
	_tmp78_ = _data1_->i1;
	_tmp79_ = handler_id;
	g_signal_handler_disconnect ((GObject*) _tmp78_, _tmp79_);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda12__gsource_func, block1_data_ref (_data1_), block1_data_unref);
	_tmp80_ = aggregator;
	_tmp81_ = g_signal_connect_data (_tmp80_, "individuals-changed", (GCallback) __lambda13__folks_individual_aggregator_individuals_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	handler_id = _tmp81_;
	_tmp82_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda14__gsource_func, g_object_ref (self), g_object_unref);
	timer_id = _tmp82_;
	_tmp83_ = _data1_->main_loop;
	g_main_loop_run (_tmp83_);
	_tmp84_ = timer_id;
	g_source_remove (_tmp84_);
	_tmp85_ = aggregator;
	_tmp86_ = handler_id;
	g_signal_handler_disconnect ((GObject*) _tmp85_, _tmp86_);
	_tmp87_ = self->priv->_lsw_backend;
	libsocialweb_test_backend_tear_down (_tmp87_);
	__vala_SwContact_free0 (contact2);
	_g_object_unref0 (persona2);
	_g_object_unref0 (persona1);
	_g_object_unref0 (aggregator);
	_g_hash_table_unref0 (p);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}


static void dummy_lsw_tests_class_init (DummyLswTestsClass * klass) {
	dummy_lsw_tests_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DummyLswTestsPrivate));
	FOLKS_TEST_CASE_CLASS (klass)->set_up = dummy_lsw_tests_real_set_up;
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = dummy_lsw_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = dummy_lsw_tests_finalize;
}


static void dummy_lsw_tests_instance_init (DummyLswTests * self) {
	self->priv = DUMMY_LSW_TESTS_GET_PRIVATE (self);
}


static void dummy_lsw_tests_finalize (GObject* obj) {
	DummyLswTests * self;
	self = DUMMY_LSW_TESTS (obj);
	_libsocialweb_test_backend_unref0 (self->priv->_lsw_backend);
	G_OBJECT_CLASS (dummy_lsw_tests_parent_class)->finalize (obj);
}


GType dummy_lsw_tests_get_type (void) {
	static volatile gsize dummy_lsw_tests_type_id__volatile = 0;
	if (g_once_init_enter (&dummy_lsw_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DummyLswTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dummy_lsw_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DummyLswTests), 0, (GInstanceInitFunc) dummy_lsw_tests_instance_init, NULL };
		GType dummy_lsw_tests_type_id;
		dummy_lsw_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "DummyLswTests", &g_define_type_info, 0);
		g_once_init_leave (&dummy_lsw_tests_type_id__volatile, dummy_lsw_tests_type_id);
	}
	return dummy_lsw_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	GTestSuite* _tmp1_;
	DummyLswTests* _tmp2_;
	DummyLswTests* _tmp3_;
	GTestSuite* _tmp4_ = NULL;
	g_test_init (&args_length1, &args, NULL);
	_tmp0_ = g_test_get_root ();
	root = _tmp0_;
	_tmp1_ = root;
	_tmp2_ = dummy_lsw_tests_new ();
	_tmp3_ = _tmp2_;
	_tmp4_ = folks_test_case_get_suite ((FolksTestCase*) _tmp3_);
	g_test_suite_add_suite (_tmp1_, _tmp4_);
	_g_object_unref0 (_tmp3_);
	g_test_run ();
	result = 0;
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return _vala_main (argv, argc);
}



