/* persona-store-capabilities.c generated by valac 0.13.4, the Vala compiler
 * generated from persona-store-capabilities.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: Travis Reitter <travis.reitter@collabora.co.uk>
 */

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


#define TYPE_PERSONA_STORE_CAPABILITIES_TESTS (persona_store_capabilities_tests_get_type ())
#define PERSONA_STORE_CAPABILITIES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PERSONA_STORE_CAPABILITIES_TESTS, PersonaStoreCapabilitiesTests))
#define PERSONA_STORE_CAPABILITIES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PERSONA_STORE_CAPABILITIES_TESTS, PersonaStoreCapabilitiesTestsClass))
#define IS_PERSONA_STORE_CAPABILITIES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PERSONA_STORE_CAPABILITIES_TESTS))
#define IS_PERSONA_STORE_CAPABILITIES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PERSONA_STORE_CAPABILITIES_TESTS))
#define PERSONA_STORE_CAPABILITIES_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PERSONA_STORE_CAPABILITIES_TESTS, PersonaStoreCapabilitiesTestsClass))

typedef struct _PersonaStoreCapabilitiesTests PersonaStoreCapabilitiesTests;
typedef struct _PersonaStoreCapabilitiesTestsClass PersonaStoreCapabilitiesTestsClass;
typedef struct _PersonaStoreCapabilitiesTestsPrivate PersonaStoreCapabilitiesTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _PersonaStoreCapabilitiesTests {
	FolksTestCase parent_instance;
	PersonaStoreCapabilitiesTestsPrivate * priv;
};

struct _PersonaStoreCapabilitiesTestsClass {
	FolksTestCaseClass parent_class;
};

struct _PersonaStoreCapabilitiesTestsPrivate {
	TpTestBackend* tp_backend;
	void* _account_handle;
	GeeHashSet* group_flags_received;
	gint _test_timeout;
};

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

struct _Block2Data {
	int _ref_count_;
	PersonaStoreCapabilitiesTests * self;
	FolksPersonaStore* store;
};


static gpointer persona_store_capabilities_tests_parent_class = NULL;

GType persona_store_capabilities_tests_get_type (void) G_GNUC_CONST;
#define PERSONA_STORE_CAPABILITIES_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PERSONA_STORE_CAPABILITIES_TESTS, PersonaStoreCapabilitiesTestsPrivate))
enum  {
	PERSONA_STORE_CAPABILITIES_TESTS_DUMMY_PROPERTY
};
PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_new (void);
PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_construct (GType object_type);
void persona_store_capabilities_tests_test_persona_store_capabilities (PersonaStoreCapabilitiesTests* self);
static void _persona_store_capabilities_tests_test_persona_store_capabilities_folks_test_case_test_method (gpointer self);
static void persona_store_capabilities_tests_real_set_up (FolksTestCase* base);
static void persona_store_capabilities_tests_real_tear_down (FolksTestCase* base);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static void __lambda0_ (PersonaStoreCapabilitiesTests* self, FolksBackend* b);
static void ___lambda1_ (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* ps);
static void persona_store_capabilities_tests_set_up_persona_store (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* store);
static void ____lambda1__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self);
static void ___lambda0__folks_backend_store_backend_available (FolksBackendStore* _sender, FolksBackend* backend, gpointer self);
static gboolean __lambda3_ (Block1Data* _data1_);
static gboolean ___lambda3__gsource_func (gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static void __lambda2_ (Block2Data* _data2_, GObject* obj, GAsyncResult* _result_);
static void persona_store_capabilities_tests_can_add_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void _persona_store_capabilities_tests_can_add_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void persona_store_capabilities_tests_can_remove_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void _persona_store_capabilities_tests_can_remove_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void persona_store_capabilities_tests_can_alias_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void _persona_store_capabilities_tests_can_alias_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void persona_store_capabilities_tests_can_group_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void _persona_store_capabilities_tests_can_group_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void ___lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void persona_store_capabilities_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _persona_store_capabilities_tests_test_persona_store_capabilities_folks_test_case_test_method (gpointer self) {
#line 40 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_test_persona_store_capabilities (self);
#line 122 "persona-store-capabilities.c"
}


PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_construct (GType object_type) {
	PersonaStoreCapabilitiesTests * self = NULL;
	TpTestBackend* _tmp0_;
	const gchar* _tmp1_ = NULL;
#line 36 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) folks_test_case_construct (object_type, "PersonaStoreCapabilities");
#line 38 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = tp_test_backend_new ();
#line 38 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->tp_backend);
#line 38 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->tp_backend = _tmp0_;
#line 40 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "persona store capabilities", _persona_store_capabilities_tests_test_persona_store_capabilities_folks_test_case_test_method, self);
#line 43 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = g_getenv ("FOLKS_TEST_VALGRIND");
#line 43 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp1_ != NULL) {
#line 44 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		self->priv->_test_timeout = 10;
#line 146 "persona-store-capabilities.c"
	}
#line 34 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return self;
#line 150 "persona-store-capabilities.c"
}


PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_new (void) {
#line 34 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return persona_store_capabilities_tests_construct (TYPE_PERSONA_STORE_CAPABILITIES_TESTS);
#line 157 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_real_set_up (FolksTestCase* base) {
	PersonaStoreCapabilitiesTests * self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GeeHashSet* _tmp2_;
	TpTestBackend* _tmp3_;
	TpTestBackend* _tmp4_;
	void* _tmp5_ = NULL;
#line 47 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) base;
#line 49 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = g_str_hash;
#line 49 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = g_str_equal;
#line 49 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_);
#line 49 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->group_flags_received);
#line 49 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->group_flags_received = _tmp2_;
#line 51 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = self->priv->tp_backend;
#line 51 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	tp_test_backend_set_up (_tmp3_);
#line 52 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = self->priv->tp_backend;
#line 52 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = tp_test_backend_add_account (_tmp4_, "protocol", "me@example.com", "cm", "account");
#line 52 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->_account_handle = _tmp5_;
#line 191 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_real_tear_down (FolksTestCase* base) {
	PersonaStoreCapabilitiesTests * self;
	TpTestBackend* _tmp0_;
	void* _tmp1_;
	TpTestBackend* _tmp2_;
#line 56 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) base;
#line 58 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = self->priv->tp_backend;
#line 58 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = self->priv->_account_handle;
#line 58 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	tp_test_backend_remove_account (_tmp0_, _tmp1_);
#line 59 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = self->priv->tp_backend;
#line 59 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	tp_test_backend_tear_down (_tmp2_);
#line 212 "persona-store-capabilities.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return _data1_;
#line 221 "persona-store-capabilities.c"
}


static void block1_data_unref (Block1Data* _data1_) {
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_object_unref0 (_data1_->self);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_main_loop_unref0 (_data1_->main_loop);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_slice_free (Block1Data, _data1_);
#line 234 "persona-store-capabilities.c"
	}
}


static void ___lambda1_ (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* ps) {
	FolksPersonaStore* _tmp0_;
#line 71 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (ps != NULL);
#line 73 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = ps;
#line 73 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_set_up_persona_store (self, _tmp0_);
#line 247 "persona-store-capabilities.c"
}


static void ____lambda1__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self) {
#line 71 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	___lambda1_ (self, store);
#line 254 "persona-store-capabilities.c"
}


static void __lambda0_ (PersonaStoreCapabilitiesTests* self, FolksBackend* b) {
	FolksBackend* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
#line 67 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (b != NULL);
#line 69 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = b;
#line 69 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = folks_backend_get_name (_tmp0_);
#line 69 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _tmp1_;
#line 69 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (g_strcmp0 (_tmp2_, "telepathy") == 0) {
#line 272 "persona-store-capabilities.c"
		FolksBackend* _tmp3_;
#line 71 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp3_ = b;
#line 71 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_connect_object (_tmp3_, "persona-store-added", (GCallback) ____lambda1__folks_backend_persona_store_added, self, 0);
#line 278 "persona-store-capabilities.c"
		{
			FolksBackend* _tmp4_;
			GeeMap* _tmp5_;
			GeeMap* _tmp6_;
			GeeCollection* _tmp7_;
			GeeCollection* _tmp8_;
			GeeCollection* _tmp9_;
			GeeIterator* _tmp10_ = NULL;
			GeeIterator* _tmp11_;
			GeeIterator* _store_it;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp4_ = b;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp5_ = folks_backend_get_persona_stores (_tmp4_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp6_ = _tmp5_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp7_ = gee_map_get_values (_tmp6_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp8_ = _tmp7_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp9_ = _tmp8_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp11_ = _tmp10_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_g_object_unref0 (_tmp9_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_store_it = _tmp11_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			while (TRUE) {
#line 311 "persona-store-capabilities.c"
				GeeIterator* _tmp12_;
				gboolean _tmp13_ = FALSE;
				GeeIterator* _tmp14_;
				gpointer _tmp15_ = NULL;
				FolksPersonaStore* store;
				FolksPersonaStore* _tmp16_;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp12_ = _store_it;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp13_ = gee_iterator_next (_tmp12_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				if (!_tmp13_) {
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
					break;
#line 326 "persona-store-capabilities.c"
				}
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp14_ = _store_it;
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp15_ = gee_iterator_get (_tmp14_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				store = (FolksPersonaStore*) _tmp15_;
#line 78 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp16_ = store;
#line 78 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				persona_store_capabilities_tests_set_up_persona_store (self, _tmp16_);
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
				_g_object_unref0 (store);
#line 340 "persona-store-capabilities.c"
			}
#line 76 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_g_object_unref0 (_store_it);
#line 344 "persona-store-capabilities.c"
		}
	}
}


static void ___lambda0__folks_backend_store_backend_available (FolksBackendStore* _sender, FolksBackend* backend, gpointer self) {
#line 67 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	__lambda0_ (self, backend);
#line 353 "persona-store-capabilities.c"
}


static gboolean __lambda3_ (Block1Data* _data1_) {
	PersonaStoreCapabilitiesTests * self;
	gboolean result = FALSE;
#line 87 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = _data1_->self;
#line 89 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_main_loop_quit (_data1_->main_loop);
#line 90 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	result = FALSE;
#line 90 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return result;
#line 368 "persona-store-capabilities.c"
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
#line 87 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return result;
#line 377 "persona-store-capabilities.c"
}


void persona_store_capabilities_tests_test_persona_store_capabilities (PersonaStoreCapabilitiesTests* self) {
	Block1Data* _data1_;
	GMainLoop* _tmp0_;
	FolksBackendStore* _tmp1_ = NULL;
	FolksBackendStore* backend_store;
	gint _tmp2_;
	GeeHashSet* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GeeHashSet* _tmp5_;
	gboolean _tmp6_ = FALSE;
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->_ref_count_ = 1;
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->self = g_object_ref (self);
#line 64 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 64 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->main_loop = _tmp0_;
#line 66 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = folks_backend_store_dup ();
#line 66 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	backend_store = _tmp1_;
#line 67 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_signal_connect_object (backend_store, "backend-available", (GCallback) ___lambda0__folks_backend_store_backend_available, self, 0);
#line 85 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_backend_store_load_backends (backend_store, NULL, NULL);
#line 87 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = self->priv->_test_timeout;
#line 87 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) _tmp2_, ___lambda3__gsource_func, block1_data_ref (_data1_), block1_data_unref);
#line 93 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_main_loop_run (_data1_->main_loop);
#line 95 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = self->priv->group_flags_received;
#line 95 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp3_, "can-add-personas");
#line 95 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (_tmp4_);
#line 96 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = self->priv->group_flags_received;
#line 96 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp6_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp5_, "can-remove-personas");
#line 96 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (_tmp6_);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (backend_store);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	block1_data_unref (_data1_);
#line 62 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_ = NULL;
#line 435 "persona-store-capabilities.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return self ? g_object_ref (self) : NULL;
#line 442 "persona-store-capabilities.c"
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return _data2_;
#line 451 "persona-store-capabilities.c"
}


static void block2_data_unref (Block2Data* _data2_) {
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_object_unref0 (_data2_->self);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_object_unref0 (_data2_->store);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_slice_free (Block2Data, _data2_);
#line 464 "persona-store-capabilities.c"
	}
}


static void _persona_store_capabilities_tests_can_add_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 110 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_add_personas_cb (self, _sender, pspec);
#line 472 "persona-store-capabilities.c"
}


static void _persona_store_capabilities_tests_can_remove_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 116 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_remove_personas_cb (self, _sender, pspec);
#line 479 "persona-store-capabilities.c"
}


static void _persona_store_capabilities_tests_can_alias_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 122 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_alias_personas_cb (self, _sender, pspec);
#line 486 "persona-store-capabilities.c"
}


static void _persona_store_capabilities_tests_can_group_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 128 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_group_personas_cb (self, _sender, pspec);
#line 493 "persona-store-capabilities.c"
}


static void __lambda2_ (Block2Data* _data2_, GObject* obj, GAsyncResult* _result_) {
	PersonaStoreCapabilitiesTests * self;
	GError * _inner_error_ = NULL;
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = _data2_->self;
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (_result_ != NULL);
#line 504 "persona-store-capabilities.c"
	{
		FolksPersonaStore* _tmp0_;
		GAsyncResult* _tmp1_;
		FolksPersonaStore* _tmp2_;
		FolksMaybeBool _tmp3_;
		FolksMaybeBool _tmp4_;
		FolksPersonaStore* _tmp7_;
		FolksMaybeBool _tmp8_;
		FolksMaybeBool _tmp9_;
		FolksPersonaStore* _tmp12_;
		FolksMaybeBool _tmp13_;
		FolksMaybeBool _tmp14_;
		FolksPersonaStore* _tmp17_;
		FolksMaybeBool _tmp18_;
		FolksMaybeBool _tmp19_;
#line 105 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp0_ = _data2_->store;
#line 105 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp1_ = _result_;
#line 105 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		folks_persona_store_prepare_finish (_tmp0_, _tmp1_, &_inner_error_);
#line 105 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_inner_error_ != NULL) {
#line 528 "persona-store-capabilities.c"
			goto __catch0_g_error;
		}
#line 107 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp2_ = _data2_->store;
#line 107 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp3_ = folks_persona_store_get_can_add_personas (_tmp2_);
#line 107 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp4_ = _tmp3_;
#line 107 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp4_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 539 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp5_;
#line 108 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp5_ = _data2_->store;
#line 108 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_add_personas_cb (self, (GObject*) _tmp5_, NULL);
#line 545 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp6_;
#line 110 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp6_ = _data2_->store;
#line 110 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			g_signal_connect_object ((GObject*) _tmp6_, "notify::can-add-personas", (GCallback) _persona_store_capabilities_tests_can_add_personas_cb_g_object_notify, self, 0);
#line 552 "persona-store-capabilities.c"
		}
#line 113 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = _data2_->store;
#line 113 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = folks_persona_store_get_can_remove_personas (_tmp7_);
#line 113 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = _tmp8_;
#line 113 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp9_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 562 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp10_;
#line 114 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp10_ = _data2_->store;
#line 114 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_remove_personas_cb (self, (GObject*) _tmp10_, NULL);
#line 568 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp11_;
#line 116 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp11_ = _data2_->store;
#line 116 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			g_signal_connect_object ((GObject*) _tmp11_, "notify::can-remove-personas", (GCallback) _persona_store_capabilities_tests_can_remove_personas_cb_g_object_notify, self, 0);
#line 575 "persona-store-capabilities.c"
		}
#line 119 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp12_ = _data2_->store;
#line 119 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp13_ = folks_persona_store_get_can_alias_personas (_tmp12_);
#line 119 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp14_ = _tmp13_;
#line 119 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp14_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 585 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp15_;
#line 120 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp15_ = _data2_->store;
#line 120 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_alias_personas_cb (self, (GObject*) _tmp15_, NULL);
#line 591 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp16_;
#line 122 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp16_ = _data2_->store;
#line 122 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			g_signal_connect_object ((GObject*) _tmp16_, "notify::can-alias-personas", (GCallback) _persona_store_capabilities_tests_can_alias_personas_cb_g_object_notify, self, 0);
#line 598 "persona-store-capabilities.c"
		}
#line 125 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp17_ = _data2_->store;
#line 125 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp18_ = folks_persona_store_get_can_group_personas (_tmp17_);
#line 125 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp19_ = _tmp18_;
#line 125 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp19_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 608 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp20_;
#line 126 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp20_ = _data2_->store;
#line 126 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_group_personas_cb (self, (GObject*) _tmp20_, NULL);
#line 614 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp21_;
#line 128 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp21_ = _data2_->store;
#line 128 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
			g_signal_connect_object ((GObject*) _tmp21_, "notify::can-group-personas", (GCallback) _persona_store_capabilities_tests_can_group_personas_cb_g_object_notify, self, 0);
#line 621 "persona-store-capabilities.c"
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FolksPersonaStore* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		FolksPersonaStore* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		GError* _tmp28_;
		const gchar* _tmp29_;
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		e = _inner_error_;
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_inner_error_ = NULL;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp22_ = _data2_->store;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp23_ = folks_persona_store_get_type_id (_tmp22_);
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp24_ = _tmp23_;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp25_ = _data2_->store;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp26_ = folks_persona_store_get_id (_tmp25_);
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp27_ = _tmp26_;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp28_ = e;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp29_ = _tmp28_->message;
#line 133 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_warning ("Error preparing PersonaStore type: %s, id: %s: " "'%s'", _tmp24_, _tmp27_, _tmp29_);
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_error_free0 (e);
#line 660 "persona-store-capabilities.c"
	}
	__finally0:
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_inner_error_ != NULL) {
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.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 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_clear_error (&_inner_error_);
#line 103 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		return;
#line 671 "persona-store-capabilities.c"
	}
}


static void ___lambda2__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	__lambda2_ (self, source_object, res);
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	block2_data_unref (self);
#line 681 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_set_up_persona_store (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* store) {
	Block2Data* _data2_;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksPersonaStore* _tmp2_;
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (store != NULL);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data2_->_ref_count_ = 1;
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data2_->self = g_object_ref (self);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = store;
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data2_->store = _tmp1_;
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _data2_->store;
#line 101 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_persona_store_prepare (_tmp2_, ___lambda2__gasync_ready_callback, block2_data_ref (_data2_));
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	block2_data_unref (_data2_);
#line 99 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_data2_ = NULL;
#line 714 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_add_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_;
	GObject* _tmp1_;
	TpfPersonaStore* _tmp2_;
	TpfPersonaStore* store;
	TpfPersonaStore* _tmp3_;
	FolksMaybeBool _tmp4_;
	FolksMaybeBool _tmp5_;
#line 139 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 139 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 141 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 141 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (TPF_IS_PERSONA_STORE (_tmp0_));
#line 142 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 142 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (TPF_PERSONA_STORE (_tmp1_));
#line 142 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 144 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 144 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_add_personas ((FolksPersonaStore*) _tmp3_);
#line 144 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 144 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 748 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_;
		FolksMaybeBool _tmp7_;
		FolksMaybeBool _tmp8_;
		GeeHashSet* _tmp9_;
		TpfPersonaStore* _tmp10_;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 146 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 146 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_add_personas ((FolksPersonaStore*) _tmp6_);
#line 146 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 146 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE);
#line 148 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->group_flags_received;
#line 148 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-add-personas");
#line 150 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 150 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-add-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 150 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_handlers_disconnect_matched ((GObject*) _tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, _tmp12_, NULL, (GCallback) _persona_store_capabilities_tests_can_add_personas_cb_g_object_notify, self);
#line 774 "persona-store-capabilities.c"
	}
#line 139 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 778 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_remove_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_;
	GObject* _tmp1_;
	TpfPersonaStore* _tmp2_;
	TpfPersonaStore* store;
	TpfPersonaStore* _tmp3_;
	FolksMaybeBool _tmp4_;
	FolksMaybeBool _tmp5_;
#line 155 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 155 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 157 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 157 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (TPF_IS_PERSONA_STORE (_tmp0_));
#line 158 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 158 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (TPF_PERSONA_STORE (_tmp1_));
#line 158 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 160 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 160 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_remove_personas ((FolksPersonaStore*) _tmp3_);
#line 160 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 160 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 812 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_;
		FolksMaybeBool _tmp7_;
		FolksMaybeBool _tmp8_;
		GeeHashSet* _tmp9_;
		TpfPersonaStore* _tmp10_;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 162 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 162 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_remove_personas ((FolksPersonaStore*) _tmp6_);
#line 162 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 162 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE);
#line 164 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->group_flags_received;
#line 164 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-remove-personas");
#line 166 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 166 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-remove-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 166 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_handlers_disconnect_matched ((GObject*) _tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, _tmp12_, NULL, (GCallback) _persona_store_capabilities_tests_can_remove_personas_cb_g_object_notify, self);
#line 838 "persona-store-capabilities.c"
	}
#line 155 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 842 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_alias_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_;
	GObject* _tmp1_;
	TpfPersonaStore* _tmp2_;
	TpfPersonaStore* store;
	TpfPersonaStore* _tmp3_;
	FolksMaybeBool _tmp4_;
	FolksMaybeBool _tmp5_;
#line 171 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 171 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 173 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 173 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (TPF_IS_PERSONA_STORE (_tmp0_));
#line 174 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 174 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (TPF_PERSONA_STORE (_tmp1_));
#line 174 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 176 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 176 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_alias_personas ((FolksPersonaStore*) _tmp3_);
#line 176 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 176 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 876 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_;
		FolksMaybeBool _tmp7_;
		FolksMaybeBool _tmp8_;
		GeeHashSet* _tmp9_;
		TpfPersonaStore* _tmp10_;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 178 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 178 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_alias_personas ((FolksPersonaStore*) _tmp6_);
#line 178 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 178 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE);
#line 180 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->group_flags_received;
#line 180 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-alias-personas");
#line 182 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 182 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-alias-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 182 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_handlers_disconnect_matched ((GObject*) _tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, _tmp12_, NULL, (GCallback) _persona_store_capabilities_tests_can_alias_personas_cb_g_object_notify, self);
#line 902 "persona-store-capabilities.c"
	}
#line 171 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 906 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_group_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_;
	GObject* _tmp1_;
	TpfPersonaStore* _tmp2_;
	TpfPersonaStore* store;
	TpfPersonaStore* _tmp3_;
	FolksMaybeBool _tmp4_;
	FolksMaybeBool _tmp5_;
#line 187 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 187 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 189 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 189 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_assert (TPF_IS_PERSONA_STORE (_tmp0_));
#line 190 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 190 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (TPF_PERSONA_STORE (_tmp1_));
#line 190 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 192 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 192 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_group_personas ((FolksPersonaStore*) _tmp3_);
#line 192 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 192 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 940 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_;
		FolksMaybeBool _tmp7_;
		FolksMaybeBool _tmp8_;
		GeeHashSet* _tmp9_;
		TpfPersonaStore* _tmp10_;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 194 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 194 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_group_personas ((FolksPersonaStore*) _tmp6_);
#line 194 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 194 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE);
#line 196 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->group_flags_received;
#line 196 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-group-personas");
#line 198 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 198 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-group-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 198 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_handlers_disconnect_matched ((GObject*) _tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, _tmp12_, NULL, (GCallback) _persona_store_capabilities_tests_can_group_personas_cb_g_object_notify, self);
#line 966 "persona-store-capabilities.c"
	}
#line 187 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 970 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_class_init (PersonaStoreCapabilitiesTestsClass * klass) {
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_parent_class = g_type_class_peek_parent (klass);
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_type_class_add_private (klass, sizeof (PersonaStoreCapabilitiesTestsPrivate));
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = persona_store_capabilities_tests_real_set_up;
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = persona_store_capabilities_tests_real_tear_down;
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	G_OBJECT_CLASS (klass)->finalize = persona_store_capabilities_tests_finalize;
#line 985 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_instance_init (PersonaStoreCapabilitiesTests * self) {
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv = PERSONA_STORE_CAPABILITIES_TESTS_GET_PRIVATE (self);
#line 32 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->_test_timeout = 3;
#line 994 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_finalize (GObject* obj) {
	PersonaStoreCapabilitiesTests * self;
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	self = PERSONA_STORE_CAPABILITIES_TESTS (obj);
#line 29 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->tp_backend);
#line 31 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->group_flags_received);
#line 27 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	G_OBJECT_CLASS (persona_store_capabilities_tests_parent_class)->finalize (obj);
#line 1008 "persona-store-capabilities.c"
}


GType persona_store_capabilities_tests_get_type (void) {
	static volatile gsize persona_store_capabilities_tests_type_id__volatile = 0;
	if (g_once_init_enter (&persona_store_capabilities_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PersonaStoreCapabilitiesTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) persona_store_capabilities_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PersonaStoreCapabilitiesTests), 0, (GInstanceInitFunc) persona_store_capabilities_tests_instance_init, NULL };
		GType persona_store_capabilities_tests_type_id;
		persona_store_capabilities_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "PersonaStoreCapabilitiesTests", &g_define_type_info, 0);
		g_once_init_leave (&persona_store_capabilities_tests_type_id__volatile, persona_store_capabilities_tests_type_id);
	}
	return persona_store_capabilities_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	PersonaStoreCapabilitiesTests* _tmp1_;
	PersonaStoreCapabilitiesTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 206 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_test_init (&args_length1, &args, NULL);
#line 208 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = g_test_get_root ();
#line 208 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	root = _tmp0_;
#line 209 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = persona_store_capabilities_tests_new ();
#line 209 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _tmp1_;
#line 209 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 209 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 209 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (_tmp2_);
#line 211 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_test_run ();
#line 213 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	result = 0;
#line 213 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return result;
#line 1053 "persona-store-capabilities.c"
}


int main (int argc, char ** argv) {
#line 204 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	g_type_init ();
#line 204 "/debian/rgs/devel/folks/tests/telepathy/persona-store-capabilities.vala"
	return _vala_main (argv, argc);
#line 1062 "persona-store-capabilities.c"
}



