/* individual-retrieval.c generated by valac 0.29.3.10-b87a, the Vala compiler
 * generated from individual-retrieval.vala, do not modify */

/*
 * Copyright (C) 2013 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: Philip Withnall <philip.withnall@collabora.co.uk>
 */

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


#define TYPE_INDIVIDUAL_RETRIEVAL_TESTS (individual_retrieval_tests_get_type ())
#define INDIVIDUAL_RETRIEVAL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTests))
#define INDIVIDUAL_RETRIEVAL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTestsClass))
#define IS_INDIVIDUAL_RETRIEVAL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS))
#define IS_INDIVIDUAL_RETRIEVAL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INDIVIDUAL_RETRIEVAL_TESTS))
#define INDIVIDUAL_RETRIEVAL_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTestsClass))

typedef struct _IndividualRetrievalTests IndividualRetrievalTests;
typedef struct _IndividualRetrievalTestsClass IndividualRetrievalTestsClass;
typedef struct _IndividualRetrievalTestsPrivate IndividualRetrievalTestsPrivate;
typedef struct _Block1Data Block1Data;
#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_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block2Data Block2Data;
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _IndividualRetrievalTests {
	BluezTestTestCase parent_instance;
	IndividualRetrievalTestsPrivate * priv;
};

struct _IndividualRetrievalTestsClass {
	BluezTestTestCaseClass parent_class;
};

struct _Block1Data {
	int _ref_count_;
	IndividualRetrievalTests* self;
	GMainLoop* main_loop;
};

struct _Block2Data {
	int _ref_count_;
	IndividualRetrievalTests* self;
	GMainLoop* main_loop;
};

struct _Block3Data {
	int _ref_count_;
	IndividualRetrievalTests* self;
	GMainLoop* main_loop;
};

struct _Block4Data {
	int _ref_count_;
	Block3Data * _data3_;
	FolksIndividual* individual;
};


static gpointer individual_retrieval_tests_parent_class = NULL;

GType individual_retrieval_tests_get_type (void) G_GNUC_CONST;
enum  {
	INDIVIDUAL_RETRIEVAL_TESTS_DUMMY_PROPERTY
};
IndividualRetrievalTests* individual_retrieval_tests_new (void);
IndividualRetrievalTests* individual_retrieval_tests_construct (GType object_type);
void individual_retrieval_tests_test_singleton_individuals (IndividualRetrievalTests* self);
static void _individual_retrieval_tests_test_singleton_individuals_folks_test_case_test_method (gpointer self);
void individual_retrieval_tests_test_empty_address_book (IndividualRetrievalTests* self);
static void _individual_retrieval_tests_test_empty_address_book_folks_test_case_test_method (gpointer self);
void individual_retrieval_tests_test_photos_downloaded_later (IndividualRetrievalTests* self);
static void _individual_retrieval_tests_test_photos_downloaded_later_folks_test_case_test_method (gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda4_ (Block1Data* _data1_, GObject* o, GAsyncResult* r);
static void ___lambda4__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void __lambda5_ (Block2Data* _data2_, GObject* o, GAsyncResult* r);
static void ___lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda6_ (Block3Data* _data3_, GObject* o, GAsyncResult* r);
static void ___lambda6__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void ___lambda7_ (Block4Data* _data4_, GParamSpec* pspec);
static void ____lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
gint _vala_main (gchar** args, int args_length1);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void _individual_retrieval_tests_test_singleton_individuals_folks_test_case_test_method (gpointer self) {
#line 30 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	individual_retrieval_tests_test_singleton_individuals ((IndividualRetrievalTests*) self);
#line 129 "individual-retrieval.c"
}


static void _individual_retrieval_tests_test_empty_address_book_folks_test_case_test_method (gpointer self) {
#line 31 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	individual_retrieval_tests_test_empty_address_book ((IndividualRetrievalTests*) self);
#line 136 "individual-retrieval.c"
}


static void _individual_retrieval_tests_test_photos_downloaded_later_folks_test_case_test_method (gpointer self) {
#line 32 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	individual_retrieval_tests_test_photos_downloaded_later ((IndividualRetrievalTests*) self);
#line 143 "individual-retrieval.c"
}


IndividualRetrievalTests* individual_retrieval_tests_construct (GType object_type) {
	IndividualRetrievalTests * self = NULL;
#line 28 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	self = (IndividualRetrievalTests*) bluez_test_test_case_construct (object_type, "IndividualRetrieval");
#line 30 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "singleton individuals", _individual_retrieval_tests_test_singleton_individuals_folks_test_case_test_method, g_object_ref (self), g_object_unref);
#line 31 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "empty address book", _individual_retrieval_tests_test_empty_address_book_folks_test_case_test_method, g_object_ref (self), g_object_unref);
#line 32 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "photos downloaded later", _individual_retrieval_tests_test_photos_downloaded_later_folks_test_case_test_method, g_object_ref (self), g_object_unref);
#line 26 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return self;
#line 159 "individual-retrieval.c"
}


IndividualRetrievalTests* individual_retrieval_tests_new (void) {
#line 26 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return individual_retrieval_tests_construct (TYPE_INDIVIDUAL_RETRIEVAL_TESTS);
#line 166 "individual-retrieval.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return _data1_;
#line 175 "individual-retrieval.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 184 "individual-retrieval.c"
		IndividualRetrievalTests* self;
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		self = _data1_->self;
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_main_loop_unref0 (_data1_->main_loop);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_object_unref0 (self);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_slice_free (Block1Data, _data1_);
#line 194 "individual-retrieval.c"
	}
}


static void __lambda4_ (Block1Data* _data1_, GObject* o, GAsyncResult* r) {
	IndividualRetrievalTests* self;
	GError * _inner_error_ = NULL;
#line 66 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	self = _data1_->self;
#line 66 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (r != NULL);
#line 206 "individual-retrieval.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 70 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp0_ = r;
#line 70 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_individuals_finish (_tmp0_, &_inner_error_);
#line 70 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 215 "individual-retrieval.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e1 = NULL;
		const gchar* _tmp1_ = NULL;
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		e1 = _inner_error_;
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_inner_error_ = NULL;
#line 74 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp1_ = e1->message;
#line 74 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_error ("individual-retrieval.vala:74: Error preparing aggregator: %s", _tmp1_);
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_error_free0 (e1);
#line 234 "individual-retrieval.c"
	}
	__finally0:
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		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);
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_clear_error (&_inner_error_);
#line 68 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		return;
#line 245 "individual-retrieval.c"
	}
#line 77 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_main_loop_quit (_data1_->main_loop);
#line 249 "individual-retrieval.c"
}


static void ___lambda4__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	__lambda4_ (self, source_object, res);
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block1_data_unref (self);
#line 258 "individual-retrieval.c"
}


void individual_retrieval_tests_test_singleton_individuals (IndividualRetrievalTests* self) {
	Block1Data* _data1_;
	GMainLoop* _tmp0_ = NULL;
	BluezTestBackend* _tmp1_ = NULL;
	FolksIndividualAggregator* aggregator = NULL;
	FolksIndividualAggregator* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar** _tmp5_ = NULL;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (self != NULL);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data1_->_ref_count_ = 1;
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data1_->self = g_object_ref (self);
#line 40 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 40 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data1_->main_loop = _tmp0_;
#line 43 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp1_ = ((BluezTestTestCase*) self)->bluez_backend;
#line 43 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	bluez_test_backend_create_simple_device_with_vcard (_tmp1_, "BEGIN:VCARD\n" "VERSION:3.0\n" "N:Gump;Forrest;Mr.\n" "FN:Forrest Gump\n" "NICKNAME:Fir\n" "TEL;TYPE=WORK,VOICE:(111) 555-1212\n" "TEL;TYPE=HOME,VOICE:(404) 555-1212\n" "EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com\n" "URL;TYPE=HOME:http://example.com/\n" "END:VCARD\n" "\n" "BEGIN:VCARD\n" "VERSION:3.0\n" "N:Jones;Pam;Mrs.\n" "FN:Pam Jones\n" "TEL:0123456789\n" "END:VCARD\n", NULL, NULL);
#line 64 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp2_ = folks_individual_aggregator_dup ();
#line 64 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	aggregator = _tmp2_;
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp3_ = g_strdup ("Forrest Gump");
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp4_ = g_strdup ("Pam Jones");
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_ = g_new0 (gchar*, 2 + 1);
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_[0] = _tmp3_;
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_[1] = _tmp4_;
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6_ = _tmp5_;
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6__length1 = 2;
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_individuals (aggregator, _tmp6_, 2, ___lambda4__gasync_ready_callback, block1_data_ref (_data1_));
#line 65 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
#line 80 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_loop_run_with_timeout (_data1_->main_loop, 5);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_g_object_unref0 (aggregator);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block1_data_unref (_data1_);
#line 38 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data1_ = NULL;
#line 319 "individual-retrieval.c"
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return _data2_;
#line 328 "individual-retrieval.c"
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 337 "individual-retrieval.c"
		IndividualRetrievalTests* self;
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		self = _data2_->self;
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_main_loop_unref0 (_data2_->main_loop);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_object_unref0 (self);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_slice_free (Block2Data, _data2_);
#line 347 "individual-retrieval.c"
	}
}


static void __lambda5_ (Block2Data* _data2_, GObject* o, GAsyncResult* r) {
	IndividualRetrievalTests* self;
	GError * _inner_error_ = NULL;
#line 95 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	self = _data2_->self;
#line 95 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (r != NULL);
#line 359 "individual-retrieval.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 99 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp0_ = r;
#line 99 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_quiescence_finish (_tmp0_, &_inner_error_);
#line 99 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 368 "individual-retrieval.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e1 = NULL;
		const gchar* _tmp1_ = NULL;
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		e1 = _inner_error_;
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_inner_error_ = NULL;
#line 103 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp1_ = e1->message;
#line 103 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_error ("individual-retrieval.vala:103: Error preparing aggregator: %s", _tmp1_);
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_error_free0 (e1);
#line 387 "individual-retrieval.c"
	}
	__finally1:
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		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);
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_clear_error (&_inner_error_);
#line 97 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		return;
#line 398 "individual-retrieval.c"
	}
#line 106 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_main_loop_quit (_data2_->main_loop);
#line 402 "individual-retrieval.c"
}


static void ___lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 94 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	__lambda5_ (self, source_object, res);
#line 94 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block2_data_unref (self);
#line 411 "individual-retrieval.c"
}


void individual_retrieval_tests_test_empty_address_book (IndividualRetrievalTests* self) {
	Block2Data* _data2_;
	GMainLoop* _tmp0_ = NULL;
	BluezTestBackend* _tmp1_ = NULL;
	FolksIndividualAggregator* aggregator = NULL;
	FolksIndividualAggregator* _tmp2_ = NULL;
	GeeMap* _tmp3_ = NULL;
	GeeMap* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (self != NULL);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data2_->_ref_count_ = 1;
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data2_->self = g_object_ref (self);
#line 86 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 86 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data2_->main_loop = _tmp0_;
#line 89 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp1_ = ((BluezTestTestCase*) self)->bluez_backend;
#line 89 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	bluez_test_backend_create_simple_device_with_vcard (_tmp1_, "", NULL, NULL);
#line 93 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp2_ = folks_individual_aggregator_dup ();
#line 93 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	aggregator = _tmp2_;
#line 94 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_quiescence (aggregator, ___lambda5__gasync_ready_callback, block2_data_ref (_data2_));
#line 109 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_loop_run_with_timeout (_data2_->main_loop, 5);
#line 112 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp3_ = folks_individual_aggregator_get_individuals (aggregator);
#line 112 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp4_ = _tmp3_;
#line 112 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_ = gee_map_get_size (_tmp4_);
#line 112 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6_ = _tmp5_;
#line 112 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_vala_assert (_tmp6_ == 0, "aggregator.individuals.size == 0");
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_g_object_unref0 (aggregator);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block2_data_unref (_data2_);
#line 84 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data2_ = NULL;
#line 465 "individual-retrieval.c"
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return _data3_;
#line 474 "individual-retrieval.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 483 "individual-retrieval.c"
		IndividualRetrievalTests* self;
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		self = _data3_->self;
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_main_loop_unref0 (_data3_->main_loop);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_object_unref0 (self);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_slice_free (Block3Data, _data3_);
#line 493 "individual-retrieval.c"
	}
}


static void __lambda6_ (Block3Data* _data3_, GObject* o, GAsyncResult* r) {
	IndividualRetrievalTests* self;
	GMainLoop* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 137 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	self = _data3_->self;
#line 137 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (r != NULL);
#line 506 "individual-retrieval.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp0_ = r;
#line 141 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_individuals_finish (_tmp0_, &_inner_error_);
#line 141 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 515 "individual-retrieval.c"
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e1 = NULL;
		const gchar* _tmp1_ = NULL;
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		e1 = _inner_error_;
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_inner_error_ = NULL;
#line 145 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp1_ = e1->message;
#line 145 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_error ("individual-retrieval.vala:145: Error preparing aggregator: %s", _tmp1_);
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_error_free0 (e1);
#line 534 "individual-retrieval.c"
	}
	__finally2:
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		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);
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_clear_error (&_inner_error_);
#line 139 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		return;
#line 545 "individual-retrieval.c"
	}
#line 148 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp2_ = _data3_->main_loop;
#line 148 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_main_loop_quit (_tmp2_);
#line 551 "individual-retrieval.c"
}


static void ___lambda6__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	__lambda6_ (self, source_object, res);
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block3_data_unref (self);
#line 560 "individual-retrieval.c"
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_atomic_int_inc (&_data4_->_ref_count_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return _data4_;
#line 569 "individual-retrieval.c"
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
#line 578 "individual-retrieval.c"
		IndividualRetrievalTests* self;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		self = _data4_->_data3_->self;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_g_object_unref0 (_data4_->individual);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		block3_data_unref (_data4_->_data3_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_->_data3_ = NULL;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_slice_free (Block4Data, _data4_);
#line 590 "individual-retrieval.c"
	}
}


static void ___lambda7_ (Block4Data* _data4_, GParamSpec* pspec) {
	Block3Data* _data3_;
	IndividualRetrievalTests* self;
	GParamSpec* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	FolksIndividual* _tmp2_ = NULL;
	GLoadableIcon* _tmp3_ = NULL;
	GLoadableIcon* _tmp4_ = NULL;
	GMainLoop* _tmp5_ = NULL;
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_ = _data4_->_data3_;
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	self = _data3_->self;
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (pspec != NULL);
#line 209 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp0_ = pspec;
#line 209 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp1_ = _tmp0_->name;
#line 209 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_vala_assert (g_strcmp0 (_tmp1_, "avatar") == 0, "pspec.name == \"avatar\"");
#line 210 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp2_ = _data4_->individual;
#line 210 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp3_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp2_);
#line 210 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp4_ = _tmp3_;
#line 210 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_vala_assert (_tmp4_ != NULL, "individual.avatar != null");
#line 211 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_ = _data3_->main_loop;
#line 211 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_main_loop_quit (_tmp5_);
#line 628 "individual-retrieval.c"
}


static void ____lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	___lambda7_ (self, pspec);
#line 635 "individual-retrieval.c"
}


void individual_retrieval_tests_test_photos_downloaded_later (IndividualRetrievalTests* self) {
	Block3Data* _data3_;
	GMainLoop* _tmp0_ = NULL;
	gulong vcard_signal_id = 0UL;
	BluezTestBackend* _tmp1_ = NULL;
	gulong _tmp2_ = 0UL;
	FolksIndividualAggregator* aggregator = NULL;
	FolksIndividualAggregator* _tmp3_ = NULL;
	FolksIndividualAggregator* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar** _tmp6_ = NULL;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	GMainLoop* _tmp8_ = NULL;
	BluezTestBackend* _tmp9_ = NULL;
	orgbluezobexMock* _tmp10_ = NULL;
	orgbluezobexMock* _tmp11_ = NULL;
	gulong _tmp12_ = 0UL;
	BluezTestBackend* _tmp13_ = NULL;
	FolksIndividualAggregator* _tmp14_ = NULL;
	GeeMap* _tmp15_ = NULL;
	GeeMap* _tmp16_ = NULL;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	GeeMapIterator* iter = NULL;
	FolksIndividualAggregator* _tmp19_ = NULL;
	GeeMap* _tmp20_ = NULL;
	GeeMap* _tmp21_ = NULL;
	GeeMapIterator* _tmp22_ = NULL;
	GMainLoop* _tmp31_ = NULL;
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_return_if_fail (self != NULL);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_ = g_slice_new0 (Block3Data);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_->_ref_count_ = 1;
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_->self = g_object_ref (self);
#line 118 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 118 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_->main_loop = _tmp0_;
#line 121 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp1_ = ((BluezTestTestCase*) self)->bluez_backend;
#line 121 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp2_ = bluez_test_backend_create_simple_device_with_vcard (_tmp1_, "BEGIN:VCARD\n" "VERSION:3.0\n" "N:Gump;Forrest;Mr.\n" "FN:Forrest Gump\n" "NICKNAME:Fir\n" "TEL;TYPE=WORK,VOICE:(111) 555-1212\n" "TEL;TYPE=HOME,VOICE:(404) 555-1212\n" "EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com\n" "URL;TYPE=HOME:http://example.com/\n" "END:VCARD\n", NULL, NULL);
#line 121 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	vcard_signal_id = _tmp2_;
#line 135 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp3_ = folks_individual_aggregator_dup ();
#line 135 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	aggregator = _tmp3_;
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp4_ = aggregator;
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp5_ = g_strdup ("Forrest Gump");
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6_ = g_new0 (gchar*, 1 + 1);
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp6_[0] = _tmp5_;
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp7_ = _tmp6_;
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp7__length1 = 1;
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_individuals (_tmp4_, _tmp7_, 1, ___lambda6__gasync_ready_callback, block3_data_ref (_data3_));
#line 136 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
#line 151 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp8_ = _data3_->main_loop;
#line 151 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_loop_run_with_timeout (_tmp8_, 5);
#line 155 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp9_ = ((BluezTestTestCase*) self)->bluez_backend;
#line 155 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp10_ = bluez_test_backend_get_mock_obex (_tmp9_);
#line 155 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp11_ = _tmp10_;
#line 155 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp12_ = vcard_signal_id;
#line 155 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_signal_handler_disconnect ((GObject*) _tmp11_, _tmp12_);
#line 156 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp13_ = ((BluezTestTestCase*) self)->bluez_backend;
#line 156 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	bluez_test_backend_set_simple_device_vcard (_tmp13_, "BEGIN:VCARD\n" "VERSION:3.0\n" "N:Gump;Forrest;Mr.\n" "FN:Forrest Gump\n" "NICKNAME:Fir\n" "TEL;TYPE=WORK,VOICE:(111) 555-1212\n" "TEL;TYPE=HOME,VOICE:(404) 555-1212\n" "EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com\n" "URL;TYPE=HOME:http://example.com/\n" "PHOTO;TYPE=jpeg;ENCODING=b:" "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDA" \
"oMDAsK" "CwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFB" \
"QUFBQU" "FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wgARCAAlAC" \
"ADAREA" "AhEBAxEB/8QAGgAAAwADAQAAAAAAAAAAAAAABgcIAAMFBP/EABoBAQADAQEBAAAAAAAAAA" \
"AAAAAD" "BAUCBgf/2gAMAwEAAhADEAAAAapJXNBV5gl8G4uLkNUaUIYew4otQ8+a+gYntscQryguHb" \
"Z+pAH2" "Y+ZPwzoOv//EAB4QAAICAwADAQAAAAAAAAAAAAMFBAYBAgcAEBUW/9oACAEBAAEFAvOtT2" \
"30ufOW" "qmzepo/tWKyw96ZYgHHKBdX352vVdJrXkd/UBaVXjDrY8F/kTvyDKxMj26aPMTn6QdZJLr" \
"wz5FUc" "sSyqFDTbKlmkQP8A/8QAHxEAAQQCAwEBAAAAAAAAAAAAAgABAwQREhMgITFR/9oACAEDAQ" \
"E/Aeta" "UInfdlMYmWRbHavTBh2L3KnieE9VUjGWTUvxS0dI8i+XUd6UGx9Vmxz48VabhPbCntHM+P" \
"jL/8QA" "JxEAAQMDAQcFAAAAAAAAAAAAAQIDBAAFETESICFBUXHwBhMikfH/2gAIAQIBAT8B3bvBen" \
"NpSyvG" "OXWoEZyKwG3V7R84b12vj5dLLPw2T9480q2zkz44dGvPvV4kriRg82dCPyonqISJYQ4NlB" \
"4DvUiw" "w5CiviCatltRb0qCTnNXGGmcx7SjioFpjQRlIyrr5pX/xAAuEAACAQIEAwYGAwAAAAAAAA" \
"ABAgMA" "BAUREhMhIjFBUWFxgZEQFDJCUrFD0eH/2gAIAQEABj8CpYbS4eG0gt1ldYpNJJZyufeezy" \
"9aiwbE" "ZTNHcxtlnNuaWGfbmfxIy+N7dWsC3UdqiWhYj+TnLZeWpQawXHJY12ASjpAv0nMlvcMx9K" \
"SaFxJF" "INSuvQirq5Vgtww24PFz0/v0q1sgdTqM5G73PE1iO4OaGIzofFRn/nrV5hkj57BEsQPYrd" \
"R7/uvl" "7m3jeGJzkG48emdK/wBw+oeNNhgmVZ7yN00fdoIIzqXel3p5+Xd09O4UzxTSQyE5/kPajL" \
"Pid3Fo" "5QLJ9nPz6502JWtxcG6HBmuH3NQpXY7sx46yP1X/xAAfEAEAAQUBAAMBAAAAAAAAAAABEQ" \
"AhQVFh" "MRBxkfD/2gAIAQEAAT8hrANf3gCCQckqMY2Pp+fB6xkNfMTQP0gjfHgXeU1IRQE+0Qm17o" \
"9OXZUS" "I0EKhlJs4GYvDql0TMdx/Zrqhsh1ptBl1SIe6wi4XVeEI3eM/RZfP2hzBYDFFZsCjIkcF/" \
"d1Z4w1" "CA9H+NUlhU7Su1f8Sr7hPO0xWEeRf2s7OFfF4ZkLzu2iNllBjgxX/9oADAMBAAIAAwAAAB" \
"ASQViS" "BhbUn//EACARAQABAwQDAQAAAAAAAAAAAAERACExQVFhwSCBsfH/2gAIAQMBAT8Q8dUAs5" \
"T9pPCf" "efIvfgyWJ75p28aO5SorS9O9T8Qu6W4KFOAWxp6plOEd0kaUkUkTwHe9f//EACERAQACAQ" \
"QDAAMA" "AAAAAAAAAAERMSEAQVGBIGFxkbHR/9oACAECAQE/EPHLEpZIfSZxxXemy3S7YMFyht+ivK" \
"WOXKMs" "kE4rsO86wPVHAvps9OocDLrJOe351EQMF5pCsTDXBbyOoSVR3d4Z0yuUmcVPv3pxASM3U/" \
"OdCC88" "z1/F7uv/xAAdEAEBAAMBAQEBAQAAAAAAAAABEQAhMUFRcWGB/9oACAEBAAE/EPcBt9CLg0" \
"mkItkW" "bCK+/Mi2KFKVLnuC5jcdY7QomwK5LuBR8HYKQcR1QYytJ8M0iIji8CRilWERrGzK/cZHYH" \
"eFgPgW" "tVgRTHHylCBCwOKZYo4K7QfGQ+v/AA6JyUCdhZB0LSgxVErXI33xGn7/ABwIkQz6W1i5pB" \
"7l1O1Q" "UdgKta18AhSHHRqw0Vdfqyk3ggOrmCAjpsQ7XOmIVMFktoFUcCCccJdlLIMWq/ZA/9k=\n" "END:VCARD\n");
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp14_ = aggregator;
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp15_ = folks_individual_aggregator_get_individuals (_tmp14_);
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp16_ = _tmp15_;
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp17_ = gee_map_get_size (_tmp16_);
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp18_ = _tmp17_;
#line 199 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_vala_assert (_tmp18_ == 1, "aggregator.individuals.size == 1");
#line 200 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp19_ = aggregator;
#line 200 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp20_ = folks_individual_aggregator_get_individuals (_tmp19_);
#line 200 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp21_ = _tmp20_;
#line 200 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp22_ = gee_map_map_iterator (_tmp21_);
#line 200 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	iter = _tmp22_;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	while (TRUE) {
#line 749 "individual-retrieval.c"
		Block4Data* _data4_;
		GeeMapIterator* _tmp23_ = NULL;
		gboolean _tmp24_ = FALSE;
		GeeMapIterator* _tmp25_ = NULL;
		gpointer _tmp26_ = NULL;
		FolksIndividual* _tmp27_ = NULL;
		GLoadableIcon* _tmp28_ = NULL;
		GLoadableIcon* _tmp29_ = NULL;
		FolksIndividual* _tmp30_ = NULL;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_ = g_slice_new0 (Block4Data);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_->_ref_count_ = 1;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_->_data3_ = block3_data_ref (_data3_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp23_ = iter;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp24_ = gee_map_iterator_next (_tmp23_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		if (!(_tmp24_ == TRUE)) {
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
			block4_data_unref (_data4_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
			_data4_ = NULL;
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
			break;
#line 777 "individual-retrieval.c"
		}
#line 203 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp25_ = iter;
#line 203 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp26_ = gee_map_iterator_get_value (_tmp25_);
#line 203 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_->individual = (FolksIndividual*) _tmp26_;
#line 204 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp27_ = _data4_->individual;
#line 204 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp28_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp27_);
#line 204 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp29_ = _tmp28_;
#line 204 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_vala_assert (_tmp29_ == NULL, "individual.avatar == null");
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_tmp30_ = _data4_->individual;
#line 207 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		g_signal_connect_data ((GObject*) _tmp30_, "notify", (GCallback) ____lambda7__g_object_notify, block4_data_ref (_data4_), (GClosureNotify) block4_data_unref, 0);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		block4_data_unref (_data4_);
#line 201 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
		_data4_ = NULL;
#line 801 "individual-retrieval.c"
	}
#line 218 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp31_ = _data3_->main_loop;
#line 218 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_utils_loop_run_with_timeout (_tmp31_, 5);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_g_object_unref0 (iter);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_g_object_unref0 (aggregator);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	block3_data_unref (_data3_);
#line 116 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_data3_ = NULL;
#line 815 "individual-retrieval.c"
}


static void individual_retrieval_tests_class_init (IndividualRetrievalTestsClass * klass) {
#line 24 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	individual_retrieval_tests_parent_class = g_type_class_peek_parent (klass);
#line 822 "individual-retrieval.c"
}


static void individual_retrieval_tests_instance_init (IndividualRetrievalTests * self) {
}


GType individual_retrieval_tests_get_type (void) {
	static volatile gsize individual_retrieval_tests_type_id__volatile = 0;
	if (g_once_init_enter (&individual_retrieval_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IndividualRetrievalTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) individual_retrieval_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IndividualRetrievalTests), 0, (GInstanceInitFunc) individual_retrieval_tests_instance_init, NULL };
		GType individual_retrieval_tests_type_id;
		individual_retrieval_tests_type_id = g_type_register_static (BLUEZ_TEST_TYPE_TEST_CASE, "IndividualRetrievalTests", &g_define_type_info, 0);
		g_once_init_leave (&individual_retrieval_tests_type_id__volatile, individual_retrieval_tests_type_id);
	}
	return individual_retrieval_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	IndividualRetrievalTests* tests = NULL;
	IndividualRetrievalTests* _tmp0_ = NULL;
#line 224 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_test_init (&args_length1, &args, NULL);
#line 226 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_tmp0_ = individual_retrieval_tests_new ();
#line 226 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	tests = _tmp0_;
#line 227 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 228 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	g_test_run ();
#line 229 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 231 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	result = 0;
#line 231 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	_g_object_unref0 (tests);
#line 231 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return result;
#line 864 "individual-retrieval.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 222 "/opt/gnome3/source/folks/tests/bluez/individual-retrieval.vala"
	return _vala_main (argv, argc);
#line 874 "individual-retrieval.c"
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



