/* kf-persona.c generated by valac 0.34.0.3-63fa6, the Vala compiler
 * generated from kf-persona.vala, do not modify */

/*
 * Copyright (C) 2010 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Philip Withnall <philip.withnall@collabora.co.uk>
 */

#include <glib.h>
#include <glib-object.h>
#include <folks/folks.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <folks/small-set.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <folks-internal.h>


#define FOLKS_BACKENDS_KF_TYPE_PERSONA (folks_backends_kf_persona_get_type ())
#define FOLKS_BACKENDS_KF_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersona))
#define FOLKS_BACKENDS_KF_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersonaClass))
#define FOLKS_BACKENDS_KF_IS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA))
#define FOLKS_BACKENDS_KF_IS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_BACKENDS_KF_TYPE_PERSONA))
#define FOLKS_BACKENDS_KF_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersonaClass))

typedef struct _FolksBackendsKfPersona FolksBackendsKfPersona;
typedef struct _FolksBackendsKfPersonaClass FolksBackendsKfPersonaClass;
typedef struct _FolksBackendsKfPersonaPrivate FolksBackendsKfPersonaPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE (folks_backends_kf_persona_store_get_type ())
#define FOLKS_BACKENDS_KF_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore))
#define FOLKS_BACKENDS_KF_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStoreClass))
#define FOLKS_BACKENDS_KF_IS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE))
#define FOLKS_BACKENDS_KF_IS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE))
#define FOLKS_BACKENDS_KF_PERSONA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStoreClass))

typedef struct _FolksBackendsKfPersonaStore FolksBackendsKfPersonaStore;
typedef struct _FolksBackendsKfPersonaStoreClass FolksBackendsKfPersonaStoreClass;
typedef struct _FolksBackendsKfPersonaChangeAliasData FolksBackendsKfPersonaChangeAliasData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FolksBackendsKfPersonaChangeImAddressesData FolksBackendsKfPersonaChangeImAddressesData;
typedef struct _FolksBackendsKfPersonaChangeWebServiceAddressesData FolksBackendsKfPersonaChangeWebServiceAddressesData;
typedef struct _FolksBackendsKfPersonaChangeAntiLinksData FolksBackendsKfPersonaChangeAntiLinksData;

struct _FolksBackendsKfPersona {
	FolksPersona parent_instance;
	FolksBackendsKfPersonaPrivate * priv;
};

struct _FolksBackendsKfPersonaClass {
	FolksPersonaClass parent_class;
};

struct _FolksBackendsKfPersonaPrivate {
	GeeHashMultiMap* _im_addresses;
	GeeHashMultiMap* _web_service_addresses;
	gchar* _alias;
	FolksSmallSet* _anti_links;
	GeeSet* _anti_links_ro;
};

struct _FolksBackendsKfPersonaChangeAliasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksBackendsKfPersona* self;
	gchar* alias;
	const gchar* _tmp0_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GKeyFile* key_file;
	FolksPersonaStore* _tmp7_;
	FolksPersonaStore* _tmp8_;
	GKeyFile* _tmp9_;
	GKeyFile* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	FolksPersonaStore* _tmp14_;
	FolksPersonaStore* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
};

struct _FolksBackendsKfPersonaChangeImAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksBackendsKfPersona* self;
	GeeMultiMap* im_addresses;
	GKeyFile* key_file;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GKeyFile* _tmp2_;
	GeeIterator* _protocol1_it;
	GeeHashMultiMap* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeIterator* _tmp6_;
	GeeIterator* _tmp7_;
	GeeIterator* _tmp8_;
	gboolean _tmp9_;
	gchar* protocol1;
	GeeIterator* _tmp10_;
	gpointer _tmp11_;
	GKeyFile* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	GError* e1;
	GeeHashMultiMap* new_im_addresses;
	GeeHashMultiMap* _tmp16_;
	GeeIterator* _protocol2_it;
	GeeMultiMap* _tmp17_;
	GeeSet* _tmp18_;
	GeeSet* _tmp19_;
	GeeIterator* _tmp20_;
	GeeIterator* _tmp21_;
	GeeIterator* _tmp22_;
	gboolean _tmp23_;
	gchar* protocol2;
	GeeIterator* _tmp24_;
	gpointer _tmp25_;
	GeeCollection* addresses;
	GeeMultiMap* _tmp26_;
	const gchar* _tmp27_;
	GeeCollection* _tmp28_;
	FolksSmallSet* normalised_addresses;
	FolksSmallSet* _tmp29_;
	GeeIterator* _im_fd_it;
	GeeCollection* _tmp30_;
	GeeIterator* _tmp31_;
	GeeIterator* _tmp32_;
	gboolean _tmp33_;
	FolksImFieldDetails* im_fd;
	GeeIterator* _tmp34_;
	gpointer _tmp35_;
	gchar* normalised_address;
	gchar* _tmp36_;
	FolksImFieldDetails* _tmp37_;
	gconstpointer _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	GError* e2;
	const gchar* _tmp43_;
	FolksImFieldDetails* _tmp44_;
	gconstpointer _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	GError* _tmp48_;
	const gchar* _tmp49_;
	GError* _tmp50_;
	FolksSmallSet* _tmp51_;
	const gchar* _tmp52_;
	FolksImFieldDetails* new_im_fd;
	const gchar* _tmp53_;
	FolksImFieldDetails* _tmp54_;
	GeeHashMultiMap* _tmp55_;
	const gchar* _tmp56_;
	FolksImFieldDetails* _tmp57_;
	gchar** addrs;
	FolksSmallSet* _tmp58_;
	gint _tmp59_;
	gpointer* _tmp60_;
	gint addrs_length1;
	gint _addrs_size_;
	FolksSmallSet* _tmp61_;
	gint _tmp62_;
	gint _tmp63_;
	gint _tmp64_;
	GKeyFile* _tmp65_;
	const gchar* _tmp66_;
	const gchar* _tmp67_;
	const gchar* _tmp68_;
	gchar** _tmp69_;
	gint _tmp69__length1;
	FolksPersonaStore* _tmp70_;
	FolksPersonaStore* _tmp71_;
	GeeHashMultiMap* _tmp72_;
	GeeHashMultiMap* _tmp73_;
	GError * _inner_error_;
};

struct _FolksBackendsKfPersonaChangeWebServiceAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksBackendsKfPersona* self;
	GeeMultiMap* web_service_addresses;
	GKeyFile* key_file;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GKeyFile* _tmp2_;
	GeeIterator* _web_service1_it;
	GeeHashMultiMap* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeIterator* _tmp6_;
	GeeIterator* _tmp7_;
	GeeIterator* _tmp8_;
	gboolean _tmp9_;
	gchar* web_service1;
	GeeIterator* _tmp10_;
	gpointer _tmp11_;
	GKeyFile* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	GError* e;
	GeeHashMultiMap* new_web_service_addresses;
	GeeHashMultiMap* _tmp18_;
	GeeIterator* _web_service2_it;
	GeeMultiMap* _tmp19_;
	GeeSet* _tmp20_;
	GeeSet* _tmp21_;
	GeeIterator* _tmp22_;
	GeeIterator* _tmp23_;
	GeeIterator* _tmp24_;
	gboolean _tmp25_;
	gchar* web_service2;
	GeeIterator* _tmp26_;
	gpointer _tmp27_;
	GeeCollection* ws_fds;
	GeeMultiMap* _tmp28_;
	const gchar* _tmp29_;
	GeeCollection* _tmp30_;
	gchar** addrs;
	gchar** _tmp31_;
	gint addrs_length1;
	gint _addrs_size_;
	GeeIterator* _ws_fd1_it;
	GeeCollection* _tmp32_;
	GeeIterator* _tmp33_;
	GeeIterator* _tmp34_;
	gboolean _tmp35_;
	FolksWebServiceFieldDetails* ws_fd1;
	GeeIterator* _tmp36_;
	gpointer _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length1;
	FolksWebServiceFieldDetails* _tmp39_;
	gconstpointer _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
	GKeyFile* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	gchar** _tmp49_;
	gint _tmp49__length1;
	GeeIterator* _ws_fd2_it;
	GeeCollection* _tmp50_;
	GeeIterator* _tmp51_;
	GeeIterator* _tmp52_;
	gboolean _tmp53_;
	FolksWebServiceFieldDetails* ws_fd2;
	GeeIterator* _tmp54_;
	gpointer _tmp55_;
	GeeHashMultiMap* _tmp56_;
	const gchar* _tmp57_;
	FolksWebServiceFieldDetails* _tmp58_;
	FolksPersonaStore* _tmp59_;
	FolksPersonaStore* _tmp60_;
	GeeHashMultiMap* _tmp61_;
	GeeHashMultiMap* _tmp62_;
	GError * _inner_error_;
};

struct _FolksBackendsKfPersonaChangeAntiLinksData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksBackendsKfPersona* self;
	GeeSet* anti_links;
	GeeSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	gboolean _tmp3_;
	GKeyFile* key_file;
	FolksPersonaStore* _tmp4_;
	FolksPersonaStore* _tmp5_;
	GKeyFile* _tmp6_;
	GeeSet* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GKeyFile* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	GeeSet* _tmp13_;
	gint _tmp14_;
	gpointer* _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	FolksPersonaStore* _tmp17_;
	FolksPersonaStore* _tmp18_;
	FolksSmallSet* _tmp19_;
	FolksSmallSet* _tmp20_;
	GeeSet* _tmp21_;
};


static gpointer folks_backends_kf_persona_parent_class = NULL;
static FolksAliasDetailsIface* folks_backends_kf_persona_folks_alias_details_parent_iface = NULL;
static FolksAntiLinkableIface* folks_backends_kf_persona_folks_anti_linkable_parent_iface = NULL;
static FolksImDetailsIface* folks_backends_kf_persona_folks_im_details_parent_iface = NULL;
static FolksWebServiceDetailsIface* folks_backends_kf_persona_folks_web_service_details_parent_iface = NULL;

GType folks_backends_kf_persona_get_type (void) G_GNUC_CONST;
#define FOLKS_BACKENDS_KF_PERSONA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersonaPrivate))
enum  {
	FOLKS_BACKENDS_KF_PERSONA_DUMMY_PROPERTY,
	FOLKS_BACKENDS_KF_PERSONA_LINKABLE_PROPERTIES,
	FOLKS_BACKENDS_KF_PERSONA_WRITEABLE_PROPERTIES,
	FOLKS_BACKENDS_KF_PERSONA_ALIAS,
	FOLKS_BACKENDS_KF_PERSONA_IM_ADDRESSES,
	FOLKS_BACKENDS_KF_PERSONA_WEB_SERVICE_ADDRESSES,
	FOLKS_BACKENDS_KF_PERSONA_ANTI_LINKS
};
static void folks_backends_kf_persona_real_change_alias_data_free (gpointer _data);
static void folks_backends_kf_persona_real_change_alias (FolksAliasDetails* base, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_backends_kf_persona_real_change_alias_co (FolksBackendsKfPersonaChangeAliasData* _data_);
GType folks_backends_kf_persona_store_get_type (void) G_GNUC_CONST;
GKeyFile* folks_backends_kf_persona_store_get_key_file (FolksBackendsKfPersonaStore* self);
void folks_backends_kf_persona_store_save_key_file (FolksBackendsKfPersonaStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_backends_kf_persona_store_save_key_file_finish (FolksBackendsKfPersonaStore* self, GAsyncResult* _res_);
static void folks_backends_kf_persona_change_alias_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_backends_kf_persona_real_change_im_addresses_data_free (gpointer _data);
static void folks_backends_kf_persona_real_change_im_addresses (FolksImDetails* base, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_backends_kf_persona_real_change_im_addresses_co (FolksBackendsKfPersonaChangeImAddressesData* _data_);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void folks_backends_kf_persona_change_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_backends_kf_persona_real_change_web_service_addresses_data_free (gpointer _data);
static void folks_backends_kf_persona_real_change_web_service_addresses (FolksWebServiceDetails* base, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_backends_kf_persona_real_change_web_service_addresses_co (FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_);
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
static void folks_backends_kf_persona_change_web_service_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_backends_kf_persona_real_change_anti_links_data_free (gpointer _data);
static void folks_backends_kf_persona_real_change_anti_links (FolksAntiLinkable* base, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_backends_kf_persona_real_change_anti_links_co (FolksBackendsKfPersonaChangeAntiLinksData* _data_);
#define FOLKS_BACKENDS_KF_PERSONA_STORE_anti_links_key_name "__anti-links"
static void folks_backends_kf_persona_change_anti_links_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
FolksBackendsKfPersona* folks_backends_kf_persona_new (const gchar* id, FolksPersonaStore* store);
FolksBackendsKfPersona* folks_backends_kf_persona_construct (GType object_type, const gchar* id, FolksPersonaStore* store);
static void folks_backends_kf_persona_real_linkable_property_to_links (FolksPersona* base, const gchar* prop_name, FolksPersonaLinkablePropertyCallback callback, void* callback_target);
static GObject * folks_backends_kf_persona_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void folks_backends_kf_persona_finalize (GObject* obj);
static void _vala_folks_backends_kf_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_folks_backends_kf_persona_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);

static const gchar* FOLKS_BACKENDS_KF_PERSONA__linkable_properties[3] = {"im-addresses", "web-service-addresses", NULL};
static const gchar* FOLKS_BACKENDS_KF_PERSONA__writeable_properties[5] = {"alias", "im-addresses", "web-service-addresses", "anti-links", NULL};

static void folks_backends_kf_persona_real_change_alias_data_free (gpointer _data) {
	FolksBackendsKfPersonaChangeAliasData* _data_;
	_data_ = _data;
	_g_free0 (_data_->alias);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksBackendsKfPersonaChangeAliasData, _data_);
}


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


static void folks_backends_kf_persona_real_change_alias (FolksAliasDetails* base, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksBackendsKfPersona * self;
	FolksBackendsKfPersonaChangeAliasData* _data_;
	FolksBackendsKfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_data_ = g_slice_new0 (FolksBackendsKfPersonaChangeAliasData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_backends_kf_persona_real_change_alias);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_backends_kf_persona_real_change_alias_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = alias;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->alias);
	_data_->alias = _tmp2_;
	folks_backends_kf_persona_real_change_alias_co (_data_);
}


static void folks_backends_kf_persona_real_change_alias_finish (FolksAliasDetails* base, GAsyncResult* _res_, GError** error) {
	FolksBackendsKfPersonaChangeAliasData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void folks_backends_kf_persona_change_alias_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksBackendsKfPersonaChangeAliasData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_backends_kf_persona_real_change_alias_co (_data_);
}


static gboolean folks_backends_kf_persona_real_change_alias_co (FolksBackendsKfPersonaChangeAliasData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->alias;
	if (_data_->_tmp0_ == NULL) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = g_strdup ("");
		_g_free0 (_data_->alias);
		_data_->alias = _tmp1_;
	}
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->self->priv->_alias;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->alias;
	if (g_strcmp0 (_data_->_tmp2_, _data_->_tmp3_) == 0) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = folks_persona_get_uid ((FolksPersona*) _data_->self);
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->alias;
	g_debug ("kf-persona.vala:103: Setting alias of Kf.Persona '%s' to '%s'.", _data_->_tmp5_, _data_->_tmp6_);
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = folks_backends_kf_persona_store_get_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp8_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore));
	_data_->key_file = _data_->_tmp9_;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->key_file;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = _data_->alias;
	g_key_file_set_string (_data_->_tmp10_, _data_->_tmp12_, "__alias", _data_->_tmp13_);
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_state_ = 1;
	folks_backends_kf_persona_store_save_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp15_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), folks_backends_kf_persona_change_alias_ready, _data_);
	return FALSE;
	_state_1:
	folks_backends_kf_persona_store_save_key_file_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp15_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), _data_->_res_);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = _data_->alias;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = g_strdup (_data_->_tmp16_);
	_g_free0 (_data_->self->priv->_alias);
	_data_->self->priv->_alias = _data_->_tmp17_;
	g_object_notify ((GObject*) _data_->self, "alias");
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void folks_backends_kf_persona_real_change_im_addresses_data_free (gpointer _data) {
	FolksBackendsKfPersonaChangeImAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->im_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksBackendsKfPersonaChangeImAddressesData, _data_);
}


static void folks_backends_kf_persona_real_change_im_addresses (FolksImDetails* base, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksBackendsKfPersona * self;
	FolksBackendsKfPersonaChangeImAddressesData* _data_;
	FolksBackendsKfPersona* _tmp0_ = NULL;
	GeeMultiMap* _tmp1_ = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_data_ = g_slice_new0 (FolksBackendsKfPersonaChangeImAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_backends_kf_persona_real_change_im_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_backends_kf_persona_real_change_im_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = im_addresses;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->im_addresses);
	_data_->im_addresses = _tmp2_;
	folks_backends_kf_persona_real_change_im_addresses_co (_data_);
}


static void folks_backends_kf_persona_real_change_im_addresses_finish (FolksImDetails* base, GAsyncResult* _res_, GError** error) {
	FolksBackendsKfPersonaChangeImAddressesData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = folks_abstract_field_details_hash_static ((FolksAbstractFieldDetails*) v);
	return result;
}


static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gboolean result;
	result = folks_abstract_field_details_equal_static ((FolksAbstractFieldDetails*) a, (FolksAbstractFieldDetails*) b);
	return result;
}


static void folks_backends_kf_persona_change_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksBackendsKfPersonaChangeImAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_backends_kf_persona_real_change_im_addresses_co (_data_);
}


static gboolean folks_backends_kf_persona_real_change_im_addresses_co (FolksBackendsKfPersonaChangeImAddressesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = folks_backends_kf_persona_store_get_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore));
	_data_->key_file = _data_->_tmp2_;
	{
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->self->priv->_im_addresses;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = gee_multi_map_get_keys ((GeeMultiMap*) _data_->_tmp3_);
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp5_);
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->_tmp6_;
		_g_object_unref0 (_data_->_tmp5_);
		_data_->_protocol1_it = _data_->_tmp7_;
		while (TRUE) {
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->_protocol1_it;
			_data_->_tmp9_ = FALSE;
			_data_->_tmp9_ = gee_iterator_next (_data_->_tmp8_);
			if (!_data_->_tmp9_) {
				break;
			}
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_protocol1_it;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = gee_iterator_get (_data_->_tmp10_);
			_data_->protocol1 = (gchar*) _data_->_tmp11_;
			{
				_data_->_tmp12_ = NULL;
				_data_->_tmp12_ = _data_->key_file;
				_data_->_tmp13_ = NULL;
				_data_->_tmp13_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
				_data_->_tmp14_ = NULL;
				_data_->_tmp14_ = _data_->_tmp13_;
				_data_->_tmp15_ = NULL;
				_data_->_tmp15_ = _data_->protocol1;
				g_key_file_remove_key (_data_->_tmp12_, _data_->_tmp14_, _data_->_tmp15_, &_data_->_inner_error_);
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
					if (_data_->_inner_error_->domain == G_KEY_FILE_ERROR) {
						goto __catch2_g_key_file_error;
					}
					_g_free0 (_data_->protocol1);
					_g_object_unref0 (_data_->_protocol1_it);
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
			goto __finally2;
			__catch2_g_key_file_error:
			{
				_data_->e1 = _data_->_inner_error_;
				_data_->_inner_error_ = NULL;
				_g_error_free0 (_data_->e1);
			}
			__finally2:
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
					g_error_free (_data_->_inner_error_);
					_g_free0 (_data_->protocol1);
					_g_object_unref0 (_data_->_protocol1_it);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				} else {
					_g_free0 (_data_->protocol1);
					_g_object_unref0 (_data_->_protocol1_it);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
			_g_free0 (_data_->protocol1);
		}
		_g_object_unref0 (_data_->_protocol1_it);
	}
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_data_->new_im_addresses = _data_->_tmp16_;
	{
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = _data_->im_addresses;
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = gee_multi_map_get_keys (_data_->_tmp17_);
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = _data_->_tmp18_;
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp19_);
		_data_->_tmp21_ = NULL;
		_data_->_tmp21_ = _data_->_tmp20_;
		_g_object_unref0 (_data_->_tmp19_);
		_data_->_protocol2_it = _data_->_tmp21_;
		while (TRUE) {
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->_protocol2_it;
			_data_->_tmp23_ = FALSE;
			_data_->_tmp23_ = gee_iterator_next (_data_->_tmp22_);
			if (!_data_->_tmp23_) {
				break;
			}
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = _data_->_protocol2_it;
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = gee_iterator_get (_data_->_tmp24_);
			_data_->protocol2 = (gchar*) _data_->_tmp25_;
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->im_addresses;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = _data_->protocol2;
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = gee_multi_map_get (_data_->_tmp26_, _data_->_tmp27_);
			_data_->addresses = _data_->_tmp28_;
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
			_data_->normalised_addresses = _data_->_tmp29_;
			{
				_data_->_tmp30_ = NULL;
				_data_->_tmp30_ = _data_->addresses;
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp30_);
				_data_->_im_fd_it = _data_->_tmp31_;
				while (TRUE) {
					_data_->_tmp32_ = NULL;
					_data_->_tmp32_ = _data_->_im_fd_it;
					_data_->_tmp33_ = FALSE;
					_data_->_tmp33_ = gee_iterator_next (_data_->_tmp32_);
					if (!_data_->_tmp33_) {
						break;
					}
					_data_->_tmp34_ = NULL;
					_data_->_tmp34_ = _data_->_im_fd_it;
					_data_->_tmp35_ = NULL;
					_data_->_tmp35_ = gee_iterator_get (_data_->_tmp34_);
					_data_->im_fd = (FolksImFieldDetails*) _data_->_tmp35_;
					{
						_data_->_tmp37_ = NULL;
						_data_->_tmp37_ = _data_->im_fd;
						_data_->_tmp38_ = NULL;
						_data_->_tmp38_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp37_);
						_data_->_tmp39_ = NULL;
						_data_->_tmp39_ = _data_->_tmp38_;
						_data_->_tmp40_ = NULL;
						_data_->_tmp40_ = _data_->protocol2;
						_data_->_tmp41_ = NULL;
						_data_->_tmp41_ = folks_im_details_normalise_im_address ((const gchar*) _data_->_tmp39_, _data_->_tmp40_, &_data_->_inner_error_);
						_data_->_tmp36_ = _data_->_tmp41_;
						if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
							if (_data_->_inner_error_->domain == FOLKS_IM_DETAILS_ERROR) {
								goto __catch3_folks_im_details_error;
							}
							_g_free0 (_data_->normalised_address);
							_g_object_unref0 (_data_->im_fd);
							_g_object_unref0 (_data_->_im_fd_it);
							_g_object_unref0 (_data_->normalised_addresses);
							_g_object_unref0 (_data_->addresses);
							_g_free0 (_data_->protocol2);
							_g_object_unref0 (_data_->_protocol2_it);
							_g_object_unref0 (_data_->new_im_addresses);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
							g_clear_error (&_data_->_inner_error_);
							return FALSE;
						}
						_data_->_tmp42_ = NULL;
						_data_->_tmp42_ = _data_->_tmp36_;
						_data_->_tmp36_ = NULL;
						_g_free0 (_data_->normalised_address);
						_data_->normalised_address = _data_->_tmp42_;
						_g_free0 (_data_->_tmp36_);
					}
					goto __finally3;
					__catch3_folks_im_details_error:
					{
						_data_->e2 = _data_->_inner_error_;
						_data_->_inner_error_ = NULL;
						_data_->_tmp43_ = NULL;
						_data_->_tmp43_ = _ ("Invalid IM address ‘%s’ for protocol ‘%s’: %s");
						_data_->_tmp44_ = NULL;
						_data_->_tmp44_ = _data_->im_fd;
						_data_->_tmp45_ = NULL;
						_data_->_tmp45_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp44_);
						_data_->_tmp46_ = NULL;
						_data_->_tmp46_ = _data_->_tmp45_;
						_data_->_tmp47_ = NULL;
						_data_->_tmp47_ = _data_->protocol2;
						_data_->_tmp48_ = NULL;
						_data_->_tmp48_ = _data_->e2;
						_data_->_tmp49_ = NULL;
						_data_->_tmp49_ = _data_->_tmp48_->message;
						_data_->_tmp50_ = NULL;
						_data_->_tmp50_ = g_error_new (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_INVALID_VALUE, _data_->_tmp43_, (const gchar*) _data_->_tmp46_, _data_->_tmp47_, _data_->_tmp49_);
						_data_->_inner_error_ = _data_->_tmp50_;
						_g_error_free0 (_data_->e2);
						goto __finally3;
					}
					__finally3:
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
							g_error_free (_data_->_inner_error_);
							_g_free0 (_data_->normalised_address);
							_g_object_unref0 (_data_->im_fd);
							_g_object_unref0 (_data_->_im_fd_it);
							_g_object_unref0 (_data_->normalised_addresses);
							_g_object_unref0 (_data_->addresses);
							_g_free0 (_data_->protocol2);
							_g_object_unref0 (_data_->_protocol2_it);
							_g_object_unref0 (_data_->new_im_addresses);
							if (_data_->_state_ == 0) {
								g_simple_async_result_complete_in_idle (_data_->_async_result);
							} else {
								g_simple_async_result_complete (_data_->_async_result);
							}
							g_object_unref (_data_->_async_result);
							return FALSE;
						} else {
							_g_free0 (_data_->normalised_address);
							_g_object_unref0 (_data_->im_fd);
							_g_object_unref0 (_data_->_im_fd_it);
							_g_object_unref0 (_data_->normalised_addresses);
							_g_object_unref0 (_data_->addresses);
							_g_free0 (_data_->protocol2);
							_g_object_unref0 (_data_->_protocol2_it);
							_g_object_unref0 (_data_->new_im_addresses);
							g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
							g_clear_error (&_data_->_inner_error_);
							return FALSE;
						}
					}
					_data_->_tmp51_ = NULL;
					_data_->_tmp51_ = _data_->normalised_addresses;
					_data_->_tmp52_ = NULL;
					_data_->_tmp52_ = _data_->normalised_address;
					gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp51_, _data_->_tmp52_);
					_data_->_tmp53_ = NULL;
					_data_->_tmp53_ = _data_->normalised_address;
					_data_->_tmp54_ = NULL;
					_data_->_tmp54_ = folks_im_field_details_new (_data_->_tmp53_, NULL);
					_data_->new_im_fd = _data_->_tmp54_;
					_data_->_tmp55_ = NULL;
					_data_->_tmp55_ = _data_->new_im_addresses;
					_data_->_tmp56_ = NULL;
					_data_->_tmp56_ = _data_->protocol2;
					_data_->_tmp57_ = NULL;
					_data_->_tmp57_ = _data_->new_im_fd;
					gee_multi_map_set ((GeeMultiMap*) _data_->_tmp55_, _data_->_tmp56_, _data_->_tmp57_);
					_g_object_unref0 (_data_->new_im_fd);
					_g_free0 (_data_->normalised_address);
					_g_object_unref0 (_data_->im_fd);
				}
				_g_object_unref0 (_data_->_im_fd_it);
			}
			_data_->_tmp58_ = NULL;
			_data_->_tmp58_ = _data_->normalised_addresses;
			_data_->_tmp59_ = 0;
			_data_->_tmp60_ = NULL;
			_data_->_tmp60_ = gee_collection_to_array ((GeeCollection*) _data_->_tmp58_, &_data_->_tmp59_);
			_data_->addrs_length1 = 0;
			_data_->_addrs_size_ = 0;
			_data_->addrs = (gchar**) _data_->_tmp60_;
			_data_->addrs_length1 = (_data_->_tmp59_ * sizeof (gchar*)) / sizeof (gchar*);
			_data_->_addrs_size_ = _data_->addrs_length1;
			_data_->_tmp61_ = NULL;
			_data_->_tmp61_ = _data_->normalised_addresses;
			_data_->_tmp62_ = 0;
			_data_->_tmp62_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp61_);
			_data_->_tmp63_ = 0;
			_data_->_tmp63_ = _data_->_tmp62_;
			_data_->addrs_length1 = _data_->_tmp63_;
			_data_->_tmp64_ = 0;
			_data_->_tmp64_ = _data_->addrs_length1;
			_data_->_tmp65_ = NULL;
			_data_->_tmp65_ = _data_->key_file;
			_data_->_tmp66_ = NULL;
			_data_->_tmp66_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
			_data_->_tmp67_ = NULL;
			_data_->_tmp67_ = _data_->_tmp66_;
			_data_->_tmp68_ = NULL;
			_data_->_tmp68_ = _data_->protocol2;
			_data_->_tmp69_ = NULL;
			_data_->_tmp69__length1 = 0;
			_data_->_tmp69_ = _data_->addrs;
			_data_->_tmp69__length1 = _data_->addrs_length1;
			g_key_file_set_string_list (_data_->_tmp65_, _data_->_tmp67_, _data_->_tmp68_, (const gchar* const*) _data_->_tmp69_, _data_->_tmp69__length1);
			_data_->addrs = (_vala_array_free (_data_->addrs, _data_->addrs_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (_data_->normalised_addresses);
			_g_object_unref0 (_data_->addresses);
			_g_free0 (_data_->protocol2);
		}
		_g_object_unref0 (_data_->_protocol2_it);
	}
	_data_->_tmp70_ = NULL;
	_data_->_tmp70_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp71_ = NULL;
	_data_->_tmp71_ = _data_->_tmp70_;
	_data_->_state_ = 1;
	folks_backends_kf_persona_store_save_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp71_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), folks_backends_kf_persona_change_im_addresses_ready, _data_);
	return FALSE;
	_state_1:
	folks_backends_kf_persona_store_save_key_file_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp71_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), _data_->_res_);
	_data_->_tmp72_ = NULL;
	_data_->_tmp72_ = _data_->new_im_addresses;
	_data_->_tmp73_ = NULL;
	_data_->_tmp73_ = _g_object_ref0 (_data_->_tmp72_);
	_g_object_unref0 (_data_->self->priv->_im_addresses);
	_data_->self->priv->_im_addresses = _data_->_tmp73_;
	g_object_notify ((GObject*) _data_->self, "im-addresses");
	_g_object_unref0 (_data_->new_im_addresses);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void folks_backends_kf_persona_real_change_web_service_addresses_data_free (gpointer _data) {
	FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->web_service_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksBackendsKfPersonaChangeWebServiceAddressesData, _data_);
}


static void folks_backends_kf_persona_real_change_web_service_addresses (FolksWebServiceDetails* base, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksBackendsKfPersona * self;
	FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_;
	FolksBackendsKfPersona* _tmp0_ = NULL;
	GeeMultiMap* _tmp1_ = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_data_ = g_slice_new0 (FolksBackendsKfPersonaChangeWebServiceAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_backends_kf_persona_real_change_web_service_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_backends_kf_persona_real_change_web_service_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = web_service_addresses;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->web_service_addresses);
	_data_->web_service_addresses = _tmp2_;
	folks_backends_kf_persona_real_change_web_service_addresses_co (_data_);
}


static void folks_backends_kf_persona_real_change_web_service_addresses_finish (FolksWebServiceDetails* base, GAsyncResult* _res_, GError** error) {
	FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.2
   */
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void folks_backends_kf_persona_change_web_service_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_backends_kf_persona_real_change_web_service_addresses_co (_data_);
}


static gboolean folks_backends_kf_persona_real_change_web_service_addresses_co (FolksBackendsKfPersonaChangeWebServiceAddressesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = folks_backends_kf_persona_store_get_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore));
	_data_->key_file = _data_->_tmp2_;
	{
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->self->priv->_web_service_addresses;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = gee_multi_map_get_keys ((GeeMultiMap*) _data_->_tmp3_);
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp5_);
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->_tmp6_;
		_g_object_unref0 (_data_->_tmp5_);
		_data_->_web_service1_it = _data_->_tmp7_;
		while (TRUE) {
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->_web_service1_it;
			_data_->_tmp9_ = FALSE;
			_data_->_tmp9_ = gee_iterator_next (_data_->_tmp8_);
			if (!_data_->_tmp9_) {
				break;
			}
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_web_service1_it;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = gee_iterator_get (_data_->_tmp10_);
			_data_->web_service1 = (gchar*) _data_->_tmp11_;
			{
				_data_->_tmp12_ = NULL;
				_data_->_tmp12_ = _data_->key_file;
				_data_->_tmp13_ = NULL;
				_data_->_tmp13_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
				_data_->_tmp14_ = NULL;
				_data_->_tmp14_ = _data_->_tmp13_;
				_data_->_tmp15_ = NULL;
				_data_->_tmp15_ = _data_->web_service1;
				_data_->_tmp16_ = NULL;
				_data_->_tmp16_ = g_strconcat ("web-service.", _data_->_tmp15_, NULL);
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = _data_->_tmp16_;
				g_key_file_remove_key (_data_->_tmp12_, _data_->_tmp14_, _data_->_tmp17_, &_data_->_inner_error_);
				_g_free0 (_data_->_tmp17_);
				if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
					if (_data_->_inner_error_->domain == G_KEY_FILE_ERROR) {
						goto __catch4_g_key_file_error;
					}
					_g_free0 (_data_->web_service1);
					_g_object_unref0 (_data_->_web_service1_it);
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
			goto __finally4;
			__catch4_g_key_file_error:
			{
				_data_->e = _data_->_inner_error_;
				_data_->_inner_error_ = NULL;
				_g_error_free0 (_data_->e);
			}
			__finally4:
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
					g_error_free (_data_->_inner_error_);
					_g_free0 (_data_->web_service1);
					_g_object_unref0 (_data_->_web_service1_it);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				} else {
					_g_free0 (_data_->web_service1);
					_g_object_unref0 (_data_->_web_service1_it);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
			_g_free0 (_data_->web_service1);
		}
		_g_object_unref0 (_data_->_web_service1_it);
	}
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_data_->new_web_service_addresses = _data_->_tmp18_;
	{
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = _data_->web_service_addresses;
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = gee_multi_map_get_keys (_data_->_tmp19_);
		_data_->_tmp21_ = NULL;
		_data_->_tmp21_ = _data_->_tmp20_;
		_data_->_tmp22_ = NULL;
		_data_->_tmp22_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp21_);
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = _data_->_tmp22_;
		_g_object_unref0 (_data_->_tmp21_);
		_data_->_web_service2_it = _data_->_tmp23_;
		while (TRUE) {
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = _data_->_web_service2_it;
			_data_->_tmp25_ = FALSE;
			_data_->_tmp25_ = gee_iterator_next (_data_->_tmp24_);
			if (!_data_->_tmp25_) {
				break;
			}
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->_web_service2_it;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = gee_iterator_get (_data_->_tmp26_);
			_data_->web_service2 = (gchar*) _data_->_tmp27_;
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = _data_->web_service_addresses;
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = _data_->web_service2;
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = gee_multi_map_get (_data_->_tmp28_, _data_->_tmp29_);
			_data_->ws_fds = _data_->_tmp30_;
			_data_->_tmp31_ = NULL;
			_data_->_tmp31_ = g_new0 (gchar*, 0 + 1);
			_data_->addrs_length1 = 0;
			_data_->_addrs_size_ = 0;
			_data_->addrs = _data_->_tmp31_;
			_data_->addrs_length1 = 0;
			_data_->_addrs_size_ = _data_->addrs_length1;
			{
				_data_->_tmp32_ = NULL;
				_data_->_tmp32_ = _data_->ws_fds;
				_data_->_tmp33_ = NULL;
				_data_->_tmp33_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp32_);
				_data_->_ws_fd1_it = _data_->_tmp33_;
				while (TRUE) {
					_data_->_tmp34_ = NULL;
					_data_->_tmp34_ = _data_->_ws_fd1_it;
					_data_->_tmp35_ = FALSE;
					_data_->_tmp35_ = gee_iterator_next (_data_->_tmp34_);
					if (!_data_->_tmp35_) {
						break;
					}
					_data_->_tmp36_ = NULL;
					_data_->_tmp36_ = _data_->_ws_fd1_it;
					_data_->_tmp37_ = NULL;
					_data_->_tmp37_ = gee_iterator_get (_data_->_tmp36_);
					_data_->ws_fd1 = (FolksWebServiceFieldDetails*) _data_->_tmp37_;
					_data_->_tmp38_ = NULL;
					_data_->_tmp38__length1 = 0;
					_data_->_tmp38_ = _data_->addrs;
					_data_->_tmp38__length1 = _data_->addrs_length1;
					_data_->_tmp39_ = NULL;
					_data_->_tmp39_ = _data_->ws_fd1;
					_data_->_tmp40_ = NULL;
					_data_->_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp39_);
					_data_->_tmp41_ = NULL;
					_data_->_tmp41_ = _data_->_tmp40_;
					_data_->_tmp42_ = NULL;
					_data_->_tmp42_ = g_strdup ((const gchar*) _data_->_tmp41_);
					_vala_array_add2 (&_data_->addrs, &_data_->addrs_length1, &_data_->_addrs_size_, _data_->_tmp42_);
					_g_object_unref0 (_data_->ws_fd1);
				}
				_g_object_unref0 (_data_->_ws_fd1_it);
			}
			_data_->_tmp43_ = NULL;
			_data_->_tmp43_ = _data_->key_file;
			_data_->_tmp44_ = NULL;
			_data_->_tmp44_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
			_data_->_tmp45_ = NULL;
			_data_->_tmp45_ = _data_->_tmp44_;
			_data_->_tmp46_ = NULL;
			_data_->_tmp46_ = _data_->web_service2;
			_data_->_tmp47_ = NULL;
			_data_->_tmp47_ = g_strconcat ("web-service.", _data_->_tmp46_, NULL);
			_data_->_tmp48_ = NULL;
			_data_->_tmp48_ = _data_->_tmp47_;
			_data_->_tmp49_ = NULL;
			_data_->_tmp49__length1 = 0;
			_data_->_tmp49_ = _data_->addrs;
			_data_->_tmp49__length1 = _data_->addrs_length1;
			g_key_file_set_string_list (_data_->_tmp43_, _data_->_tmp45_, _data_->_tmp48_, (const gchar* const*) _data_->_tmp49_, _data_->_tmp49__length1);
			_g_free0 (_data_->_tmp48_);
			{
				_data_->_tmp50_ = NULL;
				_data_->_tmp50_ = _data_->ws_fds;
				_data_->_tmp51_ = NULL;
				_data_->_tmp51_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp50_);
				_data_->_ws_fd2_it = _data_->_tmp51_;
				while (TRUE) {
					_data_->_tmp52_ = NULL;
					_data_->_tmp52_ = _data_->_ws_fd2_it;
					_data_->_tmp53_ = FALSE;
					_data_->_tmp53_ = gee_iterator_next (_data_->_tmp52_);
					if (!_data_->_tmp53_) {
						break;
					}
					_data_->_tmp54_ = NULL;
					_data_->_tmp54_ = _data_->_ws_fd2_it;
					_data_->_tmp55_ = NULL;
					_data_->_tmp55_ = gee_iterator_get (_data_->_tmp54_);
					_data_->ws_fd2 = (FolksWebServiceFieldDetails*) _data_->_tmp55_;
					_data_->_tmp56_ = NULL;
					_data_->_tmp56_ = _data_->new_web_service_addresses;
					_data_->_tmp57_ = NULL;
					_data_->_tmp57_ = _data_->web_service2;
					_data_->_tmp58_ = NULL;
					_data_->_tmp58_ = _data_->ws_fd2;
					gee_multi_map_set ((GeeMultiMap*) _data_->_tmp56_, _data_->_tmp57_, _data_->_tmp58_);
					_g_object_unref0 (_data_->ws_fd2);
				}
				_g_object_unref0 (_data_->_ws_fd2_it);
			}
			_data_->addrs = (_vala_array_free (_data_->addrs, _data_->addrs_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (_data_->ws_fds);
			_g_free0 (_data_->web_service2);
		}
		_g_object_unref0 (_data_->_web_service2_it);
	}
	_data_->_tmp59_ = NULL;
	_data_->_tmp59_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp60_ = NULL;
	_data_->_tmp60_ = _data_->_tmp59_;
	_data_->_state_ = 1;
	folks_backends_kf_persona_store_save_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp60_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), folks_backends_kf_persona_change_web_service_addresses_ready, _data_);
	return FALSE;
	_state_1:
	folks_backends_kf_persona_store_save_key_file_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp60_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), _data_->_res_);
	_data_->_tmp61_ = NULL;
	_data_->_tmp61_ = _data_->new_web_service_addresses;
	_data_->_tmp62_ = NULL;
	_data_->_tmp62_ = _g_object_ref0 (_data_->_tmp61_);
	_g_object_unref0 (_data_->self->priv->_web_service_addresses);
	_data_->self->priv->_web_service_addresses = _data_->_tmp62_;
	g_object_notify ((GObject*) _data_->self, "web-service-addresses");
	_g_object_unref0 (_data_->new_web_service_addresses);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void folks_backends_kf_persona_real_change_anti_links_data_free (gpointer _data) {
	FolksBackendsKfPersonaChangeAntiLinksData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->anti_links);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksBackendsKfPersonaChangeAntiLinksData, _data_);
}


static void folks_backends_kf_persona_real_change_anti_links (FolksAntiLinkable* base, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksBackendsKfPersona * self;
	FolksBackendsKfPersonaChangeAntiLinksData* _data_;
	FolksBackendsKfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_data_ = g_slice_new0 (FolksBackendsKfPersonaChangeAntiLinksData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_backends_kf_persona_real_change_anti_links);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_backends_kf_persona_real_change_anti_links_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = anti_links;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->anti_links);
	_data_->anti_links = _tmp2_;
	folks_backends_kf_persona_real_change_anti_links_co (_data_);
}


static void folks_backends_kf_persona_real_change_anti_links_finish (FolksAntiLinkable* base, GAsyncResult* _res_, GError** error) {
	FolksBackendsKfPersonaChangeAntiLinksData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * {@inheritDoc}
   *
   * @since 0.7.3
   */
static void folks_backends_kf_persona_change_anti_links_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksBackendsKfPersonaChangeAntiLinksData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_backends_kf_persona_real_change_anti_links_co (_data_);
}


static gboolean folks_backends_kf_persona_real_change_anti_links_co (FolksBackendsKfPersonaChangeAntiLinksData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->anti_links;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = folks_anti_linkable_get_anti_links ((FolksAntiLinkable*) _data_->self);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = FALSE;
	_data_->_tmp3_ = folks_internal_equal_sets (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _data_->_tmp0_, _data_->_tmp2_);
	if (_data_->_tmp3_) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = folks_backends_kf_persona_store_get_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore));
	_data_->key_file = _data_->_tmp6_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->anti_links;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = folks_persona_get_uid ((FolksPersona*) _data_->self);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->_tmp8_;
	gee_collection_remove ((GeeCollection*) _data_->_tmp7_, _data_->_tmp9_);
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->key_file;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = folks_persona_get_display_id ((FolksPersona*) _data_->self);
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = _data_->anti_links;
	_data_->_tmp14_ = 0;
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = gee_collection_to_array ((GeeCollection*) _data_->_tmp13_, &_data_->_tmp14_);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16__length1 = 0;
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp16__length1 = _data_->_tmp14_;
	g_key_file_set_string_list (_data_->_tmp10_, _data_->_tmp12_, FOLKS_BACKENDS_KF_PERSONA_STORE_anti_links_key_name, (const gchar* const*) _data_->_tmp16_, _data_->_tmp14_);
	_data_->_tmp16_ = (_vala_array_free (_data_->_tmp16_, _data_->_tmp16__length1, (GDestroyNotify) g_free), NULL);
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_state_ = 1;
	folks_backends_kf_persona_store_save_key_file (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp18_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), folks_backends_kf_persona_change_anti_links_ready, _data_);
	return FALSE;
	_state_1:
	folks_backends_kf_persona_store_save_key_file_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp18_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore), _data_->_res_);
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = _data_->self->priv->_anti_links;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _data_->_tmp19_);
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = _data_->self->priv->_anti_links;
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = _data_->anti_links;
	gee_collection_add_all ((GeeCollection*) _data_->_tmp20_, (GeeCollection*) _data_->_tmp21_);
	g_object_notify ((GObject*) _data_->self, "anti-links");
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


/**
   * Create a new persona.
   *
   * Create a new persona for the {@link PersonaStore} ``store``, representing
   * the Persona given by the group ``uid`` in the key file ``key_file``.
   */
FolksBackendsKfPersona* folks_backends_kf_persona_construct (GType object_type, const gchar* id, FolksPersonaStore* store) {
	FolksBackendsKfPersona * self = NULL;
	gchar* iid = NULL;
	FolksPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* uid = NULL;
	FolksPersonaStore* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	FolksPersonaStore* _tmp14_ = NULL;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (store != NULL, NULL);
	_tmp0_ = store;
	_tmp1_ = folks_persona_store_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat (_tmp2_, ":", NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = id;
	_tmp6_ = g_strconcat (_tmp4_, _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp4_);
	iid = _tmp7_;
	_tmp8_ = store;
	_tmp9_ = folks_persona_store_get_id (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = id;
	_tmp12_ = folks_persona_build_uid ("key-file", _tmp10_, _tmp11_);
	uid = _tmp12_;
	_tmp13_ = id;
	_tmp14_ = store;
	self = (FolksBackendsKfPersona*) g_object_new (object_type, "display-id", _tmp13_, "iid", iid, "uid", uid, "store", _tmp14_, "is-user", FALSE, NULL);
	_g_free0 (uid);
	_g_free0 (iid);
	return self;
}


FolksBackendsKfPersona* folks_backends_kf_persona_new (const gchar* id, FolksPersonaStore* store) {
	return folks_backends_kf_persona_construct (FOLKS_BACKENDS_KF_TYPE_PERSONA, id, store);
}


/**
   * {@inheritDoc}
   */
static void folks_backends_kf_persona_real_linkable_property_to_links (FolksPersona* base, const gchar* prop_name, FolksPersonaLinkablePropertyCallback callback, void* callback_target) {
	FolksBackendsKfPersona * self;
	const gchar* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	g_return_if_fail (prop_name != NULL);
	_tmp0_ = prop_name;
	if (g_strcmp0 (_tmp0_, "im-addresses") == 0) {
		GeeMapIterator* iter = NULL;
		GeeHashMultiMap* _tmp1_ = NULL;
		GeeMapIterator* _tmp2_ = NULL;
		_tmp1_ = self->priv->_im_addresses;
		_tmp2_ = gee_multi_map_map_iterator ((GeeMultiMap*) _tmp1_);
		iter = _tmp2_;
		while (TRUE) {
			GeeMapIterator* _tmp3_ = NULL;
			gboolean _tmp4_ = FALSE;
			FolksPersonaLinkablePropertyCallback _tmp5_ = NULL;
			void* _tmp5__target = NULL;
			GeeMapIterator* _tmp6_ = NULL;
			gpointer _tmp7_ = NULL;
			gchar* _tmp8_ = NULL;
			gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			GeeMapIterator* _tmp11_ = NULL;
			gpointer _tmp12_ = NULL;
			FolksImFieldDetails* _tmp13_ = NULL;
			gconstpointer _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			_tmp3_ = iter;
			_tmp4_ = gee_map_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = callback;
			_tmp5__target = callback_target;
			_tmp6_ = iter;
			_tmp7_ = gee_map_iterator_get_key (_tmp6_);
			_tmp8_ = (gchar*) _tmp7_;
			_tmp9_ = g_strconcat (_tmp8_, ":", NULL);
			_tmp10_ = _tmp9_;
			_tmp11_ = iter;
			_tmp12_ = gee_map_iterator_get_value (_tmp11_);
			_tmp13_ = (FolksImFieldDetails*) _tmp12_;
			_tmp14_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = g_strconcat (_tmp10_, (const gchar*) _tmp15_, NULL);
			_tmp17_ = _tmp16_;
			_tmp5_ (_tmp17_, _tmp5__target);
			_g_free0 (_tmp17_);
			_g_object_unref0 (_tmp13_);
			_g_free0 (_tmp10_);
			_g_free0 (_tmp8_);
		}
		_g_object_unref0 (iter);
	} else {
		const gchar* _tmp18_ = NULL;
		_tmp18_ = prop_name;
		if (g_strcmp0 (_tmp18_, "web-service-addresses") == 0) {
			GeeMapIterator* iter = NULL;
			GeeMultiMap* _tmp19_ = NULL;
			GeeMultiMap* _tmp20_ = NULL;
			GeeMapIterator* _tmp21_ = NULL;
			_tmp19_ = folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self);
			_tmp20_ = _tmp19_;
			_tmp21_ = gee_multi_map_map_iterator (_tmp20_);
			iter = _tmp21_;
			while (TRUE) {
				GeeMapIterator* _tmp22_ = NULL;
				gboolean _tmp23_ = FALSE;
				FolksPersonaLinkablePropertyCallback _tmp24_ = NULL;
				void* _tmp24__target = NULL;
				GeeMapIterator* _tmp25_ = NULL;
				gpointer _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				gchar* _tmp28_ = NULL;
				gchar* _tmp29_ = NULL;
				GeeMapIterator* _tmp30_ = NULL;
				gpointer _tmp31_ = NULL;
				FolksWebServiceFieldDetails* _tmp32_ = NULL;
				gconstpointer _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				gchar* _tmp35_ = NULL;
				gchar* _tmp36_ = NULL;
				_tmp22_ = iter;
				_tmp23_ = gee_map_iterator_next (_tmp22_);
				if (!_tmp23_) {
					break;
				}
				_tmp24_ = callback;
				_tmp24__target = callback_target;
				_tmp25_ = iter;
				_tmp26_ = gee_map_iterator_get_key (_tmp25_);
				_tmp27_ = (gchar*) _tmp26_;
				_tmp28_ = g_strconcat (_tmp27_, ":", NULL);
				_tmp29_ = _tmp28_;
				_tmp30_ = iter;
				_tmp31_ = gee_map_iterator_get_value (_tmp30_);
				_tmp32_ = (FolksWebServiceFieldDetails*) _tmp31_;
				_tmp33_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp32_);
				_tmp34_ = _tmp33_;
				_tmp35_ = g_strconcat (_tmp29_, (const gchar*) _tmp34_, NULL);
				_tmp36_ = _tmp35_;
				_tmp24_ (_tmp36_, _tmp24__target);
				_g_free0 (_tmp36_);
				_g_object_unref0 (_tmp32_);
				_g_free0 (_tmp29_);
				_g_free0 (_tmp27_);
			}
			_g_object_unref0 (iter);
		} else {
			const gchar* _tmp37_ = NULL;
			FolksPersonaLinkablePropertyCallback _tmp38_ = NULL;
			void* _tmp38__target = NULL;
			_tmp37_ = prop_name;
			_tmp38_ = callback;
			_tmp38__target = callback_target;
			FOLKS_PERSONA_CLASS (folks_backends_kf_persona_parent_class)->linkable_property_to_links (G_TYPE_CHECK_INSTANCE_CAST (self, FOLKS_TYPE_PERSONA, FolksPersona), _tmp37_, _tmp38_, _tmp38__target);
		}
	}
}


static gchar** folks_backends_kf_persona_real_get_linkable_properties (FolksPersona* base, int* result_length1) {
	gchar** result;
	FolksBackendsKfPersona* self;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = FOLKS_BACKENDS_KF_PERSONA__linkable_properties;
	_tmp0__length1 = G_N_ELEMENTS (FOLKS_BACKENDS_KF_PERSONA__linkable_properties);
	if (result_length1) {
		*result_length1 = _tmp0__length1;
	}
	result = _tmp0_;
	return result;
}


static gchar** folks_backends_kf_persona_real_get_writeable_properties (FolksPersona* base, int* result_length1) {
	gchar** result;
	FolksBackendsKfPersona* self;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = FOLKS_BACKENDS_KF_PERSONA__writeable_properties;
	_tmp0__length1 = G_N_ELEMENTS (FOLKS_BACKENDS_KF_PERSONA__writeable_properties);
	if (result_length1) {
		*result_length1 = _tmp0__length1;
	}
	result = _tmp0_;
	return result;
}


static const gchar* folks_backends_kf_persona_real_get_alias (FolksAliasDetails* base) {
	const gchar* result;
	FolksBackendsKfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = self->priv->_alias;
	result = _tmp0_;
	return result;
}


static void folks_backends_kf_persona_real_set_alias (FolksAliasDetails* base, const gchar* value) {
	FolksBackendsKfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = value;
	folks_alias_details_change_alias ((FolksAliasDetails*) self, _tmp0_, NULL, NULL);
}


static GeeMultiMap* folks_backends_kf_persona_real_get_im_addresses (FolksImDetails* base) {
	GeeMultiMap* result;
	FolksBackendsKfPersona* self;
	GeeHashMultiMap* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = self->priv->_im_addresses;
	result = (GeeMultiMap*) _tmp0_;
	return result;
}


static void folks_backends_kf_persona_real_set_im_addresses (FolksImDetails* base, GeeMultiMap* value) {
	FolksBackendsKfPersona* self;
	GeeMultiMap* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = value;
	folks_im_details_change_im_addresses ((FolksImDetails*) self, _tmp0_, NULL, NULL);
}


static GeeMultiMap* folks_backends_kf_persona_real_get_web_service_addresses (FolksWebServiceDetails* base) {
	GeeMultiMap* result;
	FolksBackendsKfPersona* self;
	GeeHashMultiMap* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = self->priv->_web_service_addresses;
	result = (GeeMultiMap*) _tmp0_;
	return result;
}


static void folks_backends_kf_persona_real_set_web_service_addresses (FolksWebServiceDetails* base, GeeMultiMap* value) {
	FolksBackendsKfPersona* self;
	GeeMultiMap* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = value;
	folks_web_service_details_change_web_service_addresses ((FolksWebServiceDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* folks_backends_kf_persona_real_get_anti_links (FolksAntiLinkable* base) {
	GeeSet* result;
	FolksBackendsKfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = self->priv->_anti_links_ro;
	result = _tmp0_;
	return result;
}


static void folks_backends_kf_persona_real_set_anti_links (FolksAntiLinkable* base, GeeSet* value) {
	FolksBackendsKfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (FolksBackendsKfPersona*) base;
	_tmp0_ = value;
	folks_anti_linkable_change_anti_links ((FolksAntiLinkable*) self, _tmp0_, NULL, NULL);
}


static GObject * folks_backends_kf_persona_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FolksBackendsKfPersona * self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GeeHashMultiMap* _tmp6_ = NULL;
	GeeHashMultiMap* _tmp7_ = NULL;
	FolksSmallSet* _tmp8_ = NULL;
	FolksSmallSet* _tmp9_ = NULL;
	GeeSet* _tmp10_ = NULL;
	GeeSet* _tmp11_ = NULL;
	GKeyFile* key_file = NULL;
	FolksPersonaStore* _tmp12_ = NULL;
	FolksPersonaStore* _tmp13_ = NULL;
	GKeyFile* _tmp14_ = NULL;
	GError * _inner_error_ = NULL;
	parent_class = G_OBJECT_CLASS (folks_backends_kf_persona_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersona);
	_tmp0_ = folks_persona_get_uid ((FolksPersona*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = folks_persona_get_iid ((FolksPersona*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = folks_persona_get_display_id ((FolksPersona*) self);
	_tmp5_ = _tmp4_;
	g_debug ("kf-persona.vala:326: Adding key-file Persona '%s' (IID '%s', group '%s" \
"')", _tmp1_, _tmp3_, _tmp5_);
	_tmp6_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_im_addresses);
	self->priv->_im_addresses = _tmp6_;
	_tmp7_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_g_object_unref0 (self->priv->_web_service_addresses);
	self->priv->_web_service_addresses = _tmp7_;
	_tmp8_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_anti_links);
	self->priv->_anti_links = _tmp8_;
	_tmp9_ = self->priv->_anti_links;
	_tmp10_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp9_);
	_tmp11_ = _tmp10_;
	_g_object_unref0 (self->priv->_anti_links_ro);
	self->priv->_anti_links_ro = _tmp11_;
	_tmp12_ = folks_persona_get_store ((FolksPersona*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = folks_backends_kf_persona_store_get_key_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_BACKENDS_KF_TYPE_PERSONA_STORE, FolksBackendsKfPersonaStore));
	key_file = _tmp14_;
	{
		gchar** keys = NULL;
		GKeyFile* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		gsize _tmp18_;
		gchar** _tmp19_ = NULL;
		gint keys_length1 = 0;
		gint _keys_size_ = 0;
		gchar** _tmp20_ = NULL;
		gint _tmp20__length1 = 0;
		_tmp15_ = key_file;
		_tmp16_ = folks_persona_get_display_id ((FolksPersona*) self);
		_tmp17_ = _tmp16_;
		_tmp19_ = g_key_file_get_keys (_tmp15_, _tmp17_, &_tmp18_, &_inner_error_);
		keys = _tmp19_;
		keys_length1 = _tmp18_;
		_keys_size_ = keys_length1;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_KEY_FILE_ERROR) {
				goto __catch5_g_key_file_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
		}
		_tmp20_ = keys;
		_tmp20__length1 = keys_length1;
		{
			gchar** key_collection = NULL;
			gint key_collection_length1 = 0;
			gint _key_collection_size_ = 0;
			gint key_it = 0;
			key_collection = _tmp20_;
			key_collection_length1 = _tmp20__length1;
			for (key_it = 0; key_it < _tmp20__length1; key_it = key_it + 1) {
				const gchar* key = NULL;
				key = key_collection[key_it];
				{
					const gchar* _tmp21_ = NULL;
					const gchar* _tmp32_ = NULL;
					gchar** decomposed_key = NULL;
					const gchar* _tmp45_ = NULL;
					gchar** _tmp46_ = NULL;
					gchar** _tmp47_ = NULL;
					gint decomposed_key_length1 = 0;
					gint _decomposed_key_size_ = 0;
					gboolean _tmp48_ = FALSE;
					gchar** _tmp49_ = NULL;
					gint _tmp49__length1 = 0;
					const gchar* protocol = NULL;
					const gchar* _tmp67_ = NULL;
					gchar** im_addresses = NULL;
					GKeyFile* _tmp68_ = NULL;
					const gchar* _tmp69_ = NULL;
					const gchar* _tmp70_ = NULL;
					const gchar* _tmp71_ = NULL;
					gsize _tmp72_;
					gchar** _tmp73_ = NULL;
					gint im_addresses_length1 = 0;
					gint _im_addresses_size_ = 0;
					gchar** _tmp74_ = NULL;
					gint _tmp74__length1 = 0;
					_tmp21_ = key;
					if (g_strcmp0 (_tmp21_, "__alias") == 0) {
						gchar* _tmp22_ = NULL;
						GKeyFile* _tmp23_ = NULL;
						const gchar* _tmp24_ = NULL;
						const gchar* _tmp25_ = NULL;
						const gchar* _tmp26_ = NULL;
						gchar* _tmp27_ = NULL;
						gchar* _tmp28_ = NULL;
						const gchar* _tmp29_ = NULL;
						const gchar* _tmp31_ = NULL;
						_tmp23_ = key_file;
						_tmp24_ = folks_persona_get_display_id ((FolksPersona*) self);
						_tmp25_ = _tmp24_;
						_tmp26_ = key;
						_tmp27_ = g_key_file_get_string (_tmp23_, _tmp25_, _tmp26_, &_inner_error_);
						_tmp22_ = _tmp27_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							if (_inner_error_->domain == G_KEY_FILE_ERROR) {
								goto __catch5_g_key_file_error;
							}
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
							g_clear_error (&_inner_error_);
						}
						_tmp28_ = _tmp22_;
						_tmp22_ = NULL;
						_g_free0 (self->priv->_alias);
						self->priv->_alias = _tmp28_;
						_tmp29_ = self->priv->_alias;
						if (_tmp29_ == NULL) {
							gchar* _tmp30_ = NULL;
							_tmp30_ = g_strdup ("");
							_g_free0 (self->priv->_alias);
							self->priv->_alias = _tmp30_;
						}
						_tmp31_ = self->priv->_alias;
						g_debug ("kf-persona.vala:357:     Loaded alias '%s'.", _tmp31_);
						_g_free0 (_tmp22_);
						continue;
					}
					_tmp32_ = key;
					if (g_strcmp0 (_tmp32_, FOLKS_BACKENDS_KF_PERSONA_STORE_anti_links_key_name) == 0) {
						gchar** anti_link_array = NULL;
						GKeyFile* _tmp33_ = NULL;
						const gchar* _tmp34_ = NULL;
						const gchar* _tmp35_ = NULL;
						const gchar* _tmp36_ = NULL;
						gsize _tmp37_;
						gchar** _tmp38_ = NULL;
						gint anti_link_array_length1 = 0;
						gint _anti_link_array_size_ = 0;
						gchar** _tmp39_ = NULL;
						gint _tmp39__length1 = 0;
						_tmp33_ = key_file;
						_tmp34_ = folks_persona_get_display_id ((FolksPersona*) self);
						_tmp35_ = _tmp34_;
						_tmp36_ = key;
						_tmp38_ = g_key_file_get_string_list (_tmp33_, _tmp35_, _tmp36_, &_tmp37_, &_inner_error_);
						anti_link_array = _tmp38_;
						anti_link_array_length1 = _tmp37_;
						_anti_link_array_size_ = anti_link_array_length1;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							if (_inner_error_->domain == G_KEY_FILE_ERROR) {
								goto __catch5_g_key_file_error;
							}
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
							g_clear_error (&_inner_error_);
						}
						_tmp39_ = anti_link_array;
						_tmp39__length1 = anti_link_array_length1;
						if (_tmp39_ != NULL) {
							gchar** _tmp40_ = NULL;
							gint _tmp40__length1 = 0;
							gchar** _tmp44_ = NULL;
							gint _tmp44__length1 = 0;
							_tmp40_ = anti_link_array;
							_tmp40__length1 = anti_link_array_length1;
							{
								gchar** anti_link_collection = NULL;
								gint anti_link_collection_length1 = 0;
								gint _anti_link_collection_size_ = 0;
								gint anti_link_it = 0;
								anti_link_collection = _tmp40_;
								anti_link_collection_length1 = _tmp40__length1;
								for (anti_link_it = 0; anti_link_it < _tmp40__length1; anti_link_it = anti_link_it + 1) {
									gchar* _tmp41_ = NULL;
									gchar* anti_link = NULL;
									_tmp41_ = g_strdup (anti_link_collection[anti_link_it]);
									anti_link = _tmp41_;
									{
										FolksSmallSet* _tmp42_ = NULL;
										const gchar* _tmp43_ = NULL;
										_tmp42_ = self->priv->_anti_links;
										_tmp43_ = anti_link;
										gee_abstract_collection_add ((GeeAbstractCollection*) _tmp42_, _tmp43_);
										_g_free0 (anti_link);
									}
								}
							}
							_tmp44_ = anti_link_array;
							_tmp44__length1 = anti_link_array_length1;
							g_debug ("kf-persona.vala:374:     Loaded %u anti-links.", (guint) _tmp44__length1);
							anti_link_array = (_vala_array_free (anti_link_array, anti_link_array_length1, (GDestroyNotify) g_free), NULL);
							continue;
						}
						anti_link_array = (_vala_array_free (anti_link_array, anti_link_array_length1, (GDestroyNotify) g_free), NULL);
					}
					_tmp45_ = key;
					_tmp47_ = _tmp46_ = g_strsplit (_tmp45_, ".", 2);
					decomposed_key = _tmp47_;
					decomposed_key_length1 = _vala_array_length (_tmp46_);
					_decomposed_key_size_ = decomposed_key_length1;
					_tmp49_ = decomposed_key;
					_tmp49__length1 = decomposed_key_length1;
					if (_tmp49__length1 == 2) {
						gchar** _tmp50_ = NULL;
						gint _tmp50__length1 = 0;
						const gchar* _tmp51_ = NULL;
						_tmp50_ = decomposed_key;
						_tmp50__length1 = decomposed_key_length1;
						_tmp51_ = _tmp50_[0];
						_tmp48_ = g_strcmp0 (_tmp51_, "web-service") == 0;
					} else {
						_tmp48_ = FALSE;
					}
					if (_tmp48_) {
						const gchar* web_service = NULL;
						gchar** _tmp52_ = NULL;
						gint _tmp52__length1 = 0;
						const gchar* _tmp53_ = NULL;
						gchar** web_service_addresses = NULL;
						GKeyFile* _tmp54_ = NULL;
						const gchar* _tmp55_ = NULL;
						const gchar* _tmp56_ = NULL;
						const gchar* _tmp57_ = NULL;
						gsize _tmp58_;
						gchar** _tmp59_ = NULL;
						gint web_service_addresses_length1 = 0;
						gint _web_service_addresses_size_ = 0;
						gchar** _tmp60_ = NULL;
						gint _tmp60__length1 = 0;
						_tmp52_ = decomposed_key;
						_tmp52__length1 = decomposed_key_length1;
						_tmp53_ = _tmp52_[1];
						web_service = _tmp53_;
						_tmp54_ = key_file;
						_tmp55_ = folks_persona_get_display_id ((FolksPersona*) self);
						_tmp56_ = _tmp55_;
						_tmp57_ = web_service;
						_tmp59_ = g_key_file_get_string_list (_tmp54_, _tmp56_, _tmp57_, &_tmp58_, &_inner_error_);
						web_service_addresses = _tmp59_;
						web_service_addresses_length1 = _tmp58_;
						_web_service_addresses_size_ = web_service_addresses_length1;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							if (_inner_error_->domain == G_KEY_FILE_ERROR) {
								goto __catch5_g_key_file_error;
							}
							decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
							keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
							g_clear_error (&_inner_error_);
						}
						_tmp60_ = web_service_addresses;
						_tmp60__length1 = web_service_addresses_length1;
						{
							gchar** web_service_address_collection = NULL;
							gint web_service_address_collection_length1 = 0;
							gint _web_service_address_collection_size_ = 0;
							gint web_service_address_it = 0;
							web_service_address_collection = _tmp60_;
							web_service_address_collection_length1 = _tmp60__length1;
							for (web_service_address_it = 0; web_service_address_it < _tmp60__length1; web_service_address_it = web_service_address_it + 1) {
								gchar* _tmp61_ = NULL;
								gchar* web_service_address = NULL;
								_tmp61_ = g_strdup (web_service_address_collection[web_service_address_it]);
								web_service_address = _tmp61_;
								{
									GeeHashMultiMap* _tmp62_ = NULL;
									const gchar* _tmp63_ = NULL;
									const gchar* _tmp64_ = NULL;
									FolksWebServiceFieldDetails* _tmp65_ = NULL;
									FolksWebServiceFieldDetails* _tmp66_ = NULL;
									_tmp62_ = self->priv->_web_service_addresses;
									_tmp63_ = web_service;
									_tmp64_ = web_service_address;
									_tmp65_ = folks_web_service_field_details_new (_tmp64_, NULL);
									_tmp66_ = _tmp65_;
									gee_multi_map_set ((GeeMultiMap*) _tmp62_, _tmp63_, _tmp66_);
									_g_object_unref0 (_tmp66_);
									_g_free0 (web_service_address);
								}
							}
						}
						web_service_addresses = (_vala_array_free (web_service_addresses, web_service_addresses_length1, (GDestroyNotify) g_free), NULL);
						decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_tmp67_ = key;
					protocol = _tmp67_;
					_tmp68_ = key_file;
					_tmp69_ = folks_persona_get_display_id ((FolksPersona*) self);
					_tmp70_ = _tmp69_;
					_tmp71_ = protocol;
					_tmp73_ = g_key_file_get_string_list (_tmp68_, _tmp70_, _tmp71_, &_tmp72_, &_inner_error_);
					im_addresses = _tmp73_;
					im_addresses_length1 = _tmp72_;
					_im_addresses_size_ = im_addresses_length1;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
						keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
						if (_inner_error_->domain == G_KEY_FILE_ERROR) {
							goto __catch5_g_key_file_error;
						}
						decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
						keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
						g_clear_error (&_inner_error_);
					}
					_tmp74_ = im_addresses;
					_tmp74__length1 = im_addresses_length1;
					{
						gchar** im_address_collection = NULL;
						gint im_address_collection_length1 = 0;
						gint _im_address_collection_size_ = 0;
						gint im_address_it = 0;
						im_address_collection = _tmp74_;
						im_address_collection_length1 = _tmp74__length1;
						for (im_address_it = 0; im_address_it < _tmp74__length1; im_address_it = im_address_it + 1) {
							gchar* _tmp75_ = NULL;
							gchar* im_address = NULL;
							_tmp75_ = g_strdup (im_address_collection[im_address_it]);
							im_address = _tmp75_;
							{
								gchar* address = NULL;
								FolksImFieldDetails* im_fd = NULL;
								const gchar* _tmp83_ = NULL;
								FolksImFieldDetails* _tmp84_ = NULL;
								GeeHashMultiMap* _tmp85_ = NULL;
								const gchar* _tmp86_ = NULL;
								FolksImFieldDetails* _tmp87_ = NULL;
								{
									gchar* _tmp76_ = NULL;
									const gchar* _tmp77_ = NULL;
									const gchar* _tmp78_ = NULL;
									gchar* _tmp79_ = NULL;
									gchar* _tmp80_ = NULL;
									_tmp77_ = im_address;
									_tmp78_ = protocol;
									_tmp79_ = folks_im_details_normalise_im_address (_tmp77_, _tmp78_, &_inner_error_);
									_tmp76_ = _tmp79_;
									if (G_UNLIKELY (_inner_error_ != NULL)) {
										if (_inner_error_->domain == FOLKS_IM_DETAILS_ERROR) {
											goto __catch6_folks_im_details_error;
										}
										_g_free0 (address);
										_g_free0 (im_address);
										im_addresses = (_vala_array_free (im_addresses, im_addresses_length1, (GDestroyNotify) g_free), NULL);
										decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
										keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
										g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
										g_clear_error (&_inner_error_);
									}
									_tmp80_ = _tmp76_;
									_tmp76_ = NULL;
									_g_free0 (address);
									address = _tmp80_;
									_g_free0 (_tmp76_);
								}
								goto __finally6;
								__catch6_folks_im_details_error:
								{
									GError* e = NULL;
									GError* _tmp81_ = NULL;
									const gchar* _tmp82_ = NULL;
									e = _inner_error_;
									_inner_error_ = NULL;
									_tmp81_ = e;
									_tmp82_ = _tmp81_->message;
									g_warning ("kf-persona.vala:414: %s", _tmp82_);
									_g_error_free0 (e);
									_g_free0 (address);
									_g_free0 (im_address);
									continue;
								}
								__finally6:
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									_g_free0 (address);
									_g_free0 (im_address);
									im_addresses = (_vala_array_free (im_addresses, im_addresses_length1, (GDestroyNotify) g_free), NULL);
									decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
									keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
									if (_inner_error_->domain == G_KEY_FILE_ERROR) {
										goto __catch5_g_key_file_error;
									}
									_g_free0 (address);
									_g_free0 (im_address);
									im_addresses = (_vala_array_free (im_addresses, im_addresses_length1, (GDestroyNotify) g_free), NULL);
									decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
									keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
									g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
									g_clear_error (&_inner_error_);
								}
								_tmp83_ = address;
								_tmp84_ = folks_im_field_details_new (_tmp83_, NULL);
								im_fd = _tmp84_;
								_tmp85_ = self->priv->_im_addresses;
								_tmp86_ = protocol;
								_tmp87_ = im_fd;
								gee_multi_map_set ((GeeMultiMap*) _tmp85_, _tmp86_, _tmp87_);
								_g_object_unref0 (im_fd);
								_g_free0 (address);
								_g_free0 (im_address);
							}
						}
					}
					im_addresses = (_vala_array_free (im_addresses, im_addresses_length1, (GDestroyNotify) g_free), NULL);
					decomposed_key = (_vala_array_free (decomposed_key, decomposed_key_length1, (GDestroyNotify) g_free), NULL);
				}
			}
		}
		keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
	}
	goto __finally5;
	__catch5_g_key_file_error:
	{
		GError* e = NULL;
		GError* _tmp88_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp88_ = e;
		if (!g_error_matches (_tmp88_, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND)) {
			const gchar* _tmp89_ = NULL;
			GError* _tmp90_ = NULL;
			const gchar* _tmp91_ = NULL;
			_tmp89_ = _ ("Couldn't load data from key file: %s");
			_tmp90_ = e;
			_tmp91_ = _tmp90_->message;
			g_warning (_tmp89_, _tmp91_);
		}
		_g_error_free0 (e);
	}
	__finally5:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
	}
	return obj;
}


static void folks_backends_kf_persona_class_init (FolksBackendsKfPersonaClass * klass) {
	folks_backends_kf_persona_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FolksBackendsKfPersonaPrivate));
	((FolksPersonaClass *) klass)->linkable_property_to_links = folks_backends_kf_persona_real_linkable_property_to_links;
	FOLKS_PERSONA_CLASS (klass)->get_linkable_properties = folks_backends_kf_persona_real_get_linkable_properties;
	FOLKS_PERSONA_CLASS (klass)->get_writeable_properties = folks_backends_kf_persona_real_get_writeable_properties;
	G_OBJECT_CLASS (klass)->get_property = _vala_folks_backends_kf_persona_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_folks_backends_kf_persona_set_property;
	G_OBJECT_CLASS (klass)->constructor = folks_backends_kf_persona_constructor;
	G_OBJECT_CLASS (klass)->finalize = folks_backends_kf_persona_finalize;
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_LINKABLE_PROPERTIES, g_param_spec_boxed ("linkable-properties", "linkable-properties", "linkable-properties", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_WRITEABLE_PROPERTIES, g_param_spec_boxed ("writeable-properties", "writeable-properties", "writeable-properties", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.1.15
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_ALIAS, g_param_spec_string ("alias", "alias", "alias", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_IM_ADDRESSES, g_param_spec_object ("im-addresses", "im-addresses", "im-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_WEB_SERVICE_ADDRESSES, g_param_spec_object ("web-service-addresses", "web-service-addresses", "web-service-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.7.3
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_BACKENDS_KF_PERSONA_ANTI_LINKS, g_param_spec_object ("anti-links", "anti-links", "anti-links", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void folks_backends_kf_persona_folks_alias_details_interface_init (FolksAliasDetailsIface * iface) {
	folks_backends_kf_persona_folks_alias_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_alias = (void (*)(FolksAliasDetails*, const gchar*, GError**)) folks_backends_kf_persona_real_change_alias;
	iface->change_alias_finish = folks_backends_kf_persona_real_change_alias_finish;
	iface->get_alias = folks_backends_kf_persona_real_get_alias;
	iface->set_alias = folks_backends_kf_persona_real_set_alias;
}


static void folks_backends_kf_persona_folks_anti_linkable_interface_init (FolksAntiLinkableIface * iface) {
	folks_backends_kf_persona_folks_anti_linkable_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_anti_links = (void (*)(FolksAntiLinkable*, GeeSet*, GError**)) folks_backends_kf_persona_real_change_anti_links;
	iface->change_anti_links_finish = folks_backends_kf_persona_real_change_anti_links_finish;
	iface->get_anti_links = folks_backends_kf_persona_real_get_anti_links;
	iface->set_anti_links = folks_backends_kf_persona_real_set_anti_links;
}


static void folks_backends_kf_persona_folks_im_details_interface_init (FolksImDetailsIface * iface) {
	folks_backends_kf_persona_folks_im_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_im_addresses = (void (*)(FolksImDetails*, GeeMultiMap*, GError**)) folks_backends_kf_persona_real_change_im_addresses;
	iface->change_im_addresses_finish = folks_backends_kf_persona_real_change_im_addresses_finish;
	iface->get_im_addresses = folks_backends_kf_persona_real_get_im_addresses;
	iface->set_im_addresses = folks_backends_kf_persona_real_set_im_addresses;
}


static void folks_backends_kf_persona_folks_web_service_details_interface_init (FolksWebServiceDetailsIface * iface) {
	folks_backends_kf_persona_folks_web_service_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_web_service_addresses = (void (*)(FolksWebServiceDetails*, GeeMultiMap*, GError**)) folks_backends_kf_persona_real_change_web_service_addresses;
	iface->change_web_service_addresses_finish = folks_backends_kf_persona_real_change_web_service_addresses_finish;
	iface->get_web_service_addresses = folks_backends_kf_persona_real_get_web_service_addresses;
	iface->set_web_service_addresses = folks_backends_kf_persona_real_set_web_service_addresses;
}


static void folks_backends_kf_persona_instance_init (FolksBackendsKfPersona * self) {
	gchar* _tmp0_ = NULL;
	self->priv = FOLKS_BACKENDS_KF_PERSONA_GET_PRIVATE (self);
	_tmp0_ = g_strdup ("");
	self->priv->_alias = _tmp0_;
}


static void folks_backends_kf_persona_finalize (GObject* obj) {
	FolksBackendsKfPersona * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersona);
	_g_object_unref0 (self->priv->_im_addresses);
	_g_object_unref0 (self->priv->_web_service_addresses);
	_g_free0 (self->priv->_alias);
	_g_object_unref0 (self->priv->_anti_links);
	_g_object_unref0 (self->priv->_anti_links_ro);
	G_OBJECT_CLASS (folks_backends_kf_persona_parent_class)->finalize (obj);
}


/**
 * A persona subclass which represents a single persona from a simple key file.
 *
 * @since 0.1.13
 */
GType folks_backends_kf_persona_get_type (void) {
	static volatile gsize folks_backends_kf_persona_type_id__volatile = 0;
	if (g_once_init_enter (&folks_backends_kf_persona_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksBackendsKfPersonaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_backends_kf_persona_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksBackendsKfPersona), 0, (GInstanceInitFunc) folks_backends_kf_persona_instance_init, NULL };
		static const GInterfaceInfo folks_alias_details_info = { (GInterfaceInitFunc) folks_backends_kf_persona_folks_alias_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_anti_linkable_info = { (GInterfaceInitFunc) folks_backends_kf_persona_folks_anti_linkable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_im_details_info = { (GInterfaceInitFunc) folks_backends_kf_persona_folks_im_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_web_service_details_info = { (GInterfaceInitFunc) folks_backends_kf_persona_folks_web_service_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType folks_backends_kf_persona_type_id;
		folks_backends_kf_persona_type_id = g_type_register_static (FOLKS_TYPE_PERSONA, "FolksBackendsKfPersona", &g_define_type_info, 0);
		g_type_add_interface_static (folks_backends_kf_persona_type_id, FOLKS_TYPE_ALIAS_DETAILS, &folks_alias_details_info);
		g_type_add_interface_static (folks_backends_kf_persona_type_id, FOLKS_TYPE_ANTI_LINKABLE, &folks_anti_linkable_info);
		g_type_add_interface_static (folks_backends_kf_persona_type_id, FOLKS_TYPE_IM_DETAILS, &folks_im_details_info);
		g_type_add_interface_static (folks_backends_kf_persona_type_id, FOLKS_TYPE_WEB_SERVICE_DETAILS, &folks_web_service_details_info);
		g_once_init_leave (&folks_backends_kf_persona_type_id__volatile, folks_backends_kf_persona_type_id);
	}
	return folks_backends_kf_persona_type_id__volatile;
}


static void _vala_folks_backends_kf_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FolksBackendsKfPersona * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersona);
	switch (property_id) {
		case FOLKS_BACKENDS_KF_PERSONA_LINKABLE_PROPERTIES:
		{
			int length;
			g_value_set_boxed (value, folks_persona_get_linkable_properties ((FolksPersona*) self, &length));
		}
		break;
		case FOLKS_BACKENDS_KF_PERSONA_WRITEABLE_PROPERTIES:
		{
			int length;
			g_value_set_boxed (value, folks_persona_get_writeable_properties ((FolksPersona*) self, &length));
		}
		break;
		case FOLKS_BACKENDS_KF_PERSONA_ALIAS:
		g_value_set_string (value, folks_alias_details_get_alias ((FolksAliasDetails*) self));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_IM_ADDRESSES:
		g_value_set_object (value, folks_im_details_get_im_addresses ((FolksImDetails*) self));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_WEB_SERVICE_ADDRESSES:
		g_value_set_object (value, folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_ANTI_LINKS:
		g_value_set_object (value, folks_anti_linkable_get_anti_links ((FolksAntiLinkable*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_folks_backends_kf_persona_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FolksBackendsKfPersona * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_BACKENDS_KF_TYPE_PERSONA, FolksBackendsKfPersona);
	switch (property_id) {
		case FOLKS_BACKENDS_KF_PERSONA_ALIAS:
		folks_alias_details_set_alias ((FolksAliasDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_IM_ADDRESSES:
		folks_im_details_set_im_addresses ((FolksImDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_WEB_SERVICE_ADDRESSES:
		folks_web_service_details_set_web_service_addresses ((FolksWebServiceDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_BACKENDS_KF_PERSONA_ANTI_LINKS:
		folks_anti_linkable_set_anti_links ((FolksAntiLinkable*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


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


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



