/* persona-store-capabilities.c generated by valac 0.24.0.16-c045, 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 <tpf-test.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <folks-test.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)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

struct _PersonaStoreCapabilitiesTestsClass {
	TpfTestTestCaseClass parent_class;
};

struct _PersonaStoreCapabilitiesTestsPrivate {
	GeeHashSet* _capabilities_received;
};

struct _Block1Data {
	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 void __lambda3_ (PersonaStoreCapabilitiesTests* self, FolksBackend* b);
static void ___lambda4_ (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* ps);
static void persona_store_capabilities_tests_set_up_persona_store (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* store);
static void ____lambda4__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self);
static void ___lambda3__folks_backend_store_backend_available (FolksBackendStore* _sender, FolksBackend* backend, gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda5_ (Block1Data* _data1_, 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 gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
static void persona_store_capabilities_tests_check_can_alias_personas (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void persona_store_capabilities_tests_check_can_group_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p);
static void ___lambda5__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 35 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_test_persona_store_capabilities ((PersonaStoreCapabilitiesTests*) self);
#line 108 "persona-store-capabilities.c"
}


PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_construct (GType object_type) {
	PersonaStoreCapabilitiesTests * self = NULL;
#line 33 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) tpf_test_test_case_construct (object_type, "PersonaStoreCapabilities");
#line 35 "/opt/gnome3/source/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 31 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return self;
#line 120 "persona-store-capabilities.c"
}


PersonaStoreCapabilitiesTests* persona_store_capabilities_tests_new (void) {
#line 31 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return persona_store_capabilities_tests_construct (TYPE_PERSONA_STORE_CAPABILITIES_TESTS);
#line 127 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_real_set_up (FolksTestCase* base) {
	PersonaStoreCapabilitiesTests * self;
	GeeHashSet* _tmp0_ = NULL;
#line 39 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) base;
#line 41 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	FOLKS_TEST_CASE_CLASS (persona_store_capabilities_tests_parent_class)->set_up ((FolksTestCase*) G_TYPE_CHECK_INSTANCE_CAST (self, TPF_TEST_TYPE_TEST_CASE, TpfTestTestCase));
#line 43 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 43 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->_capabilities_received);
#line 43 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->_capabilities_received = _tmp0_;
#line 144 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_real_tear_down (FolksTestCase* base) {
	PersonaStoreCapabilitiesTests * self;
#line 46 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self = (PersonaStoreCapabilitiesTests*) base;
#line 48 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->_capabilities_received);
#line 48 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->_capabilities_received = NULL;
#line 50 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	FOLKS_TEST_CASE_CLASS (persona_store_capabilities_tests_parent_class)->tear_down ((FolksTestCase*) G_TYPE_CHECK_INSTANCE_CAST (self, TPF_TEST_TYPE_TEST_CASE, TpfTestTestCase));
#line 158 "persona-store-capabilities.c"
}


static void ___lambda4_ (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* ps) {
	FolksPersonaStore* _tmp0_ = NULL;
#line 62 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (ps != NULL);
#line 64 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = ps;
#line 64 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_set_up_persona_store (self, _tmp0_);
#line 170 "persona-store-capabilities.c"
}


static void ____lambda4__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self) {
#line 62 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	___lambda4_ ((PersonaStoreCapabilitiesTests*) self, store);
#line 177 "persona-store-capabilities.c"
}


static void __lambda3_ (PersonaStoreCapabilitiesTests* self, FolksBackend* b) {
	FolksBackend* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 58 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (b != NULL);
#line 60 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = b;
#line 60 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = folks_backend_get_name (_tmp0_);
#line 60 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _tmp1_;
#line 60 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (g_strcmp0 (_tmp2_, "telepathy") == 0) {
#line 195 "persona-store-capabilities.c"
		FolksBackend* _tmp3_ = NULL;
#line 62 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp3_ = b;
#line 62 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_connect_object (_tmp3_, "persona-store-added", (GCallback) ____lambda4__folks_backend_persona_store_added, self, 0);
#line 201 "persona-store-capabilities.c"
		{
			GeeIterator* _store_it = NULL;
			FolksBackend* _tmp4_ = NULL;
			GeeMap* _tmp5_ = NULL;
			GeeMap* _tmp6_ = NULL;
			GeeCollection* _tmp7_ = NULL;
			GeeCollection* _tmp8_ = NULL;
			GeeCollection* _tmp9_ = NULL;
			GeeIterator* _tmp10_ = NULL;
			GeeIterator* _tmp11_ = NULL;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp4_ = b;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp5_ = folks_backend_get_persona_stores (_tmp4_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp6_ = _tmp5_;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp7_ = gee_map_get_values (_tmp6_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp8_ = _tmp7_;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp9_ = _tmp8_;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp11_ = _tmp10_;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_g_object_unref0 (_tmp9_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_store_it = _tmp11_;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			while (TRUE) {
#line 234 "persona-store-capabilities.c"
				GeeIterator* _tmp12_ = NULL;
				gboolean _tmp13_ = FALSE;
				FolksPersonaStore* store = NULL;
				GeeIterator* _tmp14_ = NULL;
				gpointer _tmp15_ = NULL;
				FolksPersonaStore* _tmp16_ = NULL;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp12_ = _store_it;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp13_ = gee_iterator_next (_tmp12_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				if (!_tmp13_) {
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
					break;
#line 249 "persona-store-capabilities.c"
				}
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp14_ = _store_it;
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp15_ = gee_iterator_get (_tmp14_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				store = (FolksPersonaStore*) _tmp15_;
#line 69 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_tmp16_ = store;
#line 69 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				persona_store_capabilities_tests_set_up_persona_store (self, _tmp16_);
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
				_g_object_unref0 (store);
#line 263 "persona-store-capabilities.c"
			}
#line 67 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_g_object_unref0 (_store_it);
#line 267 "persona-store-capabilities.c"
		}
	}
}


static void ___lambda3__folks_backend_store_backend_available (FolksBackendStore* _sender, FolksBackend* backend, gpointer self) {
#line 58 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	__lambda3_ ((PersonaStoreCapabilitiesTests*) self, backend);
#line 276 "persona-store-capabilities.c"
}


void persona_store_capabilities_tests_test_persona_store_capabilities (PersonaStoreCapabilitiesTests* self) {
	GMainLoop* main_loop = NULL;
	GMainLoop* _tmp0_ = NULL;
	FolksBackendStore* backend_store = NULL;
	FolksBackendStore* _tmp1_ = NULL;
	GeeHashSet* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GeeHashSet* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GeeHashSet* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	GeeHashSet* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
#line 53 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 55 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 55 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	main_loop = _tmp0_;
#line 57 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = folks_backend_store_dup ();
#line 57 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	backend_store = _tmp1_;
#line 58 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_signal_connect_object (backend_store, "backend-available", (GCallback) ___lambda3__folks_backend_store_backend_available, self, 0);
#line 76 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_backend_store_load_backends (backend_store, NULL, NULL);
#line 78 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_test_utils_loop_run_with_non_fatal_timeout (main_loop, 3);
#line 80 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = self->priv->_capabilities_received;
#line 80 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp2_, "can-add-personas");
#line 80 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (_tmp3_, "this._capabilities_received.contains (\"can-add-personas\")");
#line 81 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = self->priv->_capabilities_received;
#line 81 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp4_, "can-remove-personas");
#line 81 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (_tmp5_, "this._capabilities_received.contains (\"can-remove-personas\")");
#line 82 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp6_ = self->priv->_capabilities_received;
#line 82 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp7_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp6_, "can-alias-personas");
#line 82 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (!_tmp7_, "!this._capabilities_received.contains (\"can-alias-personas\")");
#line 83 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp8_ = self->priv->_capabilities_received;
#line 83 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp9_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp8_, "can-group-personas");
#line 83 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (!_tmp9_, "!this._capabilities_received.contains (\"can-group-personas\")");
#line 53 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (backend_store);
#line 53 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_main_loop_unref0 (main_loop);
#line 337 "persona-store-capabilities.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return self ? g_object_ref (self) : NULL;
#line 344 "persona-store-capabilities.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return _data1_;
#line 353 "persona-store-capabilities.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 362 "persona-store-capabilities.c"
		PersonaStoreCapabilitiesTests* self;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		self = _data1_->self;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_object_unref0 (_data1_->store);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_object_unref0 (self);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_slice_free (Block1Data, _data1_);
#line 372 "persona-store-capabilities.c"
	}
}


static void _persona_store_capabilities_tests_can_add_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 97 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_add_personas_cb ((PersonaStoreCapabilitiesTests*) self, _sender, pspec);
#line 380 "persona-store-capabilities.c"
}


static void _persona_store_capabilities_tests_can_remove_personas_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 103 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	persona_store_capabilities_tests_can_remove_personas_cb ((PersonaStoreCapabilitiesTests*) self, _sender, pspec);
#line 387 "persona-store-capabilities.c"
}


static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
	int i;
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	for (i = 0; i < stack_length; i++) {
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (g_strcmp0 (stack[i], needle) == 0) {
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			return TRUE;
#line 399 "persona-store-capabilities.c"
		}
	}
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return FALSE;
#line 404 "persona-store-capabilities.c"
}


static void __lambda5_ (Block1Data* _data1_, GObject* obj, GAsyncResult* _result_) {
	PersonaStoreCapabilitiesTests* self;
	GError * _inner_error_ = NULL;
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self = _data1_->self;
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (_result_ != NULL);
#line 415 "persona-store-capabilities.c"
	{
		FolksPersonaStore* _tmp0_ = NULL;
		GAsyncResult* _tmp1_ = NULL;
		FolksPersonaStore* _tmp2_ = NULL;
		FolksMaybeBool _tmp3_ = 0;
		FolksMaybeBool _tmp4_ = 0;
		FolksPersonaStore* _tmp7_ = NULL;
		FolksMaybeBool _tmp8_ = 0;
		FolksMaybeBool _tmp9_ = 0;
		FolksPersonaStore* _tmp12_ = NULL;
		gchar** _tmp13_ = NULL;
		gint _tmp13__length1 = 0;
		gchar** _tmp14_ = NULL;
		gint _tmp14__length1 = 0;
		FolksPersonaStore* _tmp16_ = NULL;
		gchar** _tmp17_ = NULL;
		gint _tmp17__length1 = 0;
		gchar** _tmp18_ = NULL;
		gint _tmp18__length1 = 0;
#line 92 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp0_ = _data1_->store;
#line 92 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp1_ = _result_;
#line 92 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		folks_persona_store_prepare_finish (_tmp0_, _tmp1_, &_inner_error_);
#line 92 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_inner_error_ != NULL) {
#line 443 "persona-store-capabilities.c"
			goto __catch0_g_error;
		}
#line 94 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp2_ = _data1_->store;
#line 94 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp3_ = folks_persona_store_get_can_add_personas (_tmp2_);
#line 94 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp4_ = _tmp3_;
#line 94 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp4_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 454 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp5_ = NULL;
#line 95 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp5_ = _data1_->store;
#line 95 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_add_personas_cb (self, (GObject*) _tmp5_, NULL);
#line 460 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp6_ = NULL;
#line 97 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp6_ = _data1_->store;
#line 97 "/opt/gnome3/source/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 467 "persona-store-capabilities.c"
		}
#line 100 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = _data1_->store;
#line 100 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = folks_persona_store_get_can_remove_personas (_tmp7_);
#line 100 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = _tmp8_;
#line 100 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_tmp9_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 477 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp10_ = NULL;
#line 101 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp10_ = _data1_->store;
#line 101 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_can_remove_personas_cb (self, (GObject*) _tmp10_, NULL);
#line 483 "persona-store-capabilities.c"
		} else {
			FolksPersonaStore* _tmp11_ = NULL;
#line 103 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp11_ = _data1_->store;
#line 103 "/opt/gnome3/source/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 490 "persona-store-capabilities.c"
		}
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp12_ = _data1_->store;
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp13_ = folks_persona_store_get_always_writeable_properties (_tmp12_, &_tmp13__length1);
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp14_ = _tmp13_;
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp14__length1 = _tmp13__length1;
#line 106 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_vala_string_array_contains (_tmp14_, _tmp14__length1, "alias")) {
#line 502 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp15_ = NULL;
#line 107 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp15_ = _data1_->store;
#line 107 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_check_can_alias_personas (self, (GObject*) _tmp15_, NULL);
#line 508 "persona-store-capabilities.c"
		}
#line 109 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp16_ = _data1_->store;
#line 109 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp17_ = folks_persona_store_get_always_writeable_properties (_tmp16_, &_tmp17__length1);
#line 109 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp18_ = _tmp17_;
#line 109 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp18__length1 = _tmp17__length1;
#line 109 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		if (_vala_string_array_contains (_tmp18_, _tmp18__length1, "groups")) {
#line 520 "persona-store-capabilities.c"
			FolksPersonaStore* _tmp19_ = NULL;
#line 110 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			_tmp19_ = _data1_->store;
#line 110 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
			persona_store_capabilities_tests_check_can_group_personas_cb (self, (GObject*) _tmp19_, NULL);
#line 526 "persona-store-capabilities.c"
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FolksPersonaStore* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		const gchar* _tmp22_ = NULL;
		FolksPersonaStore* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		GError* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
#line 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		e = _inner_error_;
#line 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_inner_error_ = NULL;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp20_ = _data1_->store;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp21_ = folks_persona_store_get_type_id (_tmp20_);
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp22_ = _tmp21_;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp23_ = _data1_->store;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp24_ = folks_persona_store_get_id (_tmp23_);
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp25_ = _tmp24_;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp26_ = e;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp27_ = _tmp26_->message;
#line 114 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_warning ("Error preparing PersonaStore type: %s, id: %s: " "'%s'", _tmp22_, _tmp25_, _tmp27_);
#line 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_g_error_free0 (e);
#line 565 "persona-store-capabilities.c"
	}
	__finally0:
#line 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_inner_error_ != NULL) {
#line 90 "/opt/gnome3/source/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 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_clear_error (&_inner_error_);
#line 90 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		return;
#line 576 "persona-store-capabilities.c"
	}
}


static void ___lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	__lambda5_ (self, source_object, res);
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	block1_data_unref (self);
#line 586 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_set_up_persona_store (PersonaStoreCapabilitiesTests* self, FolksPersonaStore* store) {
	Block1Data* _data1_;
	FolksPersonaStore* _tmp0_ = NULL;
	FolksPersonaStore* _tmp1_ = NULL;
	FolksPersonaStore* _tmp2_ = NULL;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (store != NULL);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->_ref_count_ = 1;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->self = g_object_ref (self);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = store;
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (_data1_->store);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_->store = _tmp1_;
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _data1_->store;
#line 88 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_persona_store_prepare (_tmp2_, ___lambda5__gasync_ready_callback, block1_data_ref (_data1_));
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	block1_data_unref (_data1_);
#line 86 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_data1_ = NULL;
#line 621 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_add_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_ = NULL;
	TpfPersonaStore* store = NULL;
	GObject* _tmp1_ = NULL;
	TpfPersonaStore* _tmp2_ = NULL;
	TpfPersonaStore* _tmp3_ = NULL;
	FolksMaybeBool _tmp4_ = 0;
	FolksMaybeBool _tmp5_ = 0;
#line 120 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 120 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 122 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 122 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TPF_TYPE_PERSONA_STORE), "s is Tpf.PersonaStore");
#line 123 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 123 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TPF_TYPE_PERSONA_STORE, TpfPersonaStore));
#line 123 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 125 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 125 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_add_personas ((FolksPersonaStore*) _tmp3_);
#line 125 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 125 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 655 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_ = NULL;
		FolksMaybeBool _tmp7_ = 0;
		FolksMaybeBool _tmp8_ = 0;
		GeeHashSet* _tmp9_ = NULL;
		TpfPersonaStore* _tmp10_ = NULL;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 127 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 127 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_add_personas ((FolksPersonaStore*) _tmp6_);
#line 127 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 127 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_vala_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE, "store.can_add_personas == MaybeBool.TRUE");
#line 129 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->_capabilities_received;
#line 129 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-add-personas");
#line 131 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 131 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-add-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 131 "/opt/gnome3/source/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 681 "persona-store-capabilities.c"
	}
#line 120 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 685 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_can_remove_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_ = NULL;
	TpfPersonaStore* store = NULL;
	GObject* _tmp1_ = NULL;
	TpfPersonaStore* _tmp2_ = NULL;
	TpfPersonaStore* _tmp3_ = NULL;
	FolksMaybeBool _tmp4_ = 0;
	FolksMaybeBool _tmp5_ = 0;
#line 136 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 136 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 138 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 138 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TPF_TYPE_PERSONA_STORE), "s is Tpf.PersonaStore");
#line 139 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 139 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TPF_TYPE_PERSONA_STORE, TpfPersonaStore));
#line 139 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 141 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 141 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_can_remove_personas ((FolksPersonaStore*) _tmp3_);
#line 141 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 141 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_tmp5_ != FOLKS_MAYBE_BOOL_UNSET) {
#line 719 "persona-store-capabilities.c"
		TpfPersonaStore* _tmp6_ = NULL;
		FolksMaybeBool _tmp7_ = 0;
		FolksMaybeBool _tmp8_ = 0;
		GeeHashSet* _tmp9_ = NULL;
		TpfPersonaStore* _tmp10_ = NULL;
		guint _tmp11_ = 0U;
		GQuark _tmp12_ = 0U;
#line 143 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = store;
#line 143 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp7_ = folks_persona_store_get_can_remove_personas ((FolksPersonaStore*) _tmp6_);
#line 143 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp8_ = _tmp7_;
#line 143 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_vala_assert (_tmp8_ == FOLKS_MAYBE_BOOL_TRUE, "store.can_remove_personas == MaybeBool.TRUE");
#line 145 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp9_ = self->priv->_capabilities_received;
#line 145 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, "can-remove-personas");
#line 147 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp10_ = store;
#line 147 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		g_signal_parse_name ("notify::can-remove-personas", G_TYPE_OBJECT, &_tmp11_, &_tmp12_, TRUE);
#line 147 "/opt/gnome3/source/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 745 "persona-store-capabilities.c"
	}
#line 136 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 749 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_check_can_alias_personas (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_ = NULL;
	TpfPersonaStore* store = NULL;
	GObject* _tmp1_ = NULL;
	TpfPersonaStore* _tmp2_ = NULL;
	TpfPersonaStore* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
#line 152 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 152 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 154 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 154 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TPF_TYPE_PERSONA_STORE), "s is Tpf.PersonaStore");
#line 155 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 155 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TPF_TYPE_PERSONA_STORE, TpfPersonaStore));
#line 155 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 157 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 157 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_always_writeable_properties ((FolksPersonaStore*) _tmp3_, &_tmp4__length1);
#line 157 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 157 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5__length1 = _tmp4__length1;
#line 157 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_vala_string_array_contains (_tmp5_, _tmp5__length1, "alias")) {
#line 787 "persona-store-capabilities.c"
		GeeHashSet* _tmp6_ = NULL;
#line 158 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = self->priv->_capabilities_received;
#line 158 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, "can-alias-personas");
#line 793 "persona-store-capabilities.c"
	}
#line 152 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 797 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_check_can_group_personas_cb (PersonaStoreCapabilitiesTests* self, GObject* s, GParamSpec* p) {
	GObject* _tmp0_ = NULL;
	TpfPersonaStore* store = NULL;
	GObject* _tmp1_ = NULL;
	TpfPersonaStore* _tmp2_ = NULL;
	TpfPersonaStore* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
#line 161 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (self != NULL);
#line 161 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_return_if_fail (s != NULL);
#line 163 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = s;
#line 163 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TPF_TYPE_PERSONA_STORE), "s is Tpf.PersonaStore");
#line 164 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp1_ = s;
#line 164 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TPF_TYPE_PERSONA_STORE, TpfPersonaStore));
#line 164 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	store = _tmp2_;
#line 166 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp3_ = store;
#line 166 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp4_ = folks_persona_store_get_always_writeable_properties ((FolksPersonaStore*) _tmp3_, &_tmp4__length1);
#line 166 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5_ = _tmp4_;
#line 166 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp5__length1 = _tmp4__length1;
#line 166 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	if (_vala_string_array_contains (_tmp5_, _tmp5__length1, "groups")) {
#line 835 "persona-store-capabilities.c"
		GeeHashSet* _tmp6_ = NULL;
#line 167 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		_tmp6_ = self->priv->_capabilities_received;
#line 167 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, "can-group-personas");
#line 841 "persona-store-capabilities.c"
	}
#line 161 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (store);
#line 845 "persona-store-capabilities.c"
}


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


static void persona_store_capabilities_tests_instance_init (PersonaStoreCapabilitiesTests * self) {
#line 27 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv = PERSONA_STORE_CAPABILITIES_TESTS_GET_PRIVATE (self);
#line 29 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self->priv->_capabilities_received = NULL;
#line 869 "persona-store-capabilities.c"
}


static void persona_store_capabilities_tests_finalize (GObject* obj) {
	PersonaStoreCapabilitiesTests * self;
#line 27 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PERSONA_STORE_CAPABILITIES_TESTS, PersonaStoreCapabilitiesTests);
#line 29 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (self->priv->_capabilities_received);
#line 27 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	G_OBJECT_CLASS (persona_store_capabilities_tests_parent_class)->finalize (obj);
#line 881 "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 (TPF_TEST_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;
	PersonaStoreCapabilitiesTests* tests = NULL;
	PersonaStoreCapabilitiesTests* _tmp0_ = NULL;
#line 173 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_test_init (&args_length1, &args, NULL);
#line 175 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_tmp0_ = persona_store_capabilities_tests_new ();
#line 175 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	tests = _tmp0_;
#line 176 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 177 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	g_test_run ();
#line 178 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 180 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	result = 0;
#line 180 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	_g_object_unref0 (tests);
#line 180 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return result;
#line 919 "persona-store-capabilities.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 171 "/opt/gnome3/source/folks/tests/telepathy/persona-store-capabilities.vala"
	return _vala_main (argv, argc);
#line 929 "persona-store-capabilities.c"
}



