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

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

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


#define EDSF_TYPE_PERSONA (edsf_persona_get_type ())
#define EDSF_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDSF_TYPE_PERSONA, EdsfPersona))
#define EDSF_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDSF_TYPE_PERSONA, EdsfPersonaClass))
#define EDSF_IS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDSF_TYPE_PERSONA))
#define EDSF_IS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDSF_TYPE_PERSONA))
#define EDSF_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDSF_TYPE_PERSONA, EdsfPersonaClass))

typedef struct _EdsfPersona EdsfPersona;
typedef struct _EdsfPersonaClass EdsfPersonaClass;
typedef struct _EdsfPersonaPrivate EdsfPersonaPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define EDSF_PERSONA_TYPE_URL_TYPE_MAPPING (edsf_persona_url_type_mapping_get_type ())
typedef struct _EdsfPersonaUrlTypeMapping EdsfPersonaUrlTypeMapping;

#define EDSF_TYPE_PERSONA_STORE (edsf_persona_store_get_type ())
#define EDSF_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore))
#define EDSF_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDSF_TYPE_PERSONA_STORE, EdsfPersonaStoreClass))
#define EDSF_IS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDSF_TYPE_PERSONA_STORE))
#define EDSF_IS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDSF_TYPE_PERSONA_STORE))
#define EDSF_PERSONA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDSF_TYPE_PERSONA_STORE, EdsfPersonaStoreClass))

typedef struct _EdsfPersonaStore EdsfPersonaStore;
typedef struct _EdsfPersonaStoreClass EdsfPersonaStoreClass;
typedef struct _EdsfPersonaChangeWebServiceAddressesData EdsfPersonaChangeWebServiceAddressesData;
typedef struct _EdsfPersonaChangeLocalIdsData EdsfPersonaChangeLocalIdsData;
typedef struct _EdsfPersonaChangeLocationData EdsfPersonaChangeLocationData;
typedef struct _EdsfPersonaChangePostalAddressesData EdsfPersonaChangePostalAddressesData;
typedef struct _EdsfPersonaChangePhoneNumbersData EdsfPersonaChangePhoneNumbersData;
typedef struct _EdsfPersonaChangeEmailAddressesData EdsfPersonaChangeEmailAddressesData;
typedef struct _EdsfPersonaChangeExtendedFieldData EdsfPersonaChangeExtendedFieldData;
typedef struct _EdsfPersonaRemoveExtendedFieldData EdsfPersonaRemoveExtendedFieldData;
typedef struct _EdsfPersonaChangeNotesData EdsfPersonaChangeNotesData;
typedef struct _EdsfPersonaChangeAvatarData EdsfPersonaChangeAvatarData;
typedef struct _EdsfPersonaChangeStructuredNameData EdsfPersonaChangeStructuredNameData;
typedef struct _EdsfPersonaChangeFullNameData EdsfPersonaChangeFullNameData;
typedef struct _EdsfPersonaChangeNicknameData EdsfPersonaChangeNicknameData;
typedef struct _EdsfPersonaChangeGenderData EdsfPersonaChangeGenderData;
typedef struct _EdsfPersonaChangeUrlsData EdsfPersonaChangeUrlsData;
typedef struct _EdsfPersonaChangeImAddressesData EdsfPersonaChangeImAddressesData;
typedef struct _EdsfPersonaChangeGroupData EdsfPersonaChangeGroupData;
typedef struct _EdsfPersonaChangeGroupsData EdsfPersonaChangeGroupsData;
typedef struct _EdsfPersonaChangeSystemGroupsData EdsfPersonaChangeSystemGroupsData;
typedef struct _EdsfPersonaChangeInGooglePersonalGroupData EdsfPersonaChangeInGooglePersonalGroupData;
typedef struct _EdsfPersonaChangeBirthdayData EdsfPersonaChangeBirthdayData;
typedef struct _EdsfPersonaChangeRolesData EdsfPersonaChangeRolesData;
typedef struct _EdsfPersonaChangeIsFavouriteData EdsfPersonaChangeIsFavouriteData;
typedef struct _EdsfPersonaChangeAntiLinksData EdsfPersonaChangeAntiLinksData;
#define __vala_EVCardAttribute_free0(var) ((var == NULL) ? NULL : (var = (_vala_EVCardAttribute_free (var), NULL)))
#define __vala_EContactDate_free0(var) ((var == NULL) ? NULL : (var = (_vala_EContactDate_free (var), NULL)))
#define __vala_EVCardAttributeParam_free0(var) ((var == NULL) ? NULL : (var = (_vala_EVCardAttributeParam_free (var), NULL)))
#define __g_list_free___vala_EVCardAttribute_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free___vala_EVCardAttribute_free0_ (var), NULL)))
#define __vala_EContactName_free0(var) ((var == NULL) ? NULL : (var = (_vala_EContactName_free (var), NULL)))
#define __vala_EContactPhoto_free0(var) ((var == NULL) ? NULL : (var = (_vala_EContactPhoto_free (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define __vala_EContactGeo_free0(var) ((var == NULL) ? NULL : (var = (_vala_EContactGeo_free (var), NULL)))
#define _t_destroy_func0(var) (((var == NULL) || (t_destroy_func == NULL)) ? NULL : (var = (t_destroy_func (var), NULL)))

struct _EdsfPersona {
	FolksPersona parent_instance;
	EdsfPersonaPrivate * priv;
};

struct _EdsfPersonaClass {
	FolksPersonaClass parent_class;
};

struct _EdsfPersonaPrivate {
	EContact* _contact;
	GeeHashMultiMap* _web_service_addresses;
	FolksSmallSet* _local_ids;
	GeeSet* _local_ids_ro;
	FolksLocation* _location;
	FolksSmallSet* _postal_addresses;
	GeeSet* _postal_addresses_ro;
	FolksSmallSet* _phone_numbers;
	GeeSet* _phone_numbers_ro;
	FolksSmallSet* _email_addresses;
	GeeSet* _email_addresses_ro;
	FolksSmallSet* _notes;
	GeeSet* _notes_ro;
	GLoadableIcon* _avatar;
	FolksStructuredName* _structured_name;
	gchar* _contact_id;
	gchar* _full_name;
	gchar* _nickname;
	FolksGender _gender;
	FolksSmallSet* _urls;
	GeeSet* _urls_ro;
	GeeHashMultiMap* _im_addresses;
	FolksSmallSet* _groups;
	GeeSet* _groups_ro;
	GDateTime* _birthday;
	FolksSmallSet* _roles;
	GeeSet* _roles_ro;
	gboolean _is_favourite;
	FolksSmallSet* _anti_links;
	GeeSet* _anti_links_ro;
	FolksSmallSet* _system_groups;
	GeeSet* _system_groups_ro;
	gboolean _in_google_personal_group;
};

struct _EdsfPersonaUrlTypeMapping {
	gchar* vcard_field_name;
	gchar* folks_type;
};

struct _EdsfPersonaChangeWebServiceAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeMultiMap* web_service_addresses;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeMultiMap* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeLocalIdsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* local_ids;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeLocationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	FolksLocation* location;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksLocation* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangePostalAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* postal_addresses;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangePhoneNumbersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* phone_numbers;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeEmailAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* email_addresses;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeExtendedFieldData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gchar* name;
	FolksExtendedFieldDetails* value;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	const gchar* _tmp2_;
	FolksExtendedFieldDetails* _tmp3_;
	GError * _inner_error_;
};

struct _EdsfPersonaRemoveExtendedFieldData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gchar* name;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	const gchar* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeNotesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* notes;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GLoadableIcon* avatar;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GLoadableIcon* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeStructuredNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	FolksStructuredName* structured_name;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksStructuredName* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeFullNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gchar* full_name;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	const gchar* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeNicknameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gchar* nickname;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	const gchar* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeGenderData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	FolksGender gender;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksGender _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeUrlsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* urls;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeImAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeMultiMap* im_addresses;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeMultiMap* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gchar* group;
	gboolean is_member;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeSet* _tmp3_;
	GeeSet* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	GeeSet* _tmp9_;
	GeeSet* _tmp10_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
	FolksSmallSet* new_groups;
	GeeSet* _tmp13_;
	GeeSet* _tmp14_;
	FolksSmallSet* _tmp15_;
	gboolean _tmp16_;
	FolksSmallSet* _tmp17_;
	const gchar* _tmp18_;
	FolksSmallSet* _tmp19_;
	const gchar* _tmp20_;
	FolksSmallSet* _tmp21_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeGroupsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* groups;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeSystemGroupsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* system_groups;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeInGooglePersonalGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gboolean in_personal;
	gboolean _tmp0_;
	gboolean _tmp1_;
	FolksSmallSet* new_system_groups;
	FolksSmallSet* _tmp2_;
	FolksSmallSet* _tmp3_;
	gboolean _tmp4_;
	FolksSmallSet* _tmp5_;
	FolksSmallSet* _tmp6_;
	FolksPersonaStore* _tmp7_;
	FolksPersonaStore* _tmp8_;
	FolksSmallSet* _tmp9_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeBirthdayData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GDateTime* bday;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GDateTime* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeRolesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* roles;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeIsFavouriteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	gboolean is_favourite;
	gboolean _tmp0_;
	gboolean _tmp1_;
	FolksPersonaStore* _tmp2_;
	FolksPersonaStore* _tmp3_;
	gboolean _tmp4_;
	GError * _inner_error_;
};

struct _EdsfPersonaChangeAntiLinksData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	EdsfPersona* self;
	GeeSet* anti_links;
	FolksPersonaStore* _tmp0_;
	FolksPersonaStore* _tmp1_;
	GeeSet* _tmp2_;
	GError * _inner_error_;
};


static gpointer edsf_persona_parent_class = NULL;
static GHashTable* edsf_persona__im_eds_map;
static GStaticRecMutex __lock_edsf_persona__im_eds_map = {0};
static GHashTable* edsf_persona__im_eds_map = NULL;
static GTimeZone* edsf_persona__local_time_zone;
static GTimeZone* edsf_persona__local_time_zone = NULL;
static FolksAntiLinkableIface* edsf_persona_folks_anti_linkable_parent_iface = NULL;
static FolksAvatarDetailsIface* edsf_persona_folks_avatar_details_parent_iface = NULL;
static FolksBirthdayDetailsIface* edsf_persona_folks_birthday_details_parent_iface = NULL;
static FolksEmailDetailsIface* edsf_persona_folks_email_details_parent_iface = NULL;
static FolksExtendedInfoIface* edsf_persona_folks_extended_info_parent_iface = NULL;
static FolksFavouriteDetailsIface* edsf_persona_folks_favourite_details_parent_iface = NULL;
static FolksGenderDetailsIface* edsf_persona_folks_gender_details_parent_iface = NULL;
static FolksGroupDetailsIface* edsf_persona_folks_group_details_parent_iface = NULL;
static FolksImDetailsIface* edsf_persona_folks_im_details_parent_iface = NULL;
static FolksLocalIdDetailsIface* edsf_persona_folks_local_id_details_parent_iface = NULL;
static FolksLocationDetailsIface* edsf_persona_folks_location_details_parent_iface = NULL;
static FolksNameDetailsIface* edsf_persona_folks_name_details_parent_iface = NULL;
static FolksNoteDetailsIface* edsf_persona_folks_note_details_parent_iface = NULL;
static FolksPhoneDetailsIface* edsf_persona_folks_phone_details_parent_iface = NULL;
static FolksRoleDetailsIface* edsf_persona_folks_role_details_parent_iface = NULL;
static FolksUrlDetailsIface* edsf_persona_folks_url_details_parent_iface = NULL;
static FolksPostalAddressDetailsIface* edsf_persona_folks_postal_address_details_parent_iface = NULL;
static FolksWebServiceDetailsIface* edsf_persona_folks_web_service_details_parent_iface = NULL;

GType edsf_persona_get_type (void) G_GNUC_CONST;
#define EDSF_PERSONA_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDSF_TYPE_PERSONA, EdsfPersonaPrivate))
enum  {
	EDSF_PERSONA_DUMMY_PROPERTY,
	EDSF_PERSONA_CONTACT,
	EDSF_PERSONA_WEB_SERVICE_ADDRESSES,
	EDSF_PERSONA_LOCAL_IDS,
	EDSF_PERSONA_LOCATION,
	EDSF_PERSONA_POSTAL_ADDRESSES,
	EDSF_PERSONA_PHONE_NUMBERS,
	EDSF_PERSONA_EMAIL_ADDRESSES,
	EDSF_PERSONA_NOTES,
	EDSF_PERSONA_LINKABLE_PROPERTIES,
	EDSF_PERSONA_WRITEABLE_PROPERTIES,
	EDSF_PERSONA_AVATAR,
	EDSF_PERSONA_STRUCTURED_NAME,
	EDSF_PERSONA_CONTACT_ID,
	EDSF_PERSONA_FULL_NAME,
	EDSF_PERSONA_NICKNAME,
	EDSF_PERSONA_GENDER,
	EDSF_PERSONA_URLS,
	EDSF_PERSONA_IM_ADDRESSES,
	EDSF_PERSONA_GROUPS,
	EDSF_PERSONA_CALENDAR_EVENT_ID,
	EDSF_PERSONA_BIRTHDAY,
	EDSF_PERSONA_ROLES,
	EDSF_PERSONA_IS_FAVOURITE,
	EDSF_PERSONA_ANTI_LINKS,
	EDSF_PERSONA_SYSTEM_GROUPS,
	EDSF_PERSONA_IN_GOOGLE_PERSONAL_GROUP
};
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 GType edsf_persona_url_type_mapping_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static EdsfPersonaUrlTypeMapping* edsf_persona_url_type_mapping_dup (const EdsfPersonaUrlTypeMapping* self);
static void edsf_persona_url_type_mapping_free (EdsfPersonaUrlTypeMapping* self);
static void edsf_persona_url_type_mapping_copy (const EdsfPersonaUrlTypeMapping* self, EdsfPersonaUrlTypeMapping* dest);
static void edsf_persona_url_type_mapping_destroy (EdsfPersonaUrlTypeMapping* self);
#define EDSF_PERSONA_folks_field_attribute_name "X-FOLKS-FIELD"
#define EDSF_PERSONA_gender_attribute_name "X-GENDER"
#define EDSF_PERSONA_gender_male "M"
#define EDSF_PERSONA_gender_female "F"
#define EDSF_PERSONA_GOOGLE_PERSONAL_GROUP_NAME "Contacts"
static void edsf_persona_real_change_web_service_addresses_data_free (gpointer _data);
static void edsf_persona_real_change_web_service_addresses (FolksWebServiceDetails* base, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_web_service_addresses_co (EdsfPersonaChangeWebServiceAddressesData* _data_);
GType edsf_persona_store_get_type (void) G_GNUC_CONST;
void _edsf_persona_store_set_web_service_addresses (EdsfPersonaStore* self, EdsfPersona* persona, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_web_service_addresses_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_web_service_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_local_ids_data_free (gpointer _data);
static void edsf_persona_real_change_local_ids (FolksLocalIdDetails* base, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_local_ids_co (EdsfPersonaChangeLocalIdsData* _data_);
void _edsf_persona_store_set_local_ids (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_local_ids_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_local_ids_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_location_data_free (gpointer _data);
static void edsf_persona_real_change_location (FolksLocationDetails* base, FolksLocation* location, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_location_co (EdsfPersonaChangeLocationData* _data_);
void _edsf_persona_store_set_location (EdsfPersonaStore* self, EdsfPersona* persona, FolksLocation* location, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_location_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_location_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_postal_addresses_data_free (gpointer _data);
static void edsf_persona_real_change_postal_addresses (FolksPostalAddressDetails* base, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_postal_addresses_co (EdsfPersonaChangePostalAddressesData* _data_);
void _edsf_persona_store_set_postal_addresses (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* postal_fds, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_postal_addresses_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_postal_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_phone_numbers_data_free (gpointer _data);
static void edsf_persona_real_change_phone_numbers (FolksPhoneDetails* base, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_phone_numbers_co (EdsfPersonaChangePhoneNumbersData* _data_);
void _edsf_persona_store_set_phones (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* phones, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_phones_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_phone_numbers_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_email_addresses_data_free (gpointer _data);
static void edsf_persona_real_change_email_addresses (FolksEmailDetails* base, GeeSet* email_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_email_addresses_co (EdsfPersonaChangeEmailAddressesData* _data_);
void _edsf_persona_store_set_emails (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* emails, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_emails_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_email_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static FolksExtendedFieldDetails* edsf_persona_real_get_extended_field (FolksExtendedInfo* base, const gchar* name);
FolksExtendedFieldDetails* _edsf_persona_store_get_extended_field (EdsfPersonaStore* self, EdsfPersona* persona, const gchar* name);
static void edsf_persona_real_change_extended_field_data_free (gpointer _data);
static void edsf_persona_real_change_extended_field (FolksExtendedInfo* base, const gchar* name, FolksExtendedFieldDetails* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_extended_field_co (EdsfPersonaChangeExtendedFieldData* _data_);
void _edsf_persona_store_change_extended_field (EdsfPersonaStore* self, EdsfPersona* persona, const gchar* name, FolksExtendedFieldDetails* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_change_extended_field_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_extended_field_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_remove_extended_field_data_free (gpointer _data);
static void edsf_persona_real_remove_extended_field (FolksExtendedInfo* base, const gchar* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_remove_extended_field_co (EdsfPersonaRemoveExtendedFieldData* _data_);
void _edsf_persona_store_remove_extended_field (EdsfPersonaStore* self, EdsfPersona* persona, const gchar* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_remove_extended_field_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_remove_extended_field_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_notes_data_free (gpointer _data);
static void edsf_persona_real_change_notes (FolksNoteDetails* base, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_notes_co (EdsfPersonaChangeNotesData* _data_);
void _edsf_persona_store_set_notes (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_notes_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_notes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_avatar_data_free (gpointer _data);
static void edsf_persona_real_change_avatar (FolksAvatarDetails* base, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_avatar_co (EdsfPersonaChangeAvatarData* _data_);
void _edsf_persona_store_set_avatar (EdsfPersonaStore* self, EdsfPersona* persona, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_avatar_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_structured_name_data_free (gpointer _data);
static void edsf_persona_real_change_structured_name (FolksNameDetails* base, FolksStructuredName* structured_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_structured_name_co (EdsfPersonaChangeStructuredNameData* _data_);
void _edsf_persona_store_set_structured_name (EdsfPersonaStore* self, EdsfPersona* persona, FolksStructuredName* sname, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_structured_name_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_structured_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_full_name_data_free (gpointer _data);
static void edsf_persona_real_change_full_name (FolksNameDetails* base, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_full_name_co (EdsfPersonaChangeFullNameData* _data_);
void _edsf_persona_store_set_full_name (EdsfPersonaStore* self, EdsfPersona* persona, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_full_name_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_full_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_nickname_data_free (gpointer _data);
static void edsf_persona_real_change_nickname (FolksNameDetails* base, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_nickname_co (EdsfPersonaChangeNicknameData* _data_);
void _edsf_persona_store_set_nickname (EdsfPersonaStore* self, EdsfPersona* persona, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_nickname_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_nickname_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_gender_data_free (gpointer _data);
static void edsf_persona_real_change_gender (FolksGenderDetails* base, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_gender_co (EdsfPersonaChangeGenderData* _data_);
void _edsf_persona_store_set_gender (EdsfPersonaStore* self, EdsfPersona* persona, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_gender_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_gender_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_urls_data_free (gpointer _data);
static void edsf_persona_real_change_urls (FolksUrlDetails* base, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_urls_co (EdsfPersonaChangeUrlsData* _data_);
void _edsf_persona_store_set_urls (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_urls_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_urls_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_im_addresses_data_free (gpointer _data);
static void edsf_persona_real_change_im_addresses (FolksImDetails* base, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_im_addresses_co (EdsfPersonaChangeImAddressesData* _data_);
void _edsf_persona_store_set_im_fds (EdsfPersonaStore* self, EdsfPersona* persona, GeeMultiMap* im_fds, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_im_fds_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_group_data_free (gpointer _data);
static void edsf_persona_real_change_group (FolksGroupDetails* base, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_group_co (EdsfPersonaChangeGroupData* _data_);
static void edsf_persona_change_group_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_groups_data_free (gpointer _data);
static void edsf_persona_real_change_groups (FolksGroupDetails* base, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_groups_co (EdsfPersonaChangeGroupsData* _data_);
void _edsf_persona_store_set_groups (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_groups_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_groups_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_change_system_groups_data_free (gpointer _data);
void edsf_persona_change_system_groups (EdsfPersona* self, GeeSet* system_groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
void edsf_persona_change_system_groups_finish (EdsfPersona* self, GAsyncResult* _res_, GError** error);
static gboolean edsf_persona_change_system_groups_co (EdsfPersonaChangeSystemGroupsData* _data_);
void _edsf_persona_store_set_system_groups (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* system_groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_system_groups_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_system_groups_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_change_in_google_personal_group_data_free (gpointer _data);
void edsf_persona_change_in_google_personal_group (EdsfPersona* self, gboolean in_personal, GAsyncReadyCallback _callback_, gpointer _user_data_);
void edsf_persona_change_in_google_personal_group_finish (EdsfPersona* self, GAsyncResult* _res_, GError** error);
static gboolean edsf_persona_change_in_google_personal_group_co (EdsfPersonaChangeInGooglePersonalGroupData* _data_);
static void edsf_persona_change_in_google_personal_group_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_birthday_data_free (gpointer _data);
static void edsf_persona_real_change_birthday (FolksBirthdayDetails* base, GDateTime* bday, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_birthday_co (EdsfPersonaChangeBirthdayData* _data_);
void _edsf_persona_store_set_birthday (EdsfPersonaStore* self, EdsfPersona* persona, GDateTime* bday, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_birthday_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_birthday_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_roles_data_free (gpointer _data);
static void edsf_persona_real_change_roles (FolksRoleDetails* base, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_roles_co (EdsfPersonaChangeRolesData* _data_);
void _edsf_persona_store_set_roles (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_roles_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_roles_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_is_favourite_data_free (gpointer _data);
static void edsf_persona_real_change_is_favourite (FolksFavouriteDetails* base, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_is_favourite_co (EdsfPersonaChangeIsFavouriteData* _data_);
void _edsf_persona_store_set_is_favourite (EdsfPersonaStore* self, EdsfPersona* persona, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_is_favourite_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_is_favourite_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void edsf_persona_real_change_anti_links_data_free (gpointer _data);
static void edsf_persona_real_change_anti_links (FolksAntiLinkable* base, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean edsf_persona_real_change_anti_links_co (EdsfPersonaChangeAntiLinksData* _data_);
void _edsf_persona_store_set_anti_links (EdsfPersonaStore* self, EdsfPersona* persona, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _edsf_persona_store_set_anti_links_finish (EdsfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void edsf_persona_change_anti_links_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gchar* edsf_persona_build_iid_from_contact (const gchar* store_id, EContact* contact);
gpointer _edsf_persona_get_property_from_contact (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, EContact* contact, const gchar* prop_name);
gchar* edsf_persona_build_iid (const gchar* store_id, const gchar* contact_id);
EdsfPersona* edsf_persona_new (EdsfPersonaStore* store, EContact* contact);
EdsfPersona* edsf_persona_construct (GType object_type, EdsfPersonaStore* store, EContact* contact);
static void edsf_persona_real_linkable_property_to_links (FolksPersona* base, const gchar* prop_name, FolksPersonaLinkablePropertyCallback callback, void* callback_target);
void _edsf_persona_update (EdsfPersona* self, EContact* updated_contact);
static void _edsf_persona_update_names (EdsfPersona* self);
static void _edsf_persona_update_avatar (EdsfPersona* self);
static void _edsf_persona_update_urls (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_phones (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_addresses (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_emails (EdsfPersona* self, gboolean emit_notification);
static void _edsf_persona_update_im_addresses (EdsfPersona* self);
static void _edsf_persona_update_groups (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_notes (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_local_ids (EdsfPersona* self);
static void _edsf_persona_update_location (EdsfPersona* self);
static void _edsf_persona_update_web_services_addresses (EdsfPersona* self);
static void _edsf_persona_update_gender (EdsfPersona* self);
static void _edsf_persona_update_birthday (EdsfPersona* self);
static void _edsf_persona_update_roles (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification);
static void _edsf_persona_update_favourite (EdsfPersona* self);
static void _edsf_persona_update_anti_links (EdsfPersona* self);
static void _edsf_persona_update_params (EdsfPersona* self, FolksAbstractFieldDetails* details, EVCardAttribute* attr);
EContact* edsf_persona_get_contact (EdsfPersona* self);
static EVCardAttribute* _vala_EVCardAttribute_copy (EVCardAttribute* self);
static void _vala_EVCardAttribute_free (EVCardAttribute* self);
static gpointer _edsf_persona_get_property (EdsfPersona* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* prop_name);
static EContactDate* _vala_EContactDate_copy (EContactDate* self);
static void _vala_EContactDate_free (EContactDate* self);
static FolksRoleFieldDetails* _edsf_persona_get_default_role (EdsfPersona* self);
static EVCardAttributeParam* _vala_EVCardAttributeParam_copy (EVCardAttributeParam* self);
static void _vala_EVCardAttributeParam_free (EVCardAttributeParam* self);
static void __vala_EVCardAttribute_free0_ (gpointer var);
static void _g_list_free___vala_EVCardAttribute_free0_ (GList* self);
static EContactName* _vala_EContactName_copy (EContactName* self);
static void _vala_EContactName_free (EContactName* self);
static GLoadableIcon* _edsf_persona_contact_photo_to_loadable_icon (EdsfPersona* self, EContactPhoto* _p);
static EContactPhoto* _vala_EContactPhoto_copy (EContactPhoto* self);
static void _vala_EContactPhoto_free (EContactPhoto* self);
static guint8* _vala_array_dup1 (guint8* self, int length);
GHashTable* _edsf_persona_get_im_eds_map (void);
static gchar* _edsf_persona_im_proto_from_addr (EdsfPersona* self, const gchar* addr);
gboolean _edsf_persona_store_is_google_contacts_address_book (EdsfPersonaStore* self);
#define EDSF_PERSONA_STORE_android_favourite_group_name "Starred in Android"
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static FolksPostalAddress* _edsf_persona_postal_address_from_attribute (EdsfPersona* self, EVCardAttribute* attr);
static EContactGeo* _vala_EContactGeo_copy (EContactGeo* self);
static void _vala_EContactGeo_free (EContactGeo* self);
#define EDSF_PERSONA_STORE_anti_links_attribute_name "X-FOLKS-ANTI-LINKS"
static void edsf_persona_set_contact (EdsfPersona* self, EContact* value);
const gchar* edsf_persona_get_contact_id (EdsfPersona* self);
static void edsf_persona_set_contact_id (EdsfPersona* self, const gchar* value);
GeeSet* edsf_persona_get_system_groups (EdsfPersona* self);
void edsf_persona_set_system_groups (EdsfPersona* self, GeeSet* value);
gboolean edsf_persona_get_in_google_personal_group (EdsfPersona* self);
void edsf_persona_set_in_google_personal_group (EdsfPersona* self, gboolean value);
static GObject * edsf_persona_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void edsf_persona_finalize (GObject* obj);
static void _vala_edsf_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_edsf_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);

const gchar* EDSF_PERSONA_phone_fields[12] = {"assistant_phone", "business_phone", "business_phone_2", "callback_phone", "car_phone", "company_phone", "home_phone", "home_phone_2", "isdn_phone", "mobile_phone", "other_phone", "primary_phone"};
const gchar* EDSF_PERSONA_address_fields[3] = {"address_home", "address_other", "address_work"};
const gchar* EDSF_PERSONA_email_fields[4] = {"email_1", "email_2", "email_3", "email_4"};
const gchar* EDSF_PERSONA_url_properties[4] = {"blog_url", "fburl", "homepage_url", "video_url"};
const EdsfPersonaUrlTypeMapping EDSF_PERSONA__url_properties[4] = {{"homepage_url", FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_HOME_PAGE}, {"blog_url", FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_BLOG}, {"fburl", "x-free-busy"}, {"video_url", "x-video"}};
static const gchar* EDSF_PERSONA__linkable_properties[5] = {"im-addresses", "email-addresses", "local-ids", "web-service-addresses", NULL};

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 edsf_persona_real_change_web_service_addresses_data_free (gpointer _data) {
	EdsfPersonaChangeWebServiceAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->web_service_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeWebServiceAddressesData, _data_);
}


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


static void edsf_persona_real_change_web_service_addresses (FolksWebServiceDetails* base, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeWebServiceAddressesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeMultiMap* _tmp1_ = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeWebServiceAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_web_service_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_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_;
	edsf_persona_real_change_web_service_addresses_co (_data_);
}


static void edsf_persona_real_change_web_service_addresses_finish (FolksWebServiceDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeWebServiceAddressesData* _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 edsf_persona_change_web_service_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeWebServiceAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_web_service_addresses_co (_data_);
}


static gboolean edsf_persona_real_change_web_service_addresses_co (EdsfPersonaChangeWebServiceAddressesData* _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_ = _data_->web_service_addresses;
	_data_->_state_ = 1;
	_edsf_persona_store_set_web_service_addresses (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_web_service_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_web_service_addresses_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_local_ids_data_free (gpointer _data) {
	EdsfPersonaChangeLocalIdsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->local_ids);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeLocalIdsData, _data_);
}


static void edsf_persona_real_change_local_ids (FolksLocalIdDetails* base, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeLocalIdsData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeLocalIdsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_local_ids);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_local_ids_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = local_ids;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->local_ids);
	_data_->local_ids = _tmp2_;
	edsf_persona_real_change_local_ids_co (_data_);
}


static void edsf_persona_real_change_local_ids_finish (FolksLocalIdDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeLocalIdsData* _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 edsf_persona_change_local_ids_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeLocalIdsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_local_ids_co (_data_);
}


static gboolean edsf_persona_real_change_local_ids_co (EdsfPersonaChangeLocalIdsData* _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_ = _data_->local_ids;
	_data_->_state_ = 1;
	_edsf_persona_store_set_local_ids (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_local_ids_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_local_ids_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_location_data_free (gpointer _data) {
	EdsfPersonaChangeLocationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->location);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeLocationData, _data_);
}


static void edsf_persona_real_change_location (FolksLocationDetails* base, FolksLocation* location, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeLocationData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	FolksLocation* _tmp1_ = NULL;
	FolksLocation* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeLocationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_location);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_location_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = location;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->location);
	_data_->location = _tmp2_;
	edsf_persona_real_change_location_co (_data_);
}


static void edsf_persona_real_change_location_finish (FolksLocationDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeLocationData* _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.9.2
   */
static void edsf_persona_change_location_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeLocationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_location_co (_data_);
}


static gboolean edsf_persona_real_change_location_co (EdsfPersonaChangeLocationData* _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_ = _data_->location;
	_data_->_state_ = 1;
	_edsf_persona_store_set_location (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_location_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_location_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_postal_addresses_data_free (gpointer _data) {
	EdsfPersonaChangePostalAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->postal_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangePostalAddressesData, _data_);
}


static void edsf_persona_real_change_postal_addresses (FolksPostalAddressDetails* base, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangePostalAddressesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangePostalAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_postal_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_postal_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = postal_addresses;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->postal_addresses);
	_data_->postal_addresses = _tmp2_;
	edsf_persona_real_change_postal_addresses_co (_data_);
}


static void edsf_persona_real_change_postal_addresses_finish (FolksPostalAddressDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangePostalAddressesData* _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 edsf_persona_change_postal_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangePostalAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_postal_addresses_co (_data_);
}


static gboolean edsf_persona_real_change_postal_addresses_co (EdsfPersonaChangePostalAddressesData* _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_ = _data_->postal_addresses;
	_data_->_state_ = 1;
	_edsf_persona_store_set_postal_addresses (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_postal_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_postal_addresses_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_phone_numbers_data_free (gpointer _data) {
	EdsfPersonaChangePhoneNumbersData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->phone_numbers);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangePhoneNumbersData, _data_);
}


static void edsf_persona_real_change_phone_numbers (FolksPhoneDetails* base, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangePhoneNumbersData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangePhoneNumbersData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_phone_numbers);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_phone_numbers_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = phone_numbers;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->phone_numbers);
	_data_->phone_numbers = _tmp2_;
	edsf_persona_real_change_phone_numbers_co (_data_);
}


static void edsf_persona_real_change_phone_numbers_finish (FolksPhoneDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangePhoneNumbersData* _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 edsf_persona_change_phone_numbers_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangePhoneNumbersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_phone_numbers_co (_data_);
}


static gboolean edsf_persona_real_change_phone_numbers_co (EdsfPersonaChangePhoneNumbersData* _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_ = _data_->phone_numbers;
	_data_->_state_ = 1;
	_edsf_persona_store_set_phones (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_phone_numbers_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_phones_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_email_addresses_data_free (gpointer _data) {
	EdsfPersonaChangeEmailAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->email_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeEmailAddressesData, _data_);
}


static void edsf_persona_real_change_email_addresses (FolksEmailDetails* base, GeeSet* email_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeEmailAddressesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeEmailAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_email_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_email_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = email_addresses;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->email_addresses);
	_data_->email_addresses = _tmp2_;
	edsf_persona_real_change_email_addresses_co (_data_);
}


static void edsf_persona_real_change_email_addresses_finish (FolksEmailDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeEmailAddressesData* _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 edsf_persona_change_email_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeEmailAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_email_addresses_co (_data_);
}


static gboolean edsf_persona_real_change_email_addresses_co (EdsfPersonaChangeEmailAddressesData* _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_ = _data_->email_addresses;
	_data_->_state_ = 1;
	_edsf_persona_store_set_emails (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_email_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_emails_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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;
}


/**
   * {@inheritDoc}
   *
   * @since 0.11.0
   */
static FolksExtendedFieldDetails* edsf_persona_real_get_extended_field (FolksExtendedInfo* base, const gchar* name) {
	EdsfPersona * self;
	FolksExtendedFieldDetails* result = NULL;
	FolksPersonaStore* _tmp0_ = NULL;
	FolksPersonaStore* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	FolksExtendedFieldDetails* _tmp3_ = NULL;
	self = (EdsfPersona*) base;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = folks_persona_get_store ((FolksPersona*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = name;
	_tmp3_ = _edsf_persona_store_get_extended_field (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), self, _tmp2_);
	result = _tmp3_;
	return result;
}


static void edsf_persona_real_change_extended_field_data_free (gpointer _data) {
	EdsfPersonaChangeExtendedFieldData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->value);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeExtendedFieldData, _data_);
}


static void edsf_persona_real_change_extended_field (FolksExtendedInfo* base, const gchar* name, FolksExtendedFieldDetails* value, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeExtendedFieldData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	FolksExtendedFieldDetails* _tmp3_ = NULL;
	FolksExtendedFieldDetails* _tmp4_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeExtendedFieldData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_extended_field);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_extended_field_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = name;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->name);
	_data_->name = _tmp2_;
	_tmp3_ = value;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->value);
	_data_->value = _tmp4_;
	edsf_persona_real_change_extended_field_co (_data_);
}


static void edsf_persona_real_change_extended_field_finish (FolksExtendedInfo* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeExtendedFieldData* _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.11.0
   */
static void edsf_persona_change_extended_field_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeExtendedFieldData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_extended_field_co (_data_);
}


static gboolean edsf_persona_real_change_extended_field_co (EdsfPersonaChangeExtendedFieldData* _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_ = _data_->name;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->value;
	_data_->_state_ = 1;
	_edsf_persona_store_change_extended_field (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, _data_->_tmp3_, edsf_persona_change_extended_field_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_change_extended_field_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_remove_extended_field_data_free (gpointer _data) {
	EdsfPersonaRemoveExtendedFieldData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaRemoveExtendedFieldData, _data_);
}


static void edsf_persona_real_remove_extended_field (FolksExtendedInfo* base, const gchar* name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaRemoveExtendedFieldData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaRemoveExtendedFieldData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_remove_extended_field);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_remove_extended_field_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = name;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->name);
	_data_->name = _tmp2_;
	edsf_persona_real_remove_extended_field_co (_data_);
}


static void edsf_persona_real_remove_extended_field_finish (FolksExtendedInfo* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaRemoveExtendedFieldData* _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.11.0
   */
static void edsf_persona_remove_extended_field_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaRemoveExtendedFieldData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_remove_extended_field_co (_data_);
}


static gboolean edsf_persona_real_remove_extended_field_co (EdsfPersonaRemoveExtendedFieldData* _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_ = _data_->name;
	_data_->_state_ = 1;
	_edsf_persona_store_remove_extended_field (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_remove_extended_field_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_remove_extended_field_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_notes_data_free (gpointer _data) {
	EdsfPersonaChangeNotesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->notes);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeNotesData, _data_);
}


static void edsf_persona_real_change_notes (FolksNoteDetails* base, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeNotesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeNotesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_notes);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_notes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = notes;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->notes);
	_data_->notes = _tmp2_;
	edsf_persona_real_change_notes_co (_data_);
}


static void edsf_persona_real_change_notes_finish (FolksNoteDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeNotesData* _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 edsf_persona_change_notes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeNotesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_notes_co (_data_);
}


static gboolean edsf_persona_real_change_notes_co (EdsfPersonaChangeNotesData* _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_ = _data_->notes;
	_data_->_state_ = 1;
	_edsf_persona_store_set_notes (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_notes_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_notes_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_avatar_data_free (gpointer _data) {
	EdsfPersonaChangeAvatarData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->avatar);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeAvatarData, _data_);
}


static void edsf_persona_real_change_avatar (FolksAvatarDetails* base, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeAvatarData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GLoadableIcon* _tmp1_ = NULL;
	GLoadableIcon* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeAvatarData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_avatar);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = avatar;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->avatar);
	_data_->avatar = _tmp2_;
	edsf_persona_real_change_avatar_co (_data_);
}


static void edsf_persona_real_change_avatar_finish (FolksAvatarDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeAvatarData* _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 edsf_persona_change_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_avatar_co (_data_);
}


static gboolean edsf_persona_real_change_avatar_co (EdsfPersonaChangeAvatarData* _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_ = _data_->avatar;
	_data_->_state_ = 1;
	_edsf_persona_store_set_avatar (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_avatar_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_avatar_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_structured_name_data_free (gpointer _data) {
	EdsfPersonaChangeStructuredNameData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->structured_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeStructuredNameData, _data_);
}


static void edsf_persona_real_change_structured_name (FolksNameDetails* base, FolksStructuredName* structured_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeStructuredNameData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	FolksStructuredName* _tmp1_ = NULL;
	FolksStructuredName* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeStructuredNameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_structured_name);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_structured_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = structured_name;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->structured_name);
	_data_->structured_name = _tmp2_;
	edsf_persona_real_change_structured_name_co (_data_);
}


static void edsf_persona_real_change_structured_name_finish (FolksNameDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeStructuredNameData* _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 edsf_persona_change_structured_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeStructuredNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_structured_name_co (_data_);
}


static gboolean edsf_persona_real_change_structured_name_co (EdsfPersonaChangeStructuredNameData* _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_ = _data_->structured_name;
	_data_->_state_ = 1;
	_edsf_persona_store_set_structured_name (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_structured_name_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_structured_name_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_full_name_data_free (gpointer _data) {
	EdsfPersonaChangeFullNameData* _data_;
	_data_ = _data;
	_g_free0 (_data_->full_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeFullNameData, _data_);
}


static void edsf_persona_real_change_full_name (FolksNameDetails* base, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeFullNameData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeFullNameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_full_name);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_full_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = full_name;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->full_name);
	_data_->full_name = _tmp2_;
	edsf_persona_real_change_full_name_co (_data_);
}


static void edsf_persona_real_change_full_name_finish (FolksNameDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeFullNameData* _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 edsf_persona_change_full_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeFullNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_full_name_co (_data_);
}


static gboolean edsf_persona_real_change_full_name_co (EdsfPersonaChangeFullNameData* _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_ = _data_->full_name;
	_data_->_state_ = 1;
	_edsf_persona_store_set_full_name (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_full_name_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_full_name_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_nickname_data_free (gpointer _data) {
	EdsfPersonaChangeNicknameData* _data_;
	_data_ = _data;
	_g_free0 (_data_->nickname);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeNicknameData, _data_);
}


static void edsf_persona_real_change_nickname (FolksNameDetails* base, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeNicknameData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeNicknameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_nickname);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_nickname_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = nickname;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->nickname);
	_data_->nickname = _tmp2_;
	edsf_persona_real_change_nickname_co (_data_);
}


static void edsf_persona_real_change_nickname_finish (FolksNameDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeNicknameData* _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 edsf_persona_change_nickname_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeNicknameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_nickname_co (_data_);
}


static gboolean edsf_persona_real_change_nickname_co (EdsfPersonaChangeNicknameData* _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_ = _data_->nickname;
	_data_->_state_ = 1;
	_edsf_persona_store_set_nickname (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_nickname_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_nickname_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_gender_data_free (gpointer _data) {
	EdsfPersonaChangeGenderData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeGenderData, _data_);
}


static void edsf_persona_real_change_gender (FolksGenderDetails* base, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeGenderData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	FolksGender _tmp1_ = 0;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeGenderData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_gender);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_gender_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = gender;
	_data_->gender = _tmp1_;
	edsf_persona_real_change_gender_co (_data_);
}


static void edsf_persona_real_change_gender_finish (FolksGenderDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeGenderData* _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 edsf_persona_change_gender_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeGenderData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_gender_co (_data_);
}


static gboolean edsf_persona_real_change_gender_co (EdsfPersonaChangeGenderData* _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_ = 0;
	_data_->_tmp2_ = _data_->gender;
	_data_->_state_ = 1;
	_edsf_persona_store_set_gender (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_gender_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_gender_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_urls_data_free (gpointer _data) {
	EdsfPersonaChangeUrlsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->urls);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeUrlsData, _data_);
}


static void edsf_persona_real_change_urls (FolksUrlDetails* base, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeUrlsData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeUrlsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_urls);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_urls_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = urls;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->urls);
	_data_->urls = _tmp2_;
	edsf_persona_real_change_urls_co (_data_);
}


static void edsf_persona_real_change_urls_finish (FolksUrlDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeUrlsData* _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 edsf_persona_change_urls_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeUrlsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_urls_co (_data_);
}


static gboolean edsf_persona_real_change_urls_co (EdsfPersonaChangeUrlsData* _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_ = _data_->urls;
	_data_->_state_ = 1;
	_edsf_persona_store_set_urls (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_urls_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_urls_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_im_addresses_data_free (gpointer _data) {
	EdsfPersonaChangeImAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->im_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeImAddressesData, _data_);
}


static void edsf_persona_real_change_im_addresses (FolksImDetails* base, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeImAddressesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeMultiMap* _tmp1_ = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeImAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_im_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_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_;
	edsf_persona_real_change_im_addresses_co (_data_);
}


static void edsf_persona_real_change_im_addresses_finish (FolksImDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeImAddressesData* _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 edsf_persona_change_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeImAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_im_addresses_co (_data_);
}


static gboolean edsf_persona_real_change_im_addresses_co (EdsfPersonaChangeImAddressesData* _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_ = _data_->im_addresses;
	_data_->_state_ = 1;
	_edsf_persona_store_set_im_fds (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_im_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_im_fds_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_group_data_free (gpointer _data) {
	EdsfPersonaChangeGroupData* _data_;
	_data_ = _data;
	_g_free0 (_data_->group);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeGroupData, _data_);
}


static void edsf_persona_real_change_group (FolksGroupDetails* base, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeGroupData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeGroupData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_group);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = group;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->group);
	_data_->group = _tmp2_;
	_tmp3_ = is_member;
	_data_->is_member = _tmp3_;
	edsf_persona_real_change_group_co (_data_);
}


static void edsf_persona_real_change_group_finish (FolksGroupDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeGroupData* _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.0
   */
static void edsf_persona_change_group_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_group_co (_data_);
}


static gboolean edsf_persona_real_change_group_co (EdsfPersonaChangeGroupData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp2_ = FALSE;
	_data_->_tmp2_ = _data_->is_member;
	if (_data_->_tmp2_ == TRUE) {
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = folks_group_details_get_groups ((FolksGroupDetails*) _data_->self);
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->group;
		_data_->_tmp6_ = FALSE;
		_data_->_tmp6_ = gee_collection_contains ((GeeCollection*) _data_->_tmp4_, _data_->_tmp5_);
		_data_->_tmp1_ = _data_->_tmp6_ == TRUE;
	} else {
		_data_->_tmp1_ = FALSE;
	}
	if (_data_->_tmp1_) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp8_ = FALSE;
		_data_->_tmp8_ = _data_->is_member;
		if (_data_->_tmp8_ == FALSE) {
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = folks_group_details_get_groups ((FolksGroupDetails*) _data_->self);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->group;
			_data_->_tmp12_ = FALSE;
			_data_->_tmp12_ = gee_collection_contains ((GeeCollection*) _data_->_tmp10_, _data_->_tmp11_);
			_data_->_tmp7_ = _data_->_tmp12_ == FALSE;
		} else {
			_data_->_tmp7_ = FALSE;
		}
		_data_->_tmp0_ = _data_->_tmp7_;
	}
	if (_data_->_tmp0_) {
		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_->_tmp13_ = NULL;
	_data_->_tmp13_ = folks_group_details_get_groups ((FolksGroupDetails*) _data_->self);
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = folks_small_set_copy ((GeeIterable*) _data_->_tmp14_, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->new_groups = _data_->_tmp15_;
	_data_->_tmp16_ = FALSE;
	_data_->_tmp16_ = _data_->is_member;
	if (_data_->_tmp16_ == FALSE) {
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = _data_->new_groups;
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = _data_->group;
		gee_abstract_collection_remove ((GeeAbstractCollection*) _data_->_tmp17_, _data_->_tmp18_);
	} else {
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = _data_->new_groups;
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = _data_->group;
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp19_, _data_->_tmp20_);
	}
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = _data_->new_groups;
	_data_->_state_ = 1;
	folks_group_details_change_groups ((FolksGroupDetails*) _data_->self, (GeeSet*) _data_->_tmp21_, edsf_persona_change_group_ready, _data_);
	return FALSE;
	_state_1:
	folks_group_details_change_groups_finish ((FolksGroupDetails*) _data_->self, _data_->_res_, &_data_->_inner_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->new_groups);
		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;
	}
	_g_object_unref0 (_data_->new_groups);
	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 edsf_persona_real_change_groups_data_free (gpointer _data) {
	EdsfPersonaChangeGroupsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->groups);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeGroupsData, _data_);
}


static void edsf_persona_real_change_groups (FolksGroupDetails* base, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeGroupsData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeGroupsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_groups);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_groups_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = groups;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->groups);
	_data_->groups = _tmp2_;
	edsf_persona_real_change_groups_co (_data_);
}


static void edsf_persona_real_change_groups_finish (FolksGroupDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeGroupsData* _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 edsf_persona_change_groups_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeGroupsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_groups_co (_data_);
}


static gboolean edsf_persona_real_change_groups_co (EdsfPersonaChangeGroupsData* _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_ = _data_->groups;
	_data_->_state_ = 1;
	_edsf_persona_store_set_groups (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_groups_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_groups_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_change_system_groups_data_free (gpointer _data) {
	EdsfPersonaChangeSystemGroupsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->system_groups);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeSystemGroupsData, _data_);
}


void edsf_persona_change_system_groups (EdsfPersona* self, GeeSet* system_groups, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersonaChangeSystemGroupsData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	_data_ = g_slice_new0 (EdsfPersonaChangeSystemGroupsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_change_system_groups);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_change_system_groups_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = system_groups;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->system_groups);
	_data_->system_groups = _tmp2_;
	edsf_persona_change_system_groups_co (_data_);
}


void edsf_persona_change_system_groups_finish (EdsfPersona* self, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeSystemGroupsData* _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_));
}


/**
   * Change the contact's system groups.
   *
   * The system groups are a property exposed by Google Contacts address books,
   * and can include any combination of the following identifier:
   * - "Contacts"
   * - "Family"
   * - "Friends"
   * - "Coworkers"
   *
   * Setting the system groups will also change the group membership to include
   * the localized version of those groups, and may change the value of
   * {@link Edsf.Persona.in_google_personal_group}.
   *
   * Attempting to call this method on a persona beloging to a PersonaStore which
   * is not Google will throw a PropertyError.
   *
   * It's preferred to call this rather than setting {@link Persona.system_groups}
   * directly, as this method gives error notification and will only return once
   * the groups have been written to the relevant backing store (or the
   * operation's failed).
   *
   * @param system_groups the complete set of system group ids the contact should be a member of
   * @throws PropertyError if setting the groups failed
   * @since 0.9.0
   */
static void edsf_persona_change_system_groups_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeSystemGroupsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_change_system_groups_co (_data_);
}


static gboolean edsf_persona_change_system_groups_co (EdsfPersonaChangeSystemGroupsData* _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_ = _data_->system_groups;
	_data_->_state_ = 1;
	_edsf_persona_store_set_system_groups (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_system_groups_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_system_groups_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_change_in_google_personal_group_data_free (gpointer _data) {
	EdsfPersonaChangeInGooglePersonalGroupData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeInGooglePersonalGroupData, _data_);
}


void edsf_persona_change_in_google_personal_group (EdsfPersona* self, gboolean in_personal, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersonaChangeInGooglePersonalGroupData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	_data_ = g_slice_new0 (EdsfPersonaChangeInGooglePersonalGroupData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_change_in_google_personal_group);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_change_in_google_personal_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = in_personal;
	_data_->in_personal = _tmp1_;
	edsf_persona_change_in_google_personal_group_co (_data_);
}


void edsf_persona_change_in_google_personal_group_finish (EdsfPersona* self, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeInGooglePersonalGroupData* _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_));
}


/**
   * Change whether this contact belongs to the personal group or not.
   *
   * The personal contact group is a concept that exists only in Google
   * address books. Other backends will throw a PropertyError.
   *
   * It's preferred to call this rather than setting {@link Persona.in_google_personal_group}
   * directly, as this method gives error notification and will only return once
   * the membership has been written to the relevant backing store (or the
   * operation's failed).
   *
   * @param in_personal Whether to add or remove the personal group membership
   * @throws PropertyError if the address book is not Google, or if setting the property failed
   * @since 0.9.0
   */
static void edsf_persona_change_in_google_personal_group_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeInGooglePersonalGroupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_change_in_google_personal_group_co (_data_);
}


static gboolean edsf_persona_change_in_google_personal_group_co (EdsfPersonaChangeInGooglePersonalGroupData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = _data_->in_personal;
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = _data_->self->priv->_in_google_personal_group;
	if (_data_->_tmp0_ == _data_->_tmp1_) {
		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_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->self->priv->_system_groups;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = folks_small_set_copy ((GeeIterable*) _data_->_tmp2_, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->new_system_groups = _data_->_tmp3_;
	_data_->_tmp4_ = FALSE;
	_data_->_tmp4_ = _data_->in_personal;
	if (_data_->_tmp4_) {
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->new_system_groups;
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp5_, EDSF_PERSONA_GOOGLE_PERSONAL_GROUP_NAME);
	} else {
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->new_system_groups;
		gee_abstract_collection_remove ((GeeAbstractCollection*) _data_->_tmp6_, EDSF_PERSONA_GOOGLE_PERSONAL_GROUP_NAME);
	}
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->new_system_groups;
	_data_->_state_ = 1;
	_edsf_persona_store_set_system_groups (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp8_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, (GeeSet*) _data_->_tmp9_, edsf_persona_change_in_google_personal_group_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_system_groups_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp8_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_object_unref0 (_data_->new_system_groups);
			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_object_unref0 (_data_->new_system_groups);
			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_object_unref0 (_data_->new_system_groups);
	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 edsf_persona_real_change_birthday_data_free (gpointer _data) {
	EdsfPersonaChangeBirthdayData* _data_;
	_data_ = _data;
	_g_date_time_unref0 (_data_->bday);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeBirthdayData, _data_);
}


static gpointer _g_date_time_ref0 (gpointer self) {
	return self ? g_date_time_ref (self) : NULL;
}


static void edsf_persona_real_change_birthday (FolksBirthdayDetails* base, GDateTime* bday, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeBirthdayData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GDateTime* _tmp1_ = NULL;
	GDateTime* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeBirthdayData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_birthday);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_birthday_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = bday;
	_tmp2_ = _g_date_time_ref0 (_tmp1_);
	_g_date_time_unref0 (_data_->bday);
	_data_->bday = _tmp2_;
	edsf_persona_real_change_birthday_co (_data_);
}


static void edsf_persona_real_change_birthday_finish (FolksBirthdayDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeBirthdayData* _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 edsf_persona_change_birthday_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeBirthdayData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_birthday_co (_data_);
}


static gboolean edsf_persona_real_change_birthday_co (EdsfPersonaChangeBirthdayData* _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_ = _data_->bday;
	_data_->_state_ = 1;
	_edsf_persona_store_set_birthday (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_birthday_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_birthday_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_roles_data_free (gpointer _data) {
	EdsfPersonaChangeRolesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->roles);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeRolesData, _data_);
}


static void edsf_persona_real_change_roles (FolksRoleDetails* base, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeRolesData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeRolesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_roles);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_roles_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = roles;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->roles);
	_data_->roles = _tmp2_;
	edsf_persona_real_change_roles_co (_data_);
}


static void edsf_persona_real_change_roles_finish (FolksRoleDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeRolesData* _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 edsf_persona_change_roles_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeRolesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_roles_co (_data_);
}


static gboolean edsf_persona_real_change_roles_co (EdsfPersonaChangeRolesData* _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_ = _data_->roles;
	_data_->_state_ = 1;
	_edsf_persona_store_set_roles (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_roles_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_roles_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_is_favourite_data_free (gpointer _data) {
	EdsfPersonaChangeIsFavouriteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeIsFavouriteData, _data_);
}


static void edsf_persona_real_change_is_favourite (FolksFavouriteDetails* base, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeIsFavouriteData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeIsFavouriteData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_is_favourite);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_persona_real_change_is_favourite_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = is_favourite;
	_data_->is_favourite = _tmp1_;
	edsf_persona_real_change_is_favourite_co (_data_);
}


static void edsf_persona_real_change_is_favourite_finish (FolksFavouriteDetails* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeIsFavouriteData* _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.5
   */
static void edsf_persona_change_is_favourite_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeIsFavouriteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_is_favourite_co (_data_);
}


static gboolean edsf_persona_real_change_is_favourite_co (EdsfPersonaChangeIsFavouriteData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = _data_->self->priv->_is_favourite;
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = _data_->is_favourite;
	if (_data_->_tmp0_ == _data_->_tmp1_) {
		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_->_tmp2_ = NULL;
	_data_->_tmp2_ = folks_persona_get_store ((FolksPersona*) _data_->self);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = FALSE;
	_data_->_tmp4_ = _data_->is_favourite;
	_data_->_state_ = 1;
	_edsf_persona_store_set_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp3_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp4_, edsf_persona_change_is_favourite_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_is_favourite_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp3_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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 edsf_persona_real_change_anti_links_data_free (gpointer _data) {
	EdsfPersonaChangeAntiLinksData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->anti_links);
	_g_object_unref0 (_data_->self);
	g_slice_free (EdsfPersonaChangeAntiLinksData, _data_);
}


static void edsf_persona_real_change_anti_links (FolksAntiLinkable* base, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	EdsfPersona * self;
	EdsfPersonaChangeAntiLinksData* _data_;
	EdsfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	self = (EdsfPersona*) base;
	_data_ = g_slice_new0 (EdsfPersonaChangeAntiLinksData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, edsf_persona_real_change_anti_links);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, edsf_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_;
	edsf_persona_real_change_anti_links_co (_data_);
}


static void edsf_persona_real_change_anti_links_finish (FolksAntiLinkable* base, GAsyncResult* _res_, GError** error) {
	EdsfPersonaChangeAntiLinksData* _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 edsf_persona_change_anti_links_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	EdsfPersonaChangeAntiLinksData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	edsf_persona_real_change_anti_links_co (_data_);
}


static gboolean edsf_persona_real_change_anti_links_co (EdsfPersonaChangeAntiLinksData* _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_ = _data_->anti_links;
	_data_->_state_ = 1;
	_edsf_persona_store_set_anti_links (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->self, _data_->_tmp2_, edsf_persona_change_anti_links_ready, _data_);
	return FALSE;
	_state_1:
	_edsf_persona_store_set_anti_links_finish (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore), _data_->_res_, &_data_->_inner_error_);
	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_);
			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_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;
		}
	}
	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;
}


/**
   * Build a IID.
   *
   * @param store_id the {@link PersonaStore.id}
   * @param contact the Contact
   * @return a valid IID
   *
   * @since 0.6.0
   */
gchar* edsf_persona_build_iid_from_contact (const gchar* store_id, EContact* contact) {
	gchar* result = NULL;
	gchar* contact_id = NULL;
	EContact* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	g_return_val_if_fail (store_id != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_tmp0_ = contact;
	_tmp1_ = _edsf_persona_get_property_from_contact (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, "id");
	contact_id = (gchar*) _tmp1_;
	_tmp3_ = contact_id;
	_tmp2_ = _tmp3_;
	if (_tmp2_ == NULL) {
		_tmp2_ = "";
	}
	_tmp4_ = store_id;
	_tmp5_ = edsf_persona_build_iid (_tmp4_, (const gchar*) _tmp2_);
	result = _tmp5_;
	_g_free0 (contact_id);
	return result;
}


/**
   * Build a IID.
   *
   * @param store_id the {@link PersonaStore.id}
   * @param contact_id the id belonging to the Contact
   * @return a valid IID
   *
   * @since 0.6.0
   */
gchar* edsf_persona_build_iid (const gchar* store_id, const gchar* contact_id) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	g_return_val_if_fail (store_id != NULL, NULL);
	g_return_val_if_fail (contact_id != NULL, NULL);
	_tmp0_ = store_id;
	_tmp1_ = contact_id;
	_tmp2_ = g_strdup_printf ("%s:%s", _tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


/**
   * Create a new persona.
   *
   * Create a new persona for the {@link PersonaStore} ``store``, representing
   * the EDS contact given by ``contact``.
   *
   * @param store the store which will contain the persona
   * @param contact the EDS contact being represented by the persona
   *
   * @since 0.6.0
   */
EdsfPersona* edsf_persona_construct (GType object_type, EdsfPersonaStore* store, EContact* contact) {
	EdsfPersona * self = NULL;
	gchar* _contact_id = NULL;
	EContact* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* contact_id = NULL;
	gchar* _tmp4_ = NULL;
	gchar* uid = NULL;
	EdsfPersonaStore* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* iid = NULL;
	EdsfPersonaStore* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gboolean is_user = FALSE;
	EContact* _tmp13_ = NULL;
	gboolean _tmp14_ = FALSE;
	EdsfPersonaStore* _tmp15_ = NULL;
	EContact* _tmp16_ = NULL;
	g_return_val_if_fail (store != NULL, NULL);
	g_return_val_if_fail (contact != NULL, NULL);
	_tmp0_ = contact;
	_tmp1_ = _edsf_persona_get_property_from_contact (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, "id");
	_contact_id = (gchar*) _tmp1_;
	_tmp3_ = _contact_id;
	_tmp2_ = _tmp3_;
	if (_tmp2_ == NULL) {
		_tmp2_ = "";
	}
	_tmp4_ = g_strdup ((const gchar*) _tmp2_);
	contact_id = _tmp4_;
	_tmp5_ = store;
	_tmp6_ = folks_persona_store_get_id ((FolksPersonaStore*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = folks_persona_build_uid (BACKEND_NAME, _tmp7_, contact_id);
	uid = _tmp8_;
	_tmp9_ = store;
	_tmp10_ = folks_persona_store_get_id ((FolksPersonaStore*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = edsf_persona_build_iid (_tmp11_, contact_id);
	iid = _tmp12_;
	_tmp13_ = contact;
	_tmp14_ = e_book_client_is_self (_tmp13_);
	is_user = _tmp14_;
	_tmp15_ = store;
	_tmp16_ = contact;
	self = (EdsfPersona*) g_object_new (object_type, "display-id", iid, "uid", uid, "iid", iid, "store", _tmp15_, "is-user", is_user, "contact-id", contact_id, "contact", _tmp16_, NULL);
	_g_free0 (iid);
	_g_free0 (uid);
	_g_free0 (contact_id);
	_g_free0 (_contact_id);
	return self;
}


EdsfPersona* edsf_persona_new (EdsfPersonaStore* store, EContact* contact) {
	return edsf_persona_construct (EDSF_TYPE_PERSONA, store, contact);
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.0
   */
static void edsf_persona_real_linkable_property_to_links (FolksPersona* base, const gchar* prop_name, FolksPersonaLinkablePropertyCallback callback, void* callback_target) {
	EdsfPersona * self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) 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_, "local-ids") == 0) {
			{
				GeeIterator* _id_it = NULL;
				GeeSet* _tmp19_ = NULL;
				GeeSet* _tmp20_ = NULL;
				GeeIterator* _tmp21_ = NULL;
				_tmp19_ = folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) self);
				_tmp20_ = _tmp19_;
				_tmp21_ = gee_iterable_iterator ((GeeIterable*) _tmp20_);
				_id_it = _tmp21_;
				while (TRUE) {
					GeeIterator* _tmp22_ = NULL;
					gboolean _tmp23_ = FALSE;
					gchar* id = NULL;
					GeeIterator* _tmp24_ = NULL;
					gpointer _tmp25_ = NULL;
					FolksPersonaLinkablePropertyCallback _tmp26_ = NULL;
					void* _tmp26__target = NULL;
					const gchar* _tmp27_ = NULL;
					_tmp22_ = _id_it;
					_tmp23_ = gee_iterator_next (_tmp22_);
					if (!_tmp23_) {
						break;
					}
					_tmp24_ = _id_it;
					_tmp25_ = gee_iterator_get (_tmp24_);
					id = (gchar*) _tmp25_;
					_tmp26_ = callback;
					_tmp26__target = callback_target;
					_tmp27_ = id;
					_tmp26_ (_tmp27_, _tmp26__target);
					_g_free0 (id);
				}
				_g_object_unref0 (_id_it);
			}
		} else {
			const gchar* _tmp28_ = NULL;
			_tmp28_ = prop_name;
			if (g_strcmp0 (_tmp28_, "web-service-addresses") == 0) {
				GeeMapIterator* iter = NULL;
				GeeMultiMap* _tmp29_ = NULL;
				GeeMultiMap* _tmp30_ = NULL;
				GeeMapIterator* _tmp31_ = NULL;
				_tmp29_ = folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self);
				_tmp30_ = _tmp29_;
				_tmp31_ = gee_multi_map_map_iterator (_tmp30_);
				iter = _tmp31_;
				while (TRUE) {
					GeeMapIterator* _tmp32_ = NULL;
					gboolean _tmp33_ = FALSE;
					FolksPersonaLinkablePropertyCallback _tmp34_ = NULL;
					void* _tmp34__target = NULL;
					GeeMapIterator* _tmp35_ = NULL;
					gpointer _tmp36_ = NULL;
					gchar* _tmp37_ = NULL;
					gchar* _tmp38_ = NULL;
					gchar* _tmp39_ = NULL;
					GeeMapIterator* _tmp40_ = NULL;
					gpointer _tmp41_ = NULL;
					FolksWebServiceFieldDetails* _tmp42_ = NULL;
					gconstpointer _tmp43_ = NULL;
					const gchar* _tmp44_ = NULL;
					gchar* _tmp45_ = NULL;
					gchar* _tmp46_ = NULL;
					_tmp32_ = iter;
					_tmp33_ = gee_map_iterator_next (_tmp32_);
					if (!_tmp33_) {
						break;
					}
					_tmp34_ = callback;
					_tmp34__target = callback_target;
					_tmp35_ = iter;
					_tmp36_ = gee_map_iterator_get_key (_tmp35_);
					_tmp37_ = (gchar*) _tmp36_;
					_tmp38_ = g_strconcat (_tmp37_, ":", NULL);
					_tmp39_ = _tmp38_;
					_tmp40_ = iter;
					_tmp41_ = gee_map_iterator_get_value (_tmp40_);
					_tmp42_ = (FolksWebServiceFieldDetails*) _tmp41_;
					_tmp43_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp42_);
					_tmp44_ = _tmp43_;
					_tmp45_ = g_strconcat (_tmp39_, (const gchar*) _tmp44_, NULL);
					_tmp46_ = _tmp45_;
					_tmp34_ (_tmp46_, _tmp34__target);
					_g_free0 (_tmp46_);
					_g_object_unref0 (_tmp42_);
					_g_free0 (_tmp39_);
					_g_free0 (_tmp37_);
				}
				_g_object_unref0 (iter);
			} else {
				const gchar* _tmp47_ = NULL;
				_tmp47_ = prop_name;
				if (g_strcmp0 (_tmp47_, "email-addresses") == 0) {
					{
						FolksSmallSet* _email_list = NULL;
						FolksSmallSet* _tmp48_ = NULL;
						FolksSmallSet* _tmp49_ = NULL;
						gint _email_size = 0;
						FolksSmallSet* _tmp50_ = NULL;
						gint _tmp51_ = 0;
						gint _tmp52_ = 0;
						gint _email_index = 0;
						_tmp48_ = self->priv->_email_addresses;
						_tmp49_ = _g_object_ref0 (_tmp48_);
						_email_list = _tmp49_;
						_tmp50_ = _email_list;
						_tmp51_ = gee_collection_get_size ((GeeCollection*) _tmp50_);
						_tmp52_ = _tmp51_;
						_email_size = _tmp52_;
						_email_index = -1;
						while (TRUE) {
							gint _tmp53_ = 0;
							gint _tmp54_ = 0;
							gint _tmp55_ = 0;
							FolksEmailFieldDetails* email = NULL;
							FolksSmallSet* _tmp56_ = NULL;
							gint _tmp57_ = 0;
							gconstpointer _tmp58_ = NULL;
							FolksEmailFieldDetails* _tmp59_ = NULL;
							FolksPersonaLinkablePropertyCallback _tmp60_ = NULL;
							void* _tmp60__target = NULL;
							FolksEmailFieldDetails* _tmp61_ = NULL;
							gconstpointer _tmp62_ = NULL;
							const gchar* _tmp63_ = NULL;
							_tmp53_ = _email_index;
							_email_index = _tmp53_ + 1;
							_tmp54_ = _email_index;
							_tmp55_ = _email_size;
							if (!(_tmp54_ < _tmp55_)) {
								break;
							}
							_tmp56_ = _email_list;
							_tmp57_ = _email_index;
							_tmp58_ = folks_small_set_get (_tmp56_, _tmp57_);
							_tmp59_ = _g_object_ref0 ((FolksEmailFieldDetails*) _tmp58_);
							email = _tmp59_;
							_tmp60_ = callback;
							_tmp60__target = callback_target;
							_tmp61_ = email;
							_tmp62_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp61_);
							_tmp63_ = _tmp62_;
							_tmp60_ ((const gchar*) _tmp63_, _tmp60__target);
							_g_object_unref0 (email);
						}
						_g_object_unref0 (_email_list);
					}
				} else {
					const gchar* _tmp64_ = NULL;
					FolksPersonaLinkablePropertyCallback _tmp65_ = NULL;
					void* _tmp65__target = NULL;
					_tmp64_ = prop_name;
					_tmp65_ = callback;
					_tmp65__target = callback_target;
					FOLKS_PERSONA_CLASS (edsf_persona_parent_class)->linkable_property_to_links (G_TYPE_CHECK_INSTANCE_CAST (self, FOLKS_TYPE_PERSONA, FolksPersona), _tmp64_, _tmp65_, _tmp65__target);
				}
			}
		}
	}
}


/**
   * Update attribs of the persona.
   */
void _edsf_persona_update (EdsfPersona* self, EContact* updated_contact) {
	EContact* _tmp0_ = NULL;
	EContact* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (updated_contact != NULL);
	g_object_freeze_notify ((GObject*) self);
	_tmp0_ = updated_contact;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_contact);
	self->priv->_contact = _tmp1_;
	g_object_notify ((GObject*) self, "contact");
	_edsf_persona_update_names (self);
	_edsf_persona_update_avatar (self);
	_edsf_persona_update_urls (self, FALSE, TRUE);
	_edsf_persona_update_phones (self, FALSE, TRUE);
	_edsf_persona_update_addresses (self, FALSE, TRUE);
	_edsf_persona_update_emails (self, TRUE);
	_edsf_persona_update_im_addresses (self);
	_edsf_persona_update_groups (self, FALSE, TRUE);
	_edsf_persona_update_notes (self, FALSE, TRUE);
	_edsf_persona_update_local_ids (self);
	_edsf_persona_update_location (self);
	_edsf_persona_update_web_services_addresses (self);
	_edsf_persona_update_gender (self);
	_edsf_persona_update_birthday (self);
	_edsf_persona_update_roles (self, FALSE, TRUE);
	_edsf_persona_update_favourite (self);
	_edsf_persona_update_anti_links (self);
	g_object_thaw_notify ((GObject*) self);
}


static void _edsf_persona_update_params (EdsfPersona* self, FolksAbstractFieldDetails* details, EVCardAttribute* attr) {
	EVCardAttribute* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (details != NULL);
	g_return_if_fail (attr != NULL);
	_tmp0_ = attr;
	_tmp1_ = e_vcard_attribute_get_params (_tmp0_);
	{
		GList* param_collection = NULL;
		GList* param_it = NULL;
		param_collection = _tmp1_;
		for (param_it = param_collection; param_it != NULL; param_it = param_it->next) {
			EVCardAttributeParam* param = NULL;
			param = (EVCardAttributeParam*) param_it->data;
			{
				gchar* param_name = NULL;
				EVCardAttributeParam* _tmp2_ = NULL;
				const gchar* _tmp3_ = NULL;
				gchar* _tmp4_ = NULL;
				EVCardAttributeParam* _tmp5_ = NULL;
				GList* _tmp6_ = NULL;
				_tmp2_ = param;
				_tmp3_ = e_vcard_attribute_param_get_name (_tmp2_);
				_tmp4_ = g_utf8_strdown (_tmp3_, (gssize) -1);
				param_name = _tmp4_;
				_tmp5_ = param;
				_tmp6_ = e_vcard_attribute_param_get_values (_tmp5_);
				{
					GList* param_value_collection = NULL;
					GList* param_value_it = NULL;
					param_value_collection = _tmp6_;
					for (param_value_it = param_value_collection; param_value_it != NULL; param_value_it = param_value_it->next) {
						const gchar* param_value = NULL;
						param_value = (const gchar*) param_value_it->data;
						{
							const gchar* _tmp7_ = NULL;
							_tmp7_ = param_name;
							if (g_strcmp0 (_tmp7_, FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE) == 0) {
								FolksAbstractFieldDetails* _tmp8_ = NULL;
								const gchar* _tmp9_ = NULL;
								const gchar* _tmp10_ = NULL;
								gchar* _tmp11_ = NULL;
								gchar* _tmp12_ = NULL;
								_tmp8_ = details;
								_tmp9_ = param_name;
								_tmp10_ = param_value;
								_tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1);
								_tmp12_ = _tmp11_;
								folks_abstract_field_details_add_parameter (_tmp8_, _tmp9_, _tmp12_);
								_g_free0 (_tmp12_);
							} else {
								FolksAbstractFieldDetails* _tmp13_ = NULL;
								const gchar* _tmp14_ = NULL;
								const gchar* _tmp15_ = NULL;
								_tmp13_ = details;
								_tmp14_ = param_name;
								_tmp15_ = param_value;
								folks_abstract_field_details_add_parameter (_tmp13_, _tmp14_, _tmp15_);
							}
						}
					}
				}
				_g_free0 (param_name);
			}
		}
	}
}


static EVCardAttribute* _vala_EVCardAttribute_copy (EVCardAttribute* self) {
	return g_boxed_copy (e_vcard_attribute_get_type (), self);
}


static gpointer __vala_EVCardAttribute_copy0 (gpointer self) {
	return self ? _vala_EVCardAttribute_copy (self) : NULL;
}


static void _vala_EVCardAttribute_free (EVCardAttribute* self) {
	g_boxed_free (e_vcard_attribute_get_type (), self);
}


static void _edsf_persona_update_gender (EdsfPersona* self) {
	FolksGender gender = 0;
	EVCardAttribute* gender_attr = NULL;
	EContact* _tmp0_ = NULL;
	EContact* _tmp1_ = NULL;
	EVCardAttribute* _tmp2_ = NULL;
	EVCardAttribute* _tmp3_ = NULL;
	EVCardAttribute* _tmp4_ = NULL;
	FolksGender _tmp13_ = 0;
	FolksGender _tmp14_ = 0;
	g_return_if_fail (self != NULL);
	gender = FOLKS_GENDER_UNSPECIFIED;
	_tmp0_ = edsf_persona_get_contact (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = e_vcard_get_attribute ((EVCard*) _tmp1_, EDSF_PERSONA_gender_attribute_name);
	_tmp3_ = __vala_EVCardAttribute_copy0 (_tmp2_);
	gender_attr = _tmp3_;
	_tmp4_ = gender_attr;
	if (_tmp4_ != NULL) {
		gchar* val = NULL;
		EVCardAttribute* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		_tmp5_ = gender_attr;
		_tmp6_ = e_vcard_attribute_get_value ((EVCardAttribute*) _tmp5_);
		val = _tmp6_;
		_tmp7_ = val;
		if (_tmp7_ != NULL) {
			const gchar* _tmp8_ = NULL;
			gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			GQuark _tmp12_ = 0U;
			_tmp8_ = val;
			_tmp9_ = g_utf8_strup ((const gchar*) _tmp8_, (gssize) -1);
			_tmp10_ = _tmp9_;
			_tmp12_ = (NULL == _tmp10_) ? 0 : g_quark_from_string (_tmp10_);
			g_free (_tmp10_);
			if (_tmp12_ == g_quark_from_string (EDSF_PERSONA_gender_male)) {
				switch (0) {
					default:
					{
						gender = FOLKS_GENDER_MALE;
						break;
					}
				}
			} else if (_tmp12_ == g_quark_from_string (EDSF_PERSONA_gender_female)) {
				switch (0) {
					default:
					{
						gender = FOLKS_GENDER_FEMALE;
						break;
					}
				}
			} else {
				switch (0) {
					default:
					{
						break;
					}
				}
			}
		}
		_g_free0 (val);
	}
	_tmp13_ = self->priv->_gender;
	_tmp14_ = gender;
	if (_tmp13_ != _tmp14_) {
		FolksGender _tmp15_ = 0;
		_tmp15_ = gender;
		self->priv->_gender = _tmp15_;
		g_object_notify ((GObject*) self, "gender");
	}
	__vala_EVCardAttribute_free0 (gender_attr);
}


static EContactDate* _vala_EContactDate_copy (EContactDate* self) {
	return g_boxed_copy (e_contact_date_get_type (), self);
}


static void _vala_EContactDate_free (EContactDate* self) {
	g_boxed_free (e_contact_date_get_type (), self);
}


static gpointer __vala_EContactDate_copy0 (gpointer self) {
	return self ? _vala_EContactDate_copy (self) : NULL;
}


static void _edsf_persona_update_birthday (EdsfPersona* self) {
	EContactDate* _bday = NULL;
	gpointer _tmp0_ = NULL;
	EContactDate* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _edsf_persona_get_property (self, e_contact_date_get_type (), (GBoxedCopyFunc) _vala_EContactDate_copy, _vala_EContactDate_free, "birth_date");
	_bday = (EContactDate*) _tmp0_;
	_tmp1_ = _bday;
	if (_tmp1_ != NULL) {
		EContactDate* bday = NULL;
		EContactDate* _tmp2_ = NULL;
		EContactDate* _tmp3_ = NULL;
		GDateTime* d = NULL;
		GTimeZone* _tmp4_ = NULL;
		EContactDate* _tmp5_ = NULL;
		guint _tmp6_ = 0U;
		EContactDate* _tmp7_ = NULL;
		guint _tmp8_ = 0U;
		EContactDate* _tmp9_ = NULL;
		guint _tmp10_ = 0U;
		GDateTime* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		GDateTime* _tmp13_ = NULL;
		_tmp2_ = _bday;
		_tmp3_ = __vala_EContactDate_copy0 ((EContactDate*) _tmp2_);
		bday = _tmp3_;
		_tmp4_ = edsf_persona__local_time_zone;
		_tmp5_ = bday;
		_tmp6_ = _tmp5_->year;
		_tmp7_ = bday;
		_tmp8_ = _tmp7_->month;
		_tmp9_ = bday;
		_tmp10_ = _tmp9_->day;
		_tmp11_ = g_date_time_new (_tmp4_, (gint) _tmp6_, (gint) _tmp8_, (gint) _tmp10_, 0, 0, 0.0);
		d = _tmp11_;
		_tmp13_ = d;
		if (_tmp13_ != NULL) {
			gboolean _tmp14_ = FALSE;
			GDateTime* _tmp15_ = NULL;
			_tmp15_ = self->priv->_birthday;
			if (_tmp15_ == NULL) {
				_tmp14_ = TRUE;
			} else {
				gboolean _tmp16_ = FALSE;
				GDateTime* _tmp17_ = NULL;
				_tmp17_ = self->priv->_birthday;
				if (_tmp17_ != NULL) {
					GDateTime* _tmp18_ = NULL;
					GDateTime* _tmp19_ = NULL;
					GDateTime* _tmp20_ = NULL;
					GDateTime* _tmp21_ = NULL;
					gboolean _tmp22_ = FALSE;
					_tmp18_ = self->priv->_birthday;
					_tmp19_ = d;
					_tmp20_ = g_date_time_to_utc (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = g_date_time_equal ((GDateTime*) _tmp18_, _tmp21_);
					_tmp16_ = !_tmp22_;
					_g_date_time_unref0 (_tmp21_);
				} else {
					_tmp16_ = FALSE;
				}
				_tmp14_ = _tmp16_;
			}
			_tmp12_ = _tmp14_;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			GDateTime* _tmp23_ = NULL;
			GDateTime* _tmp24_ = NULL;
			_tmp23_ = d;
			_tmp24_ = g_date_time_to_utc (_tmp23_);
			_g_date_time_unref0 (self->priv->_birthday);
			self->priv->_birthday = _tmp24_;
			g_object_notify ((GObject*) self, "birthday");
		}
		_g_date_time_unref0 (d);
		__vala_EContactDate_free0 (bday);
	} else {
		GDateTime* _tmp25_ = NULL;
		_tmp25_ = self->priv->_birthday;
		if (_tmp25_ != NULL) {
			_g_date_time_unref0 (self->priv->_birthday);
			self->priv->_birthday = NULL;
			g_object_notify ((GObject*) self, "birthday");
		}
	}
	__vala_EContactDate_free0 (_bday);
}


static void _edsf_persona_update_roles (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	FolksSmallSet* new_roles = NULL;
	FolksSmallSet* _tmp9_ = NULL;
	FolksRoleFieldDetails* default_role_fd = NULL;
	FolksRoleFieldDetails* _tmp10_ = NULL;
	FolksRoleFieldDetails* _tmp11_ = NULL;
	EVCard* vcard = NULL;
	EContact* _tmp14_ = NULL;
	EContact* _tmp15_ = NULL;
	EVCard* _tmp16_ = NULL;
	EVCard* _tmp17_ = NULL;
	GList* _tmp18_ = NULL;
	FolksSmallSet* _tmp53_ = NULL;
	FolksSmallSet* _tmp54_ = NULL;
	gboolean _tmp55_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_roles;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = emit_notification;
		if (_tmp3_) {
			g_object_notify ((GObject*) self, "roles");
		}
		return;
	} else {
		FolksSmallSet* _tmp4_ = NULL;
		_tmp4_ = self->priv->_roles;
		if (_tmp4_ == NULL) {
			FolksSmallSet* _tmp5_ = NULL;
			FolksSmallSet* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			GeeSet* _tmp8_ = NULL;
			_tmp5_ = folks_small_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_roles);
			self->priv->_roles = _tmp5_;
			_tmp6_ = self->priv->_roles;
			_tmp7_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp6_);
			_tmp8_ = _tmp7_;
			_g_object_unref0 (self->priv->_roles_ro);
			self->priv->_roles_ro = _tmp8_;
		}
	}
	_tmp9_ = folks_small_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_roles = _tmp9_;
	_tmp10_ = _edsf_persona_get_default_role (self);
	default_role_fd = _tmp10_;
	_tmp11_ = default_role_fd;
	if (_tmp11_ != NULL) {
		FolksSmallSet* _tmp12_ = NULL;
		FolksRoleFieldDetails* _tmp13_ = NULL;
		_tmp12_ = new_roles;
		_tmp13_ = default_role_fd;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, FOLKS_TYPE_ROLE_FIELD_DETAILS, FolksRoleFieldDetails));
	}
	_tmp14_ = edsf_persona_get_contact (self);
	_tmp15_ = _tmp14_;
	_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, e_vcard_get_type (), EVCard));
	vcard = _tmp16_;
	_tmp17_ = vcard;
	_tmp18_ = e_vcard_get_attributes (_tmp17_);
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp18_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* attr = NULL;
			attr = (EVCardAttribute*) attr_it->data;
			{
				EVCardAttribute* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				gchar* val = NULL;
				EVCardAttribute* _tmp21_ = NULL;
				gchar* _tmp22_ = NULL;
				gboolean _tmp23_ = FALSE;
				const gchar* _tmp24_ = NULL;
				FolksRole* role = NULL;
				FolksRole* _tmp26_ = NULL;
				FolksRole* _tmp27_ = NULL;
				const gchar* _tmp28_ = NULL;
				FolksRoleFieldDetails* role_fd = NULL;
				FolksRole* _tmp29_ = NULL;
				FolksRoleFieldDetails* _tmp30_ = NULL;
				EVCardAttribute* _tmp31_ = NULL;
				GList* _tmp32_ = NULL;
				FolksSmallSet* _tmp51_ = NULL;
				FolksRoleFieldDetails* _tmp52_ = NULL;
				_tmp19_ = attr;
				_tmp20_ = e_vcard_attribute_get_name (_tmp19_);
				if (g_strcmp0 (_tmp20_, "X-ROLES") != 0) {
					continue;
				}
				_tmp21_ = attr;
				_tmp22_ = e_vcard_attribute_get_value (_tmp21_);
				val = _tmp22_;
				_tmp24_ = val;
				if (_tmp24_ == NULL) {
					_tmp23_ = TRUE;
				} else {
					const gchar* _tmp25_ = NULL;
					_tmp25_ = val;
					_tmp23_ = g_strcmp0 ((const gchar*) _tmp25_, "") == 0;
				}
				if (_tmp23_) {
					_g_free0 (val);
					continue;
				}
				_tmp26_ = folks_role_new ("", "", NULL);
				role = _tmp26_;
				_tmp27_ = role;
				_tmp28_ = val;
				folks_role_set_role (_tmp27_, (const gchar*) _tmp28_);
				_tmp29_ = role;
				_tmp30_ = folks_role_field_details_new (_tmp29_, NULL);
				role_fd = _tmp30_;
				_tmp31_ = attr;
				_tmp32_ = e_vcard_attribute_get_params (_tmp31_);
				{
					GList* param_collection = NULL;
					GList* param_it = NULL;
					param_collection = _tmp32_;
					for (param_it = param_collection; param_it != NULL; param_it = param_it->next) {
						EVCardAttributeParam* param = NULL;
						param = (EVCardAttributeParam*) param_it->data;
						{
							gchar* param_name = NULL;
							EVCardAttributeParam* _tmp33_ = NULL;
							const gchar* _tmp34_ = NULL;
							gchar* _tmp35_ = NULL;
							const gchar* _tmp36_ = NULL;
							_tmp33_ = param;
							_tmp34_ = e_vcard_attribute_param_get_name (_tmp33_);
							_tmp35_ = g_utf8_strdown (_tmp34_, (gssize) -1);
							param_name = _tmp35_;
							_tmp36_ = param_name;
							if (g_strcmp0 (_tmp36_, "organisation_name") == 0) {
								EVCardAttributeParam* _tmp37_ = NULL;
								GList* _tmp38_ = NULL;
								_tmp37_ = param;
								_tmp38_ = e_vcard_attribute_param_get_values (_tmp37_);
								{
									GList* param_value_collection = NULL;
									GList* param_value_it = NULL;
									param_value_collection = _tmp38_;
									for (param_value_it = param_value_collection; param_value_it != NULL; param_value_it = param_value_it->next) {
										const gchar* param_value = NULL;
										param_value = (const gchar*) param_value_it->data;
										{
											FolksRole* _tmp39_ = NULL;
											const gchar* _tmp40_ = NULL;
											_tmp39_ = role;
											_tmp40_ = param_value;
											folks_role_set_organisation_name (_tmp39_, _tmp40_);
											break;
										}
									}
								}
							} else {
								const gchar* _tmp41_ = NULL;
								_tmp41_ = param_name;
								if (g_strcmp0 (_tmp41_, "title") == 0) {
									EVCardAttributeParam* _tmp42_ = NULL;
									GList* _tmp43_ = NULL;
									_tmp42_ = param;
									_tmp43_ = e_vcard_attribute_param_get_values (_tmp42_);
									{
										GList* param_value_collection = NULL;
										GList* param_value_it = NULL;
										param_value_collection = _tmp43_;
										for (param_value_it = param_value_collection; param_value_it != NULL; param_value_it = param_value_it->next) {
											const gchar* param_value = NULL;
											param_value = (const gchar*) param_value_it->data;
											{
												FolksRole* _tmp44_ = NULL;
												const gchar* _tmp45_ = NULL;
												_tmp44_ = role;
												_tmp45_ = param_value;
												folks_role_set_title (_tmp44_, _tmp45_);
												break;
											}
										}
									}
								} else {
									EVCardAttributeParam* _tmp46_ = NULL;
									GList* _tmp47_ = NULL;
									_tmp46_ = param;
									_tmp47_ = e_vcard_attribute_param_get_values (_tmp46_);
									{
										GList* param_value_collection = NULL;
										GList* param_value_it = NULL;
										param_value_collection = _tmp47_;
										for (param_value_it = param_value_collection; param_value_it != NULL; param_value_it = param_value_it->next) {
											const gchar* param_value = NULL;
											param_value = (const gchar*) param_value_it->data;
											{
												FolksRoleFieldDetails* _tmp48_ = NULL;
												const gchar* _tmp49_ = NULL;
												const gchar* _tmp50_ = NULL;
												_tmp48_ = role_fd;
												_tmp49_ = param_name;
												_tmp50_ = param_value;
												folks_abstract_field_details_add_parameter ((FolksAbstractFieldDetails*) _tmp48_, _tmp49_, _tmp50_);
											}
										}
									}
								}
							}
							_g_free0 (param_name);
						}
					}
				}
				_tmp51_ = new_roles;
				_tmp52_ = role_fd;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp51_, _tmp52_);
				_g_object_unref0 (role_fd);
				_g_object_unref0 (role);
				_g_free0 (val);
			}
		}
	}
	_tmp53_ = new_roles;
	_tmp54_ = self->priv->_roles;
	_tmp55_ = folks_internal_equal_sets (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeSet*) _tmp53_, (GeeSet*) _tmp54_);
	if (!_tmp55_) {
		FolksSmallSet* _tmp56_ = NULL;
		FolksSmallSet* _tmp57_ = NULL;
		FolksSmallSet* _tmp58_ = NULL;
		GeeSet* _tmp59_ = NULL;
		GeeSet* _tmp60_ = NULL;
		gboolean _tmp61_ = FALSE;
		_tmp56_ = new_roles;
		_tmp57_ = _g_object_ref0 (_tmp56_);
		_g_object_unref0 (self->priv->_roles);
		self->priv->_roles = _tmp57_;
		_tmp58_ = new_roles;
		_tmp59_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp58_);
		_tmp60_ = _tmp59_;
		_g_object_unref0 (self->priv->_roles_ro);
		self->priv->_roles_ro = _tmp60_;
		_tmp61_ = emit_notification;
		if (_tmp61_) {
			g_object_notify ((GObject*) self, "roles");
		}
	}
	_g_object_unref0 (vcard);
	_g_object_unref0 (default_role_fd);
	_g_object_unref0 (new_roles);
}


static FolksRoleFieldDetails* _edsf_persona_get_default_role (EdsfPersona* self) {
	FolksRoleFieldDetails* result = NULL;
	FolksRoleFieldDetails* _default_role = NULL;
	gchar* org = NULL;
	gpointer _tmp0_ = NULL;
	gchar* org_unit = NULL;
	gpointer _tmp1_ = NULL;
	gchar* office = NULL;
	gpointer _tmp2_ = NULL;
	gchar* title = NULL;
	gpointer _tmp3_ = NULL;
	gchar* role = NULL;
	gpointer _tmp4_ = NULL;
	gchar* manager = NULL;
	gpointer _tmp5_ = NULL;
	gchar* assistant = NULL;
	gpointer _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	const gchar* _tmp13_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_default_role = NULL;
	_tmp0_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "org");
	org = (gchar*) _tmp0_;
	_tmp1_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "org_unit");
	org_unit = (gchar*) _tmp1_;
	_tmp2_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "office");
	office = (gchar*) _tmp2_;
	_tmp3_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "title");
	title = (gchar*) _tmp3_;
	_tmp4_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "role");
	role = (gchar*) _tmp4_;
	_tmp5_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "manager");
	manager = (gchar*) _tmp5_;
	_tmp6_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "assistant");
	assistant = (gchar*) _tmp6_;
	_tmp13_ = org;
	if (_tmp13_ != NULL) {
		_tmp12_ = TRUE;
	} else {
		const gchar* _tmp14_ = NULL;
		_tmp14_ = org_unit;
		_tmp12_ = _tmp14_ != NULL;
	}
	if (_tmp12_) {
		_tmp11_ = TRUE;
	} else {
		const gchar* _tmp15_ = NULL;
		_tmp15_ = office;
		_tmp11_ = _tmp15_ != NULL;
	}
	if (_tmp11_) {
		_tmp10_ = TRUE;
	} else {
		const gchar* _tmp16_ = NULL;
		_tmp16_ = title;
		_tmp10_ = _tmp16_ != NULL;
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp17_ = NULL;
		_tmp17_ = role;
		_tmp9_ = _tmp17_ != NULL;
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp18_ = NULL;
		_tmp18_ = manager;
		_tmp8_ = _tmp18_ != NULL;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp19_ = NULL;
		_tmp19_ = assistant;
		_tmp7_ = _tmp19_ != NULL;
	}
	if (_tmp7_) {
		FolksRole* new_role = NULL;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		FolksRole* _tmp22_ = NULL;
		gboolean _tmp23_ = FALSE;
		const gchar* _tmp24_ = NULL;
		FolksRole* _tmp28_ = NULL;
		gboolean _tmp29_ = FALSE;
		_tmp20_ = title;
		_tmp21_ = org;
		_tmp22_ = folks_role_new (_tmp20_, _tmp21_, NULL);
		new_role = _tmp22_;
		_tmp24_ = role;
		if (_tmp24_ != NULL) {
			const gchar* _tmp25_ = NULL;
			_tmp25_ = role;
			_tmp23_ = g_strcmp0 ((const gchar*) _tmp25_, "") != 0;
		} else {
			_tmp23_ = FALSE;
		}
		if (_tmp23_) {
			FolksRole* _tmp26_ = NULL;
			const gchar* _tmp27_ = NULL;
			_tmp26_ = new_role;
			_tmp27_ = role;
			folks_role_set_role (_tmp26_, (const gchar*) _tmp27_);
		}
		_tmp28_ = new_role;
		_tmp29_ = folks_role_is_empty (_tmp28_);
		if (!_tmp29_) {
			FolksRoleFieldDetails* default_role = NULL;
			FolksRole* _tmp30_ = NULL;
			FolksRoleFieldDetails* _tmp31_ = NULL;
			gboolean _tmp32_ = FALSE;
			const gchar* _tmp33_ = NULL;
			gboolean _tmp37_ = FALSE;
			const gchar* _tmp38_ = NULL;
			gboolean _tmp42_ = FALSE;
			const gchar* _tmp43_ = NULL;
			gboolean _tmp47_ = FALSE;
			const gchar* _tmp48_ = NULL;
			FolksRoleFieldDetails* _tmp52_ = NULL;
			FolksRoleFieldDetails* _tmp53_ = NULL;
			_tmp30_ = new_role;
			_tmp31_ = folks_role_field_details_new (_tmp30_, NULL);
			default_role = _tmp31_;
			_tmp33_ = org_unit;
			if (_tmp33_ != NULL) {
				const gchar* _tmp34_ = NULL;
				_tmp34_ = org_unit;
				_tmp32_ = g_strcmp0 (_tmp34_, "") != 0;
			} else {
				_tmp32_ = FALSE;
			}
			if (_tmp32_) {
				FolksRoleFieldDetails* _tmp35_ = NULL;
				const gchar* _tmp36_ = NULL;
				_tmp35_ = default_role;
				_tmp36_ = org_unit;
				folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp35_, "org_unit", (const gchar*) _tmp36_);
			}
			_tmp38_ = office;
			if (_tmp38_ != NULL) {
				const gchar* _tmp39_ = NULL;
				_tmp39_ = office;
				_tmp37_ = g_strcmp0 (_tmp39_, "") != 0;
			} else {
				_tmp37_ = FALSE;
			}
			if (_tmp37_) {
				FolksRoleFieldDetails* _tmp40_ = NULL;
				const gchar* _tmp41_ = NULL;
				_tmp40_ = default_role;
				_tmp41_ = office;
				folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp40_, "office", (const gchar*) _tmp41_);
			}
			_tmp43_ = manager;
			if (_tmp43_ != NULL) {
				const gchar* _tmp44_ = NULL;
				_tmp44_ = manager;
				_tmp42_ = g_strcmp0 (_tmp44_, "") != 0;
			} else {
				_tmp42_ = FALSE;
			}
			if (_tmp42_) {
				FolksRoleFieldDetails* _tmp45_ = NULL;
				const gchar* _tmp46_ = NULL;
				_tmp45_ = default_role;
				_tmp46_ = manager;
				folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp45_, "manager", (const gchar*) _tmp46_);
			}
			_tmp48_ = assistant;
			if (_tmp48_ != NULL) {
				const gchar* _tmp49_ = NULL;
				_tmp49_ = manager;
				_tmp47_ = g_strcmp0 (_tmp49_, "") != 0;
			} else {
				_tmp47_ = FALSE;
			}
			if (_tmp47_) {
				FolksRoleFieldDetails* _tmp50_ = NULL;
				const gchar* _tmp51_ = NULL;
				_tmp50_ = default_role;
				_tmp51_ = assistant;
				folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp50_, "assistant", (const gchar*) _tmp51_);
			}
			_tmp52_ = default_role;
			_tmp53_ = _g_object_ref0 (_tmp52_);
			_g_object_unref0 (_default_role);
			_default_role = _tmp53_;
			_g_object_unref0 (default_role);
		}
		_g_object_unref0 (new_role);
	}
	result = _default_role;
	_g_free0 (assistant);
	_g_free0 (manager);
	_g_free0 (role);
	_g_free0 (title);
	_g_free0 (office);
	_g_free0 (org_unit);
	_g_free0 (org);
	return result;
}


static EVCardAttributeParam* _vala_EVCardAttributeParam_copy (EVCardAttributeParam* self) {
	return g_boxed_copy (e_vcard_attribute_param_get_type (), self);
}


static gpointer __vala_EVCardAttributeParam_copy0 (gpointer self) {
	return self ? _vala_EVCardAttributeParam_copy (self) : NULL;
}


static void _vala_EVCardAttributeParam_free (EVCardAttributeParam* self) {
	g_boxed_free (e_vcard_attribute_param_get_type (), self);
}


static void _edsf_persona_update_web_services_addresses (EdsfPersona* self) {
	GeeHashMultiMap* new_services = NULL;
	GeeHashMultiMap* _tmp0_ = NULL;
	EVCardAttribute* services = NULL;
	EContact* _tmp1_ = NULL;
	EContact* _tmp2_ = NULL;
	EVCardAttribute* _tmp3_ = NULL;
	EVCardAttribute* _tmp4_ = NULL;
	EVCardAttribute* _tmp5_ = NULL;
	GeeHashMultiMap* _tmp21_ = NULL;
	GeeHashMultiMap* _tmp22_ = NULL;
	gboolean _tmp23_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = 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);
	new_services = _tmp0_;
	_tmp1_ = edsf_persona_get_contact (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = e_vcard_get_attribute ((EVCard*) _tmp2_, "X-FOLKS-WEB-SERVICES-IDS");
	_tmp4_ = __vala_EVCardAttribute_copy0 (_tmp3_);
	services = _tmp4_;
	_tmp5_ = services;
	if (_tmp5_ != NULL) {
		EVCardAttribute* _tmp6_ = NULL;
		GList* _tmp7_ = NULL;
		_tmp6_ = services;
		_tmp7_ = e_vcard_attribute_get_params ((EVCardAttribute*) _tmp6_);
		{
			GList* service_collection = NULL;
			GList* service_it = NULL;
			service_collection = _tmp7_;
			for (service_it = service_collection; service_it != NULL; service_it = service_it->next) {
				EVCardAttributeParam* _tmp8_ = NULL;
				EVCardAttributeParam* service = NULL;
				_tmp8_ = __vala_EVCardAttributeParam_copy0 ((EVCardAttributeParam*) service_it->data);
				service = _tmp8_;
				{
					gchar* service_name = NULL;
					EVCardAttributeParam* _tmp9_ = NULL;
					const gchar* _tmp10_ = NULL;
					gchar* _tmp11_ = NULL;
					EVCardAttributeParam* _tmp12_ = NULL;
					GList* _tmp13_ = NULL;
					_tmp9_ = service;
					_tmp10_ = e_vcard_attribute_param_get_name (_tmp9_);
					_tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1);
					service_name = _tmp11_;
					_tmp12_ = service;
					_tmp13_ = e_vcard_attribute_param_get_values (_tmp12_);
					{
						GList* service_id_collection = NULL;
						GList* service_id_it = NULL;
						service_id_collection = _tmp13_;
						for (service_id_it = service_id_collection; service_id_it != NULL; service_id_it = service_id_it->next) {
							gchar* _tmp14_ = NULL;
							gchar* service_id = NULL;
							_tmp14_ = g_strdup ((const gchar*) service_id_it->data);
							service_id = _tmp14_;
							{
								const gchar* _tmp15_ = NULL;
								GeeHashMultiMap* _tmp16_ = NULL;
								const gchar* _tmp17_ = NULL;
								const gchar* _tmp18_ = NULL;
								FolksWebServiceFieldDetails* _tmp19_ = NULL;
								FolksWebServiceFieldDetails* _tmp20_ = NULL;
								_tmp15_ = service_id;
								if (g_strcmp0 (_tmp15_, "") == 0) {
									_g_free0 (service_id);
									continue;
								}
								_tmp16_ = new_services;
								_tmp17_ = service_name;
								_tmp18_ = service_id;
								_tmp19_ = folks_web_service_field_details_new (_tmp18_, NULL);
								_tmp20_ = _tmp19_;
								gee_multi_map_set ((GeeMultiMap*) _tmp16_, _tmp17_, _tmp20_);
								_g_object_unref0 (_tmp20_);
								_g_free0 (service_id);
							}
						}
					}
					_g_free0 (service_name);
					__vala_EVCardAttributeParam_free0 (service);
				}
			}
		}
	}
	_tmp21_ = new_services;
	_tmp22_ = self->priv->_web_service_addresses;
	_tmp23_ = folks_utils_multi_map_str_afd_equal ((GeeMultiMap*) _tmp21_, (GeeMultiMap*) _tmp22_);
	if (!_tmp23_) {
		GeeHashMultiMap* _tmp24_ = NULL;
		GeeHashMultiMap* _tmp25_ = NULL;
		_tmp24_ = new_services;
		_tmp25_ = _g_object_ref0 (_tmp24_);
		_g_object_unref0 (self->priv->_web_service_addresses);
		self->priv->_web_service_addresses = _tmp25_;
		g_object_notify ((GObject*) self, "web-service-addresses");
	}
	__vala_EVCardAttribute_free0 (services);
	_g_object_unref0 (new_services);
}


static void __vala_EVCardAttribute_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (_vala_EVCardAttribute_free (var), NULL));
}


static void _g_list_free___vala_EVCardAttribute_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) __vala_EVCardAttribute_free0_, NULL);
	g_list_free (self);
}


static void _edsf_persona_update_emails (EdsfPersona* self, gboolean emit_notification) {
	FolksSmallSet* new_email_addresses = NULL;
	FolksSmallSet* _tmp0_ = NULL;
	GList* attrs = NULL;
	EContact* _tmp1_ = NULL;
	EContact* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	GList* _tmp4_ = NULL;
	FolksSmallSet* _tmp17_ = NULL;
	FolksSmallSet* _tmp18_ = NULL;
	gboolean _tmp19_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_email_addresses = _tmp0_;
	_tmp1_ = edsf_persona_get_contact (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = e_contact_get_attributes (_tmp2_, E_CONTACT_EMAIL);
	attrs = _tmp3_;
	_tmp4_ = attrs;
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp4_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* _tmp5_ = NULL;
			EVCardAttribute* attr = NULL;
			_tmp5_ = __vala_EVCardAttribute_copy0 ((EVCardAttribute*) attr_it->data);
			attr = _tmp5_;
			{
				gchar* val = NULL;
				EVCardAttribute* _tmp6_ = NULL;
				gchar* _tmp7_ = NULL;
				gboolean _tmp8_ = FALSE;
				const gchar* _tmp9_ = NULL;
				FolksEmailFieldDetails* email_fd = NULL;
				const gchar* _tmp11_ = NULL;
				FolksEmailFieldDetails* _tmp12_ = NULL;
				FolksEmailFieldDetails* _tmp13_ = NULL;
				EVCardAttribute* _tmp14_ = NULL;
				FolksSmallSet* _tmp15_ = NULL;
				FolksEmailFieldDetails* _tmp16_ = NULL;
				_tmp6_ = attr;
				_tmp7_ = e_vcard_attribute_get_value (_tmp6_);
				val = _tmp7_;
				_tmp9_ = val;
				if (_tmp9_ == NULL) {
					_tmp8_ = TRUE;
				} else {
					const gchar* _tmp10_ = NULL;
					_tmp10_ = val;
					_tmp8_ = g_strcmp0 ((const gchar*) _tmp10_, "") == 0;
				}
				if (_tmp8_) {
					_g_free0 (val);
					__vala_EVCardAttribute_free0 (attr);
					continue;
				}
				_tmp11_ = val;
				_tmp12_ = folks_email_field_details_new ((const gchar*) _tmp11_, NULL);
				email_fd = _tmp12_;
				_tmp13_ = email_fd;
				_tmp14_ = attr;
				_edsf_persona_update_params (self, (FolksAbstractFieldDetails*) _tmp13_, _tmp14_);
				_tmp15_ = new_email_addresses;
				_tmp16_ = email_fd;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp16_);
				_g_object_unref0 (email_fd);
				_g_free0 (val);
				__vala_EVCardAttribute_free0 (attr);
			}
		}
	}
	_tmp17_ = new_email_addresses;
	_tmp18_ = self->priv->_email_addresses;
	_tmp19_ = folks_internal_equal_sets (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeSet*) _tmp17_, (GeeSet*) _tmp18_);
	if (!_tmp19_) {
		FolksSmallSet* _tmp20_ = NULL;
		FolksSmallSet* _tmp21_ = NULL;
		FolksSmallSet* _tmp22_ = NULL;
		GeeSet* _tmp23_ = NULL;
		GeeSet* _tmp24_ = NULL;
		gboolean _tmp25_ = FALSE;
		_tmp20_ = new_email_addresses;
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (self->priv->_email_addresses);
		self->priv->_email_addresses = _tmp21_;
		_tmp22_ = new_email_addresses;
		_tmp23_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp22_);
		_tmp24_ = _tmp23_;
		_g_object_unref0 (self->priv->_email_addresses_ro);
		self->priv->_email_addresses_ro = _tmp24_;
		_tmp25_ = emit_notification;
		if (_tmp25_) {
			g_object_notify ((GObject*) self, "email-addresses");
		}
	}
	__g_list_free___vala_EVCardAttribute_free0_0 (attrs);
	_g_object_unref0 (new_email_addresses);
}


static void _edsf_persona_update_notes (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	FolksSmallSet* new_notes = NULL;
	FolksSmallSet* _tmp9_ = NULL;
	gchar* n = NULL;
	gpointer _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	const gchar* _tmp12_ = NULL;
	FolksSmallSet* _tmp18_ = NULL;
	FolksSmallSet* _tmp19_ = NULL;
	gboolean _tmp20_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_notes;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = emit_notification;
		if (_tmp3_) {
			g_object_notify ((GObject*) self, "notes");
		}
		return;
	} else {
		FolksSmallSet* _tmp4_ = NULL;
		_tmp4_ = self->priv->_notes;
		if (_tmp4_ == NULL) {
			FolksSmallSet* _tmp5_ = NULL;
			FolksSmallSet* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			GeeSet* _tmp8_ = NULL;
			_tmp5_ = folks_small_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_notes);
			self->priv->_notes = _tmp5_;
			_tmp6_ = self->priv->_notes;
			_tmp7_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp6_);
			_tmp8_ = _tmp7_;
			_g_object_unref0 (self->priv->_notes_ro);
			self->priv->_notes_ro = _tmp8_;
		}
	}
	_tmp9_ = folks_small_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_notes = _tmp9_;
	_tmp10_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "note");
	n = (gchar*) _tmp10_;
	_tmp12_ = n;
	if (_tmp12_ != NULL) {
		const gchar* _tmp13_ = NULL;
		_tmp13_ = n;
		_tmp11_ = g_strcmp0 (_tmp13_, "") != 0;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		FolksNoteFieldDetails* note = NULL;
		const gchar* _tmp14_ = NULL;
		FolksNoteFieldDetails* _tmp15_ = NULL;
		FolksSmallSet* _tmp16_ = NULL;
		FolksNoteFieldDetails* _tmp17_ = NULL;
		_tmp14_ = n;
		_tmp15_ = folks_note_field_details_new ((const gchar*) _tmp14_, NULL, NULL);
		note = _tmp15_;
		_tmp16_ = new_notes;
		_tmp17_ = note;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp17_);
		_g_object_unref0 (note);
	}
	_tmp18_ = new_notes;
	_tmp19_ = self->priv->_notes;
	_tmp20_ = folks_internal_equal_sets (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeSet*) _tmp18_, (GeeSet*) _tmp19_);
	if (!_tmp20_) {
		FolksSmallSet* _tmp21_ = NULL;
		FolksSmallSet* _tmp22_ = NULL;
		FolksSmallSet* _tmp23_ = NULL;
		GeeSet* _tmp24_ = NULL;
		GeeSet* _tmp25_ = NULL;
		gboolean _tmp26_ = FALSE;
		_tmp21_ = new_notes;
		_tmp22_ = _g_object_ref0 (_tmp21_);
		_g_object_unref0 (self->priv->_notes);
		self->priv->_notes = _tmp22_;
		_tmp23_ = self->priv->_notes;
		_tmp24_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp23_);
		_tmp25_ = _tmp24_;
		_g_object_unref0 (self->priv->_notes_ro);
		self->priv->_notes_ro = _tmp25_;
		_tmp26_ = emit_notification;
		if (_tmp26_) {
			g_object_notify ((GObject*) self, "notes");
		}
	}
	_g_free0 (n);
	_g_object_unref0 (new_notes);
}


static EContactName* _vala_EContactName_copy (EContactName* self) {
	return g_boxed_copy (e_contact_name_get_type (), self);
}


static void _vala_EContactName_free (EContactName* self) {
	g_boxed_free (e_contact_name_get_type (), self);
}


static gpointer __vala_EContactName_copy0 (gpointer self) {
	return self ? _vala_EContactName_copy (self) : NULL;
}


static void _edsf_persona_update_names (EdsfPersona* self) {
	gchar* _full_name = NULL;
	gpointer _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* full_name = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _nickname = NULL;
	gpointer _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	gchar* nickname = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	FolksStructuredName* structured_name = NULL;
	EContactName* _cn = NULL;
	gpointer _tmp18_ = NULL;
	EContactName* _tmp19_ = NULL;
	gboolean _tmp43_ = FALSE;
	FolksStructuredName* _tmp44_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "full_name");
	_full_name = (gchar*) _tmp0_;
	_tmp1_ = _full_name;
	if (_tmp1_ == NULL) {
		gchar* _tmp2_ = NULL;
		_tmp2_ = g_strdup ("");
		_g_free0 (_full_name);
		_full_name = _tmp2_;
	}
	_tmp3_ = _full_name;
	_tmp4_ = g_strdup ((const gchar*) _tmp3_);
	full_name = _tmp4_;
	_tmp5_ = self->priv->_full_name;
	_tmp6_ = full_name;
	if (g_strcmp0 (_tmp5_, _tmp6_) != 0) {
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		_tmp7_ = full_name;
		_tmp8_ = g_strdup (_tmp7_);
		_g_free0 (self->priv->_full_name);
		self->priv->_full_name = _tmp8_;
		g_object_notify ((GObject*) self, "full-name");
	}
	_tmp9_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "nickname");
	_nickname = (gchar*) _tmp9_;
	_tmp10_ = _nickname;
	if (_tmp10_ == NULL) {
		gchar* _tmp11_ = NULL;
		_tmp11_ = g_strdup ("");
		_g_free0 (_nickname);
		_nickname = _tmp11_;
	}
	_tmp12_ = _nickname;
	_tmp13_ = g_strdup ((const gchar*) _tmp12_);
	nickname = _tmp13_;
	_tmp14_ = self->priv->_nickname;
	_tmp15_ = nickname;
	if (g_strcmp0 (_tmp14_, _tmp15_) != 0) {
		const gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		_tmp16_ = nickname;
		_tmp17_ = g_strdup (_tmp16_);
		_g_free0 (self->priv->_nickname);
		self->priv->_nickname = _tmp17_;
		g_object_notify ((GObject*) self, "nickname");
	}
	structured_name = NULL;
	_tmp18_ = _edsf_persona_get_property (self, e_contact_name_get_type (), (GBoxedCopyFunc) _vala_EContactName_copy, _vala_EContactName_free, "name");
	_cn = (EContactName*) _tmp18_;
	_tmp19_ = _cn;
	if (_tmp19_ != NULL) {
		EContactName* cn = NULL;
		EContactName* _tmp20_ = NULL;
		EContactName* _tmp21_ = NULL;
		gchar* family_name = NULL;
		EContactName* _tmp22_ = NULL;
		const gchar* _tmp23_ = NULL;
		gchar* _tmp24_ = NULL;
		gchar* given_name = NULL;
		EContactName* _tmp25_ = NULL;
		const gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		gchar* additional_names = NULL;
		EContactName* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		gchar* _tmp30_ = NULL;
		gchar* prefixes = NULL;
		EContactName* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
		gchar* suffixes = NULL;
		EContactName* _tmp34_ = NULL;
		const gchar* _tmp35_ = NULL;
		gchar* _tmp36_ = NULL;
		const gchar* _tmp37_ = NULL;
		const gchar* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		const gchar* _tmp40_ = NULL;
		const gchar* _tmp41_ = NULL;
		FolksStructuredName* _tmp42_ = NULL;
		_tmp20_ = _cn;
		_tmp21_ = __vala_EContactName_copy0 ((EContactName*) _tmp20_);
		cn = _tmp21_;
		_tmp22_ = cn;
		_tmp23_ = _tmp22_->family;
		_tmp24_ = g_strdup (_tmp23_);
		family_name = _tmp24_;
		_tmp25_ = cn;
		_tmp26_ = _tmp25_->given;
		_tmp27_ = g_strdup (_tmp26_);
		given_name = _tmp27_;
		_tmp28_ = cn;
		_tmp29_ = _tmp28_->additional;
		_tmp30_ = g_strdup (_tmp29_);
		additional_names = _tmp30_;
		_tmp31_ = cn;
		_tmp32_ = _tmp31_->prefixes;
		_tmp33_ = g_strdup (_tmp32_);
		prefixes = _tmp33_;
		_tmp34_ = cn;
		_tmp35_ = _tmp34_->suffixes;
		_tmp36_ = g_strdup (_tmp35_);
		suffixes = _tmp36_;
		_tmp37_ = family_name;
		_tmp38_ = given_name;
		_tmp39_ = additional_names;
		_tmp40_ = prefixes;
		_tmp41_ = suffixes;
		_tmp42_ = folks_structured_name_new (_tmp37_, _tmp38_, _tmp39_, _tmp40_, _tmp41_);
		_g_object_unref0 (structured_name);
		structured_name = _tmp42_;
		_g_free0 (suffixes);
		_g_free0 (prefixes);
		_g_free0 (additional_names);
		_g_free0 (given_name);
		_g_free0 (family_name);
		__vala_EContactName_free0 (cn);
	}
	_tmp44_ = structured_name;
	if (_tmp44_ != NULL) {
		FolksStructuredName* _tmp45_ = NULL;
		gboolean _tmp46_ = FALSE;
		_tmp45_ = structured_name;
		_tmp46_ = folks_structured_name_is_empty (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
		_tmp43_ = !_tmp46_;
	} else {
		_tmp43_ = FALSE;
	}
	if (_tmp43_) {
		FolksStructuredName* _tmp47_ = NULL;
		FolksStructuredName* _tmp48_ = NULL;
		_tmp47_ = structured_name;
		_tmp48_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
		_g_object_unref0 (self->priv->_structured_name);
		self->priv->_structured_name = _tmp48_;
		g_object_notify ((GObject*) self, "structured-name");
	} else {
		FolksStructuredName* _tmp49_ = NULL;
		_tmp49_ = self->priv->_structured_name;
		if (_tmp49_ != NULL) {
			_g_object_unref0 (self->priv->_structured_name);
			self->priv->_structured_name = NULL;
			g_object_notify ((GObject*) self, "structured-name");
		}
	}
	__vala_EContactName_free0 (_cn);
	_g_object_unref0 (structured_name);
	_g_free0 (nickname);
	_g_free0 (_nickname);
	_g_free0 (full_name);
	_g_free0 (_full_name);
}


static EContactPhoto* _vala_EContactPhoto_copy (EContactPhoto* self) {
	return g_boxed_copy (e_contact_photo_get_type (), self);
}


static gpointer __vala_EContactPhoto_copy0 (gpointer self) {
	return self ? _vala_EContactPhoto_copy (self) : NULL;
}


static void _vala_EContactPhoto_free (EContactPhoto* self) {
	g_boxed_free (e_contact_photo_get_type (), self);
}


static guint8* _vala_array_dup1 (guint8* self, int length) {
	return g_memdup (self, length * sizeof (guint8));
}


static GLoadableIcon* _edsf_persona_contact_photo_to_loadable_icon (EdsfPersona* self, EContactPhoto* _p) {
	GLoadableIcon* result = NULL;
	EContactPhoto* _tmp0_ = NULL;
	EContactPhoto* p = NULL;
	EContactPhoto* _tmp1_ = NULL;
	EContactPhoto* _tmp2_ = NULL;
	EContactPhoto* _tmp3_ = NULL;
	EContactPhotoType _tmp4_ = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _p;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = _p;
	_tmp2_ = __vala_EContactPhoto_copy0 ((EContactPhoto*) _tmp1_);
	p = _tmp2_;
	_tmp3_ = p;
	_tmp4_ = _tmp3_->type;
	switch (_tmp4_) {
		case E_CONTACT_PHOTO_TYPE_URI:
		{
			gchar* uri = NULL;
			EContactPhoto* _tmp5_ = NULL;
			const gchar* _tmp6_ = NULL;
			gchar* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
			gchar* scheme = NULL;
			const gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			gboolean _tmp11_ = FALSE;
			const gchar* _tmp12_ = NULL;
			const gchar* _tmp15_ = NULL;
			GFile* _tmp16_ = NULL;
			GFile* _tmp17_ = NULL;
			GFileIcon* _tmp18_ = NULL;
			GLoadableIcon* _tmp19_ = NULL;
			_tmp5_ = p;
			_tmp6_ = e_contact_photo_get_uri (_tmp5_);
			_tmp7_ = g_strdup (_tmp6_);
			uri = _tmp7_;
			_tmp8_ = uri;
			if (_tmp8_ == NULL) {
				result = NULL;
				_g_free0 (uri);
				__vala_EContactPhoto_free0 (p);
				return result;
			}
			_tmp9_ = uri;
			_tmp10_ = g_uri_parse_scheme (_tmp9_);
			scheme = _tmp10_;
			_tmp12_ = scheme;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				const gchar* _tmp13_ = NULL;
				_tmp13_ = scheme;
				_tmp11_ = g_strcmp0 (_tmp13_, "file") != 0;
			}
			if (_tmp11_) {
				const gchar* _tmp14_ = NULL;
				_tmp14_ = uri;
				g_warning ("Ignoring contact photo with URI ‘%s’ because it’s " "not a local file.", _tmp14_);
				result = NULL;
				_g_free0 (scheme);
				_g_free0 (uri);
				__vala_EContactPhoto_free0 (p);
				return result;
			}
			_tmp15_ = uri;
			_tmp16_ = g_file_new_for_uri ((const gchar*) _tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = (GFileIcon*) g_file_icon_new (_tmp17_);
			_tmp19_ = (GLoadableIcon*) _tmp18_;
			_g_object_unref0 (_tmp17_);
			result = _tmp19_;
			_g_free0 (scheme);
			_g_free0 (uri);
			__vala_EContactPhoto_free0 (p);
			return result;
		}
		case E_CONTACT_PHOTO_TYPE_INLINED:
		{
			guint8* data = NULL;
			EContactPhoto* _tmp20_ = NULL;
			gsize _tmp21_;
			guint8* _tmp22_ = NULL;
			guint8* _tmp23_ = NULL;
			gint _tmp23__length1 = 0;
			gint data_length1 = 0;
			gint _data_size_ = 0;
			gchar* mime_type = NULL;
			EContactPhoto* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
			gchar* _tmp26_ = NULL;
			gboolean _tmp27_ = FALSE;
			guint8* _tmp28_ = NULL;
			gint _tmp28__length1 = 0;
			GBytes* bytes = NULL;
			guint8* _tmp30_ = NULL;
			gint _tmp30__length1 = 0;
			GBytes* _tmp31_ = NULL;
			GBytes* _tmp32_ = NULL;
			GBytesIcon* _tmp33_ = NULL;
			_tmp20_ = p;
			_tmp22_ = e_contact_photo_get_inlined (_tmp20_, &_tmp21_);
			_tmp23_ = (_tmp22_ != NULL) ? _vala_array_dup1 (_tmp22_, _tmp21_) : ((gpointer) _tmp22_);
			_tmp23__length1 = _tmp21_;
			data = _tmp23_;
			data_length1 = _tmp23__length1;
			_data_size_ = data_length1;
			_tmp24_ = p;
			_tmp25_ = e_contact_photo_get_mime_type (_tmp24_);
			_tmp26_ = g_strdup (_tmp25_);
			mime_type = _tmp26_;
			_tmp28_ = data;
			_tmp28__length1 = data_length1;
			if (_tmp28_ == NULL) {
				_tmp27_ = TRUE;
			} else {
				const gchar* _tmp29_ = NULL;
				_tmp29_ = mime_type;
				_tmp27_ = _tmp29_ == NULL;
			}
			if (_tmp27_) {
				result = NULL;
				_g_free0 (mime_type);
				data = (g_free (data), NULL);
				__vala_EContactPhoto_free0 (p);
				return result;
			}
			_tmp30_ = data;
			_tmp30__length1 = data_length1;
			_tmp31_ = g_bytes_new ((guint8*) _tmp30_, (_tmp30__length1 * sizeof (guint8)) / sizeof (guint8));
			bytes = _tmp31_;
			_tmp32_ = bytes;
			_tmp33_ = (GBytesIcon*) g_bytes_icon_new (_tmp32_);
			result = (GLoadableIcon*) _tmp33_;
			_g_bytes_unref0 (bytes);
			_g_free0 (mime_type);
			data = (g_free (data), NULL);
			__vala_EContactPhoto_free0 (p);
			return result;
		}
		default:
		{
			result = NULL;
			__vala_EContactPhoto_free0 (p);
			return result;
		}
	}
	__vala_EContactPhoto_free0 (p);
}


static void _edsf_persona_update_avatar (EdsfPersona* self) {
	EContactPhoto* p = NULL;
	gpointer _tmp0_ = NULL;
	GLoadableIcon* new_avatar = NULL;
	EContactPhoto* _tmp1_ = NULL;
	GLoadableIcon* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GLoadableIcon* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _edsf_persona_get_property (self, e_contact_photo_get_type (), (GBoxedCopyFunc) _vala_EContactPhoto_copy, _vala_EContactPhoto_free, "photo");
	p = (EContactPhoto*) _tmp0_;
	_tmp1_ = p;
	_tmp2_ = _edsf_persona_contact_photo_to_loadable_icon (self, _tmp1_);
	new_avatar = _tmp2_;
	_tmp4_ = self->priv->_avatar;
	if (_tmp4_ != NULL) {
		GLoadableIcon* _tmp5_ = NULL;
		_tmp5_ = new_avatar;
		_tmp3_ = _tmp5_ == NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_g_object_unref0 (self->priv->_avatar);
		self->priv->_avatar = NULL;
		g_object_notify ((GObject*) self, "avatar");
	} else {
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		GLoadableIcon* _tmp8_ = NULL;
		_tmp8_ = self->priv->_avatar;
		if (_tmp8_ == NULL) {
			GLoadableIcon* _tmp9_ = NULL;
			_tmp9_ = new_avatar;
			_tmp7_ = _tmp9_ != NULL;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			_tmp6_ = TRUE;
		} else {
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			GLoadableIcon* _tmp12_ = NULL;
			_tmp12_ = self->priv->_avatar;
			if (_tmp12_ != NULL) {
				GLoadableIcon* _tmp13_ = NULL;
				_tmp13_ = new_avatar;
				_tmp11_ = _tmp13_ != NULL;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				GLoadableIcon* _tmp14_ = NULL;
				GLoadableIcon* _tmp15_ = NULL;
				gboolean _tmp16_ = FALSE;
				_tmp14_ = self->priv->_avatar;
				_tmp15_ = new_avatar;
				_tmp16_ = g_icon_equal ((GIcon*) G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, g_loadable_icon_get_type (), GLoadableIcon), (GIcon*) _tmp15_);
				_tmp10_ = _tmp16_ == FALSE;
			} else {
				_tmp10_ = FALSE;
			}
			_tmp6_ = _tmp10_;
		}
		if (_tmp6_) {
			GLoadableIcon* _tmp17_ = NULL;
			GLoadableIcon* _tmp18_ = NULL;
			_tmp17_ = new_avatar;
			_tmp18_ = _g_object_ref0 (_tmp17_);
			_g_object_unref0 (self->priv->_avatar);
			self->priv->_avatar = _tmp18_;
			g_object_notify ((GObject*) self, "avatar");
		}
	}
	_g_object_unref0 (new_avatar);
	__vala_EContactPhoto_free0 (p);
}


static void _edsf_persona_update_urls (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	FolksSmallSet* new_urls = NULL;
	FolksSmallSet* _tmp9_ = NULL;
	EVCard* vcard = NULL;
	EContact* _tmp27_ = NULL;
	EContact* _tmp28_ = NULL;
	EVCard* _tmp29_ = NULL;
	EVCard* _tmp30_ = NULL;
	GList* _tmp31_ = NULL;
	FolksSmallSet* _tmp45_ = NULL;
	FolksSmallSet* _tmp46_ = NULL;
	gboolean _tmp47_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_urls;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = emit_notification;
		if (_tmp3_) {
			g_object_notify ((GObject*) self, "urls");
		}
		return;
	} else {
		FolksSmallSet* _tmp4_ = NULL;
		_tmp4_ = self->priv->_urls;
		if (_tmp4_ == NULL) {
			FolksSmallSet* _tmp5_ = NULL;
			FolksSmallSet* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			GeeSet* _tmp8_ = NULL;
			_tmp5_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_urls);
			self->priv->_urls = _tmp5_;
			_tmp6_ = self->priv->_urls;
			_tmp7_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp6_);
			_tmp8_ = _tmp7_;
			_g_object_unref0 (self->priv->_urls_ro);
			self->priv->_urls_ro = _tmp8_;
		}
	}
	_tmp9_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_urls = _tmp9_;
	{
		EdsfPersonaUrlTypeMapping* mapping_collection = NULL;
		gint mapping_collection_length1 = 0;
		gint _mapping_collection_size_ = 0;
		gint mapping_it = 0;
		mapping_collection = EDSF_PERSONA__url_properties;
		mapping_collection_length1 = G_N_ELEMENTS (EDSF_PERSONA__url_properties);
		for (mapping_it = 0; mapping_it < G_N_ELEMENTS (EDSF_PERSONA__url_properties); mapping_it = mapping_it + 1) {
			EdsfPersonaUrlTypeMapping mapping = {0};
			mapping = mapping_collection[mapping_it];
			{
				gchar* url_property = NULL;
				EdsfPersonaUrlTypeMapping _tmp10_ = {0};
				const gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* folks_type = NULL;
				EdsfPersonaUrlTypeMapping _tmp13_ = {0};
				const gchar* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				gchar* u = NULL;
				const gchar* _tmp16_ = NULL;
				gpointer _tmp17_ = NULL;
				gboolean _tmp18_ = FALSE;
				const gchar* _tmp19_ = NULL;
				_tmp10_ = mapping;
				_tmp11_ = _tmp10_.vcard_field_name;
				_tmp12_ = g_strdup (_tmp11_);
				url_property = _tmp12_;
				_tmp13_ = mapping;
				_tmp14_ = _tmp13_.folks_type;
				_tmp15_ = g_strdup (_tmp14_);
				folks_type = _tmp15_;
				_tmp16_ = url_property;
				_tmp17_ = _edsf_persona_get_property (self, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp16_);
				u = (gchar*) _tmp17_;
				_tmp19_ = u;
				if (_tmp19_ != NULL) {
					const gchar* _tmp20_ = NULL;
					_tmp20_ = u;
					_tmp18_ = g_strcmp0 (_tmp20_, "") != 0;
				} else {
					_tmp18_ = FALSE;
				}
				if (_tmp18_) {
					FolksUrlFieldDetails* fd_u = NULL;
					const gchar* _tmp21_ = NULL;
					FolksUrlFieldDetails* _tmp22_ = NULL;
					FolksUrlFieldDetails* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					FolksSmallSet* _tmp25_ = NULL;
					FolksUrlFieldDetails* _tmp26_ = NULL;
					_tmp21_ = u;
					_tmp22_ = folks_url_field_details_new ((const gchar*) _tmp21_, NULL);
					fd_u = _tmp22_;
					_tmp23_ = fd_u;
					_tmp24_ = folks_type;
					folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _tmp23_, FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE, _tmp24_);
					_tmp25_ = new_urls;
					_tmp26_ = fd_u;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
					_g_object_unref0 (fd_u);
				}
				_g_free0 (u);
				_g_free0 (folks_type);
				_g_free0 (url_property);
			}
		}
	}
	_tmp27_ = edsf_persona_get_contact (self);
	_tmp28_ = _tmp27_;
	_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, e_vcard_get_type (), EVCard));
	vcard = _tmp29_;
	_tmp30_ = vcard;
	_tmp31_ = e_vcard_get_attributes (_tmp30_);
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp31_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* attr = NULL;
			attr = (EVCardAttribute*) attr_it->data;
			{
				EVCardAttribute* _tmp32_ = NULL;
				const gchar* _tmp33_ = NULL;
				_tmp32_ = attr;
				_tmp33_ = e_vcard_attribute_get_name (_tmp32_);
				if (g_strcmp0 (_tmp33_, "X-URIS") == 0) {
					gchar* val = NULL;
					EVCardAttribute* _tmp34_ = NULL;
					gchar* _tmp35_ = NULL;
					gboolean _tmp36_ = FALSE;
					const gchar* _tmp37_ = NULL;
					FolksUrlFieldDetails* url_fd = NULL;
					const gchar* _tmp39_ = NULL;
					FolksUrlFieldDetails* _tmp40_ = NULL;
					FolksUrlFieldDetails* _tmp41_ = NULL;
					EVCardAttribute* _tmp42_ = NULL;
					FolksSmallSet* _tmp43_ = NULL;
					FolksUrlFieldDetails* _tmp44_ = NULL;
					_tmp34_ = attr;
					_tmp35_ = e_vcard_attribute_get_value (_tmp34_);
					val = _tmp35_;
					_tmp37_ = val;
					if (_tmp37_ == NULL) {
						_tmp36_ = TRUE;
					} else {
						const gchar* _tmp38_ = NULL;
						_tmp38_ = val;
						_tmp36_ = g_strcmp0 ((const gchar*) _tmp38_, "") == 0;
					}
					if (_tmp36_) {
						_g_free0 (val);
						continue;
					}
					_tmp39_ = val;
					_tmp40_ = folks_url_field_details_new ((const gchar*) _tmp39_, NULL);
					url_fd = _tmp40_;
					_tmp41_ = url_fd;
					_tmp42_ = attr;
					_edsf_persona_update_params (self, (FolksAbstractFieldDetails*) _tmp41_, _tmp42_);
					_tmp43_ = new_urls;
					_tmp44_ = url_fd;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
					_g_object_unref0 (url_fd);
					_g_free0 (val);
				}
			}
		}
	}
	_tmp45_ = new_urls;
	_tmp46_ = self->priv->_urls;
	_tmp47_ = folks_utils_set_afd_equal ((GeeSet*) _tmp45_, (GeeSet*) _tmp46_);
	if (!_tmp47_) {
		FolksSmallSet* _tmp48_ = NULL;
		FolksSmallSet* _tmp49_ = NULL;
		FolksSmallSet* _tmp50_ = NULL;
		GeeSet* _tmp51_ = NULL;
		GeeSet* _tmp52_ = NULL;
		gboolean _tmp53_ = FALSE;
		_tmp48_ = new_urls;
		_tmp49_ = _g_object_ref0 (_tmp48_);
		_g_object_unref0 (self->priv->_urls);
		self->priv->_urls = _tmp49_;
		_tmp50_ = new_urls;
		_tmp51_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp50_);
		_tmp52_ = _tmp51_;
		_g_object_unref0 (self->priv->_urls_ro);
		self->priv->_urls_ro = _tmp52_;
		_tmp53_ = emit_notification;
		if (_tmp53_) {
			g_object_notify ((GObject*) self, "urls");
		}
	}
	_g_object_unref0 (vcard);
	_g_object_unref0 (new_urls);
}


static void _edsf_persona_update_im_addresses (EdsfPersona* self) {
	GHashTable* im_eds_map = NULL;
	GHashTable* _tmp0_ = NULL;
	GeeHashMultiMap* new_im_addresses = NULL;
	GeeHashMultiMap* _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	GeeHashMultiMap* _tmp77_ = NULL;
	GeeHashMultiMap* _tmp78_ = NULL;
	gboolean _tmp79_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _edsf_persona_get_im_eds_map ();
	im_eds_map = _tmp0_;
	_tmp1_ = 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);
	new_im_addresses = _tmp1_;
	_tmp2_ = im_eds_map;
	_tmp3_ = g_hash_table_get_keys (_tmp2_);
	{
		GList* im_proto_collection = NULL;
		GList* im_proto_it = NULL;
		im_proto_collection = _tmp3_;
		for (im_proto_it = im_proto_collection; im_proto_it != NULL; im_proto_it = im_proto_it->next) {
			const gchar* im_proto = NULL;
			im_proto = (const gchar*) im_proto_it->data;
			{
				GList* addresses = NULL;
				EContact* _tmp4_ = NULL;
				EContact* _tmp5_ = NULL;
				GHashTable* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
				gconstpointer _tmp8_ = NULL;
				GList* _tmp9_ = NULL;
				GList* _tmp10_ = NULL;
				_tmp4_ = edsf_persona_get_contact (self);
				_tmp5_ = _tmp4_;
				_tmp6_ = im_eds_map;
				_tmp7_ = im_proto;
				_tmp8_ = g_hash_table_lookup (_tmp6_, _tmp7_);
				_tmp9_ = e_contact_get_attributes (_tmp5_, (EContactField) ((gintptr) _tmp8_));
				addresses = _tmp9_;
				_tmp10_ = addresses;
				{
					GList* attr_collection = NULL;
					GList* attr_it = NULL;
					attr_collection = _tmp10_;
					for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
						EVCardAttribute* _tmp11_ = NULL;
						EVCardAttribute* attr = NULL;
						_tmp11_ = __vala_EVCardAttribute_copy0 ((EVCardAttribute*) attr_it->data);
						attr = _tmp11_;
						{
							{
								gchar* addr = NULL;
								EVCardAttribute* _tmp12_ = NULL;
								gchar* _tmp13_ = NULL;
								gboolean _tmp14_ = FALSE;
								const gchar* _tmp15_ = NULL;
								gchar* normalised_addr = NULL;
								const gchar* _tmp17_ = NULL;
								const gchar* _tmp18_ = NULL;
								gchar* _tmp19_ = NULL;
								const gchar* _tmp20_ = NULL;
								FolksImFieldDetails* im_fd = NULL;
								const gchar* _tmp21_ = NULL;
								FolksImFieldDetails* _tmp22_ = NULL;
								GeeHashMultiMap* _tmp23_ = NULL;
								const gchar* _tmp24_ = NULL;
								FolksImFieldDetails* _tmp25_ = NULL;
								_tmp12_ = attr;
								_tmp13_ = e_vcard_attribute_get_value (_tmp12_);
								addr = _tmp13_;
								_tmp15_ = addr;
								if (_tmp15_ == NULL) {
									_tmp14_ = TRUE;
								} else {
									const gchar* _tmp16_ = NULL;
									_tmp16_ = addr;
									_tmp14_ = g_strcmp0 ((const gchar*) _tmp16_, "") == 0;
								}
								if (_tmp14_) {
									_g_free0 (addr);
									__vala_EVCardAttribute_free0 (attr);
									continue;
								}
								_tmp17_ = addr;
								_tmp18_ = im_proto;
								_tmp19_ = folks_im_details_normalise_im_address ((const gchar*) _tmp17_, _tmp18_, &_inner_error_);
								normalised_addr = _tmp19_;
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									_g_free0 (addr);
									if (_inner_error_->domain == FOLKS_IM_DETAILS_ERROR) {
										goto __catch0_folks_im_details_error;
									}
									_g_free0 (addr);
									__vala_EVCardAttribute_free0 (attr);
									__g_list_free___vala_EVCardAttribute_free0_0 (addresses);
									_g_list_free0 (im_proto_collection);
									_g_object_unref0 (new_im_addresses);
									_g_hash_table_unref0 (im_eds_map);
									g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
									g_clear_error (&_inner_error_);
									return;
								}
								_tmp20_ = normalised_addr;
								if (g_strcmp0 (_tmp20_, "") == 0) {
									_g_free0 (normalised_addr);
									_g_free0 (addr);
									__vala_EVCardAttribute_free0 (attr);
									continue;
								}
								_tmp21_ = normalised_addr;
								_tmp22_ = folks_im_field_details_new (_tmp21_, NULL);
								im_fd = _tmp22_;
								_tmp23_ = new_im_addresses;
								_tmp24_ = im_proto;
								_tmp25_ = im_fd;
								gee_multi_map_set ((GeeMultiMap*) _tmp23_, _tmp24_, _tmp25_);
								_g_object_unref0 (im_fd);
								_g_free0 (normalised_addr);
								_g_free0 (addr);
							}
							goto __finally0;
							__catch0_folks_im_details_error:
							{
								GError* e = NULL;
								GError* _tmp26_ = NULL;
								const gchar* _tmp27_ = NULL;
								e = _inner_error_;
								_inner_error_ = NULL;
								_tmp26_ = e;
								_tmp27_ = _tmp26_->message;
								g_warning ("edsf-persona.vala:1710: Problem when trying to normalise address: %s\n", _tmp27_);
								_g_error_free0 (e);
							}
							__finally0:
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								__vala_EVCardAttribute_free0 (attr);
								__g_list_free___vala_EVCardAttribute_free0_0 (addresses);
								_g_list_free0 (im_proto_collection);
								_g_object_unref0 (new_im_addresses);
								_g_hash_table_unref0 (im_eds_map);
								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;
							}
							__vala_EVCardAttribute_free0 (attr);
						}
					}
				}
				__g_list_free___vala_EVCardAttribute_free0_0 (addresses);
			}
		}
		_g_list_free0 (im_proto_collection);
	}
	{
		FolksSmallSet* _email_list = NULL;
		FolksSmallSet* _tmp28_ = NULL;
		FolksSmallSet* _tmp29_ = NULL;
		gint _email_size = 0;
		FolksSmallSet* _tmp30_ = NULL;
		gint _tmp31_ = 0;
		gint _tmp32_ = 0;
		gint _email_index = 0;
		_tmp28_ = self->priv->_email_addresses;
		_tmp29_ = _g_object_ref0 (_tmp28_);
		_email_list = _tmp29_;
		_tmp30_ = _email_list;
		_tmp31_ = gee_collection_get_size ((GeeCollection*) _tmp30_);
		_tmp32_ = _tmp31_;
		_email_size = _tmp32_;
		_email_index = -1;
		while (TRUE) {
			gint _tmp33_ = 0;
			gint _tmp34_ = 0;
			gint _tmp35_ = 0;
			FolksEmailFieldDetails* email = NULL;
			FolksSmallSet* _tmp36_ = NULL;
			gint _tmp37_ = 0;
			gconstpointer _tmp38_ = NULL;
			FolksEmailFieldDetails* _tmp39_ = NULL;
			gchar* _proto = NULL;
			FolksEmailFieldDetails* _tmp40_ = NULL;
			gconstpointer _tmp41_ = NULL;
			const gchar* _tmp42_ = NULL;
			gchar* _tmp43_ = NULL;
			const gchar* _tmp44_ = NULL;
			_tmp33_ = _email_index;
			_email_index = _tmp33_ + 1;
			_tmp34_ = _email_index;
			_tmp35_ = _email_size;
			if (!(_tmp34_ < _tmp35_)) {
				break;
			}
			_tmp36_ = _email_list;
			_tmp37_ = _email_index;
			_tmp38_ = folks_small_set_get (_tmp36_, _tmp37_);
			_tmp39_ = _g_object_ref0 ((FolksEmailFieldDetails*) _tmp38_);
			email = _tmp39_;
			_tmp40_ = email;
			_tmp41_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp40_);
			_tmp42_ = _tmp41_;
			_tmp43_ = _edsf_persona_im_proto_from_addr (self, (const gchar*) _tmp42_);
			_proto = _tmp43_;
			_tmp44_ = _proto;
			if (_tmp44_ != NULL) {
				gchar* proto = NULL;
				const gchar* _tmp45_ = NULL;
				gchar* _tmp46_ = NULL;
				gboolean exists = FALSE;
				GeeCollection* current_im_addrs = NULL;
				GeeHashMultiMap* _tmp47_ = NULL;
				const gchar* _tmp48_ = NULL;
				GeeCollection* _tmp49_ = NULL;
				GeeCollection* _tmp50_ = NULL;
				gboolean _tmp63_ = FALSE;
				_tmp45_ = _proto;
				_tmp46_ = g_strdup ((const gchar*) _tmp45_);
				proto = _tmp46_;
				exists = FALSE;
				_tmp47_ = new_im_addresses;
				_tmp48_ = proto;
				_tmp49_ = gee_multi_map_get ((GeeMultiMap*) _tmp47_, _tmp48_);
				current_im_addrs = _tmp49_;
				_tmp50_ = current_im_addrs;
				if (_tmp50_ != NULL) {
					{
						GeeIterator* _cur_im_it = NULL;
						GeeCollection* _tmp51_ = NULL;
						GeeIterator* _tmp52_ = NULL;
						_tmp51_ = current_im_addrs;
						_tmp52_ = gee_iterable_iterator ((GeeIterable*) G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection));
						_cur_im_it = _tmp52_;
						while (TRUE) {
							GeeIterator* _tmp53_ = NULL;
							gboolean _tmp54_ = FALSE;
							FolksImFieldDetails* cur_im = NULL;
							GeeIterator* _tmp55_ = NULL;
							gpointer _tmp56_ = NULL;
							FolksImFieldDetails* _tmp57_ = NULL;
							gconstpointer _tmp58_ = NULL;
							const gchar* _tmp59_ = NULL;
							FolksEmailFieldDetails* _tmp60_ = NULL;
							gconstpointer _tmp61_ = NULL;
							const gchar* _tmp62_ = NULL;
							_tmp53_ = _cur_im_it;
							_tmp54_ = gee_iterator_next (_tmp53_);
							if (!_tmp54_) {
								break;
							}
							_tmp55_ = _cur_im_it;
							_tmp56_ = gee_iterator_get (_tmp55_);
							cur_im = (FolksImFieldDetails*) _tmp56_;
							_tmp57_ = cur_im;
							_tmp58_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp57_);
							_tmp59_ = _tmp58_;
							_tmp60_ = email;
							_tmp61_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp60_);
							_tmp62_ = _tmp61_;
							if (g_strcmp0 ((const gchar*) _tmp59_, (const gchar*) _tmp62_) == 0) {
								exists = TRUE;
								_g_object_unref0 (cur_im);
								break;
							}
							_g_object_unref0 (cur_im);
						}
						_g_object_unref0 (_cur_im_it);
					}
				}
				_tmp63_ = exists;
				if (_tmp63_) {
					_g_object_unref0 (current_im_addrs);
					_g_free0 (proto);
					_g_free0 (_proto);
					_g_object_unref0 (email);
					continue;
				}
				{
					gchar* normalised_addr = NULL;
					FolksEmailFieldDetails* _tmp64_ = NULL;
					gconstpointer _tmp65_ = NULL;
					const gchar* _tmp66_ = NULL;
					const gchar* _tmp67_ = NULL;
					gchar* _tmp68_ = NULL;
					FolksImFieldDetails* im_fd = NULL;
					const gchar* _tmp69_ = NULL;
					FolksImFieldDetails* _tmp70_ = NULL;
					FolksImFieldDetails* _tmp71_ = NULL;
					GeeHashMultiMap* _tmp72_ = NULL;
					const gchar* _tmp73_ = NULL;
					FolksImFieldDetails* _tmp74_ = NULL;
					_tmp64_ = email;
					_tmp65_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp64_);
					_tmp66_ = _tmp65_;
					_tmp67_ = proto;
					_tmp68_ = folks_im_details_normalise_im_address ((const gchar*) _tmp66_, _tmp67_, &_inner_error_);
					normalised_addr = _tmp68_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						if (_inner_error_->domain == FOLKS_IM_DETAILS_ERROR) {
							goto __catch1_folks_im_details_error;
						}
						_g_object_unref0 (current_im_addrs);
						_g_free0 (proto);
						_g_free0 (_proto);
						_g_object_unref0 (email);
						_g_object_unref0 (_email_list);
						_g_object_unref0 (new_im_addresses);
						_g_hash_table_unref0 (im_eds_map);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
						g_clear_error (&_inner_error_);
						return;
					}
					_tmp69_ = normalised_addr;
					_tmp70_ = folks_im_field_details_new (_tmp69_, NULL);
					im_fd = _tmp70_;
					_tmp71_ = im_fd;
					folks_abstract_field_details_add_parameter ((FolksAbstractFieldDetails*) _tmp71_, EDSF_PERSONA_folks_field_attribute_name, "TRUE");
					_tmp72_ = new_im_addresses;
					_tmp73_ = proto;
					_tmp74_ = im_fd;
					gee_multi_map_set ((GeeMultiMap*) _tmp72_, _tmp73_, _tmp74_);
					_g_object_unref0 (im_fd);
					_g_free0 (normalised_addr);
				}
				goto __finally1;
				__catch1_folks_im_details_error:
				{
					GError* e = NULL;
					GError* _tmp75_ = NULL;
					const gchar* _tmp76_ = NULL;
					e = _inner_error_;
					_inner_error_ = NULL;
					_tmp75_ = e;
					_tmp76_ = _tmp75_->message;
					g_warning ("edsf-persona.vala:1767: Problem when trying to normalise address: %s\n", _tmp76_);
					_g_error_free0 (e);
				}
				__finally1:
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_g_object_unref0 (current_im_addrs);
					_g_free0 (proto);
					_g_free0 (_proto);
					_g_object_unref0 (email);
					_g_object_unref0 (_email_list);
					_g_object_unref0 (new_im_addresses);
					_g_hash_table_unref0 (im_eds_map);
					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;
				}
				_g_object_unref0 (current_im_addrs);
				_g_free0 (proto);
			}
			_g_free0 (_proto);
			_g_object_unref0 (email);
		}
		_g_object_unref0 (_email_list);
	}
	_tmp77_ = new_im_addresses;
	_tmp78_ = self->priv->_im_addresses;
	_tmp79_ = folks_utils_multi_map_str_afd_equal ((GeeMultiMap*) _tmp77_, (GeeMultiMap*) _tmp78_);
	if (!_tmp79_) {
		GeeHashMultiMap* _tmp80_ = NULL;
		GeeHashMultiMap* _tmp81_ = NULL;
		_tmp80_ = new_im_addresses;
		_tmp81_ = _g_object_ref0 (_tmp80_);
		_g_object_unref0 (self->priv->_im_addresses);
		self->priv->_im_addresses = _tmp81_;
		g_object_notify ((GObject*) self, "im-addresses");
	}
	_g_object_unref0 (new_im_addresses);
	_g_hash_table_unref0 (im_eds_map);
}


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


static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


static void _edsf_persona_update_groups (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	GList* category_names = NULL;
	EContact* _tmp4_ = NULL;
	gpointer _tmp5_ = NULL;
	FolksSmallSet* new_categories = NULL;
	FolksSmallSet* _tmp6_ = NULL;
	gboolean any_added_categories = FALSE;
	GList* _tmp7_ = NULL;
	gboolean any_removed_categories = FALSE;
	FolksSmallSet* _tmp21_ = NULL;
	FolksSmallSet* _tmp42_ = NULL;
	FolksSmallSet* _tmp43_ = NULL;
	FolksSmallSet* _tmp44_ = NULL;
	GeeSet* _tmp45_ = NULL;
	GeeSet* _tmp46_ = NULL;
	EdsfPersonaStore* store = NULL;
	FolksPersonaStore* _tmp47_ = NULL;
	FolksPersonaStore* _tmp48_ = NULL;
	EdsfPersonaStore* _tmp49_ = NULL;
	gboolean in_google_personal_group = FALSE;
	gboolean should_notify_sysgroups = FALSE;
	EdsfPersonaStore* _tmp50_ = NULL;
	gboolean _tmp51_ = FALSE;
	gboolean old_is_favourite = FALSE;
	gboolean _tmp100_ = FALSE;
	EdsfPersonaStore* _tmp101_ = NULL;
	gboolean _tmp102_ = FALSE;
	gboolean _tmp106_ = FALSE;
	gboolean _tmp107_ = FALSE;
	gboolean _tmp108_ = FALSE;
	gboolean _tmp111_ = FALSE;
	gboolean _tmp112_ = FALSE;
	gboolean _tmp114_ = FALSE;
	gboolean _tmp115_ = FALSE;
	gboolean _tmp116_ = FALSE;
	gboolean _tmp118_ = FALSE;
	gboolean _tmp119_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_groups;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = emit_notification;
		if (_tmp3_) {
			g_object_notify ((GObject*) self, "groups");
		}
		return;
	}
	_tmp4_ = self->priv->_contact;
	_tmp5_ = e_contact_get (_tmp4_, E_CONTACT_CATEGORY_LIST);
	category_names = (GList*) _tmp5_;
	_tmp6_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	new_categories = _tmp6_;
	any_added_categories = FALSE;
	_tmp7_ = category_names;
	{
		GList* category_name_collection = NULL;
		GList* category_name_it = NULL;
		category_name_collection = _tmp7_;
		for (category_name_it = category_name_collection; category_name_it != NULL; category_name_it = category_name_it->next) {
			gchar* _tmp8_ = NULL;
			gchar* category_name = NULL;
			_tmp8_ = g_strdup ((const gchar*) category_name_it->data);
			category_name = _tmp8_;
			{
				gboolean _tmp9_ = FALSE;
				FolksPersonaStore* _tmp10_ = NULL;
				FolksPersonaStore* _tmp11_ = NULL;
				gboolean _tmp12_ = FALSE;
				FolksSmallSet* _tmp14_ = NULL;
				const gchar* _tmp15_ = NULL;
				gboolean _tmp16_ = FALSE;
				FolksSmallSet* _tmp17_ = NULL;
				_tmp10_ = folks_persona_get_store ((FolksPersona*) self);
				_tmp11_ = _tmp10_;
				_tmp12_ = _edsf_persona_store_is_google_contacts_address_book (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore));
				if (_tmp12_) {
					const gchar* _tmp13_ = NULL;
					_tmp13_ = category_name;
					_tmp9_ = g_strcmp0 (_tmp13_, EDSF_PERSONA_STORE_android_favourite_group_name) == 0;
				} else {
					_tmp9_ = FALSE;
				}
				if (_tmp9_) {
					_g_free0 (category_name);
					continue;
				}
				_tmp14_ = new_categories;
				_tmp15_ = category_name;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, _tmp15_);
				_tmp17_ = self->priv->_groups;
				if (_tmp17_ == NULL) {
					_tmp16_ = TRUE;
				} else {
					FolksSmallSet* _tmp18_ = NULL;
					const gchar* _tmp19_ = NULL;
					gboolean _tmp20_ = FALSE;
					_tmp18_ = self->priv->_groups;
					_tmp19_ = category_name;
					_tmp20_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp18_, _tmp19_);
					_tmp16_ = !_tmp20_;
				}
				if (_tmp16_) {
					any_added_categories = TRUE;
				}
				_g_free0 (category_name);
			}
		}
	}
	any_removed_categories = FALSE;
	_tmp21_ = self->priv->_groups;
	if (_tmp21_ != NULL) {
		{
			FolksSmallSet* _category_name_list = NULL;
			FolksSmallSet* _tmp22_ = NULL;
			FolksSmallSet* _tmp23_ = NULL;
			gint _category_name_size = 0;
			FolksSmallSet* _tmp24_ = NULL;
			gint _tmp25_ = 0;
			gint _tmp26_ = 0;
			gint _category_name_index = 0;
			_tmp22_ = self->priv->_groups;
			_tmp23_ = _g_object_ref0 (_tmp22_);
			_category_name_list = _tmp23_;
			_tmp24_ = _category_name_list;
			_tmp25_ = gee_collection_get_size ((GeeCollection*) _tmp24_);
			_tmp26_ = _tmp25_;
			_category_name_size = _tmp26_;
			_category_name_index = -1;
			while (TRUE) {
				gint _tmp27_ = 0;
				gint _tmp28_ = 0;
				gint _tmp29_ = 0;
				gchar* category_name = NULL;
				FolksSmallSet* _tmp30_ = NULL;
				gint _tmp31_ = 0;
				gconstpointer _tmp32_ = NULL;
				gchar* _tmp33_ = NULL;
				gboolean _tmp34_ = FALSE;
				FolksPersonaStore* _tmp35_ = NULL;
				FolksPersonaStore* _tmp36_ = NULL;
				gboolean _tmp37_ = FALSE;
				FolksSmallSet* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				gboolean _tmp41_ = FALSE;
				_tmp27_ = _category_name_index;
				_category_name_index = _tmp27_ + 1;
				_tmp28_ = _category_name_index;
				_tmp29_ = _category_name_size;
				if (!(_tmp28_ < _tmp29_)) {
					break;
				}
				_tmp30_ = _category_name_list;
				_tmp31_ = _category_name_index;
				_tmp32_ = folks_small_set_get (_tmp30_, _tmp31_);
				_tmp33_ = g_strdup ((const gchar*) _tmp32_);
				category_name = _tmp33_;
				_tmp35_ = folks_persona_get_store ((FolksPersona*) self);
				_tmp36_ = _tmp35_;
				_tmp37_ = _edsf_persona_store_is_google_contacts_address_book (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore));
				if (_tmp37_) {
					const gchar* _tmp38_ = NULL;
					_tmp38_ = category_name;
					_tmp34_ = g_strcmp0 (_tmp38_, EDSF_PERSONA_STORE_android_favourite_group_name) == 0;
				} else {
					_tmp34_ = FALSE;
				}
				if (_tmp34_) {
					_g_free0 (category_name);
					continue;
				}
				_tmp39_ = new_categories;
				_tmp40_ = category_name;
				_tmp41_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp39_, _tmp40_);
				if (!_tmp41_) {
					any_removed_categories = TRUE;
				}
				_g_free0 (category_name);
			}
			_g_object_unref0 (_category_name_list);
		}
	}
	_tmp42_ = new_categories;
	_tmp43_ = _g_object_ref0 (_tmp42_);
	_g_object_unref0 (self->priv->_groups);
	self->priv->_groups = _tmp43_;
	_tmp44_ = self->priv->_groups;
	_tmp45_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp44_);
	_tmp46_ = _tmp45_;
	_g_object_unref0 (self->priv->_groups_ro);
	self->priv->_groups_ro = _tmp46_;
	_tmp47_ = folks_persona_get_store ((FolksPersona*) self);
	_tmp48_ = _tmp47_;
	_tmp49_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, EDSF_TYPE_PERSONA_STORE, EdsfPersonaStore));
	store = _tmp49_;
	in_google_personal_group = FALSE;
	should_notify_sysgroups = FALSE;
	_tmp50_ = store;
	_tmp51_ = _edsf_persona_store_is_google_contacts_address_book (_tmp50_);
	if (_tmp51_) {
		EVCard* vcard = NULL;
		EContact* _tmp52_ = NULL;
		EContact* _tmp53_ = NULL;
		EVCard* _tmp54_ = NULL;
		EVCardAttribute* attr = NULL;
		EVCard* _tmp55_ = NULL;
		EVCardAttribute* _tmp56_ = NULL;
		EVCardAttribute* _tmp57_ = NULL;
		_tmp52_ = edsf_persona_get_contact (self);
		_tmp53_ = _tmp52_;
		_tmp54_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, e_vcard_get_type (), EVCard));
		vcard = _tmp54_;
		_tmp55_ = vcard;
		_tmp56_ = e_vcard_get_attribute (_tmp55_, "X-GOOGLE-SYSTEM-GROUP-IDS");
		attr = _tmp56_;
		_tmp57_ = attr;
		if (_tmp57_ != NULL) {
			GList* system_group_ids = NULL;
			EVCardAttribute* _tmp58_ = NULL;
			GList* _tmp59_ = NULL;
			FolksSmallSet* new_sysgroups = NULL;
			FolksSmallSet* _tmp60_ = NULL;
			gboolean any_added_sysgroups = FALSE;
			GList* _tmp61_ = NULL;
			gboolean any_removed_sysgroups = FALSE;
			FolksSmallSet* _tmp70_ = NULL;
			FolksSmallSet* _tmp86_ = NULL;
			gboolean _tmp87_ = FALSE;
			FolksSmallSet* _tmp88_ = NULL;
			FolksSmallSet* _tmp89_ = NULL;
			FolksSmallSet* _tmp90_ = NULL;
			GeeSet* _tmp91_ = NULL;
			GeeSet* _tmp92_ = NULL;
			gboolean _tmp93_ = FALSE;
			gboolean _tmp94_ = FALSE;
			_tmp58_ = attr;
			_tmp59_ = e_vcard_attribute_get_values (_tmp58_);
			system_group_ids = _tmp59_;
			_tmp60_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
			new_sysgroups = _tmp60_;
			any_added_sysgroups = FALSE;
			_tmp61_ = system_group_ids;
			{
				GList* system_group_id_collection = NULL;
				GList* system_group_id_it = NULL;
				system_group_id_collection = _tmp61_;
				for (system_group_id_it = system_group_id_collection; system_group_id_it != NULL; system_group_id_it = system_group_id_it->next) {
					gchar* _tmp62_ = NULL;
					gchar* system_group_id = NULL;
					_tmp62_ = g_strdup ((const gchar*) system_group_id_it->data);
					system_group_id = _tmp62_;
					{
						FolksSmallSet* _tmp63_ = NULL;
						const gchar* _tmp64_ = NULL;
						gboolean _tmp65_ = FALSE;
						FolksSmallSet* _tmp66_ = NULL;
						_tmp63_ = new_sysgroups;
						_tmp64_ = system_group_id;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp63_, _tmp64_);
						_tmp66_ = self->priv->_system_groups;
						if (_tmp66_ == NULL) {
							_tmp65_ = TRUE;
						} else {
							FolksSmallSet* _tmp67_ = NULL;
							const gchar* _tmp68_ = NULL;
							gboolean _tmp69_ = FALSE;
							_tmp67_ = self->priv->_system_groups;
							_tmp68_ = system_group_id;
							_tmp69_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp67_, _tmp68_);
							_tmp65_ = !_tmp69_;
						}
						if (_tmp65_) {
							any_added_sysgroups = TRUE;
						}
						_g_free0 (system_group_id);
					}
				}
			}
			any_removed_sysgroups = FALSE;
			_tmp70_ = self->priv->_system_groups;
			if (_tmp70_ != NULL) {
				{
					FolksSmallSet* _system_group_id_list = NULL;
					FolksSmallSet* _tmp71_ = NULL;
					FolksSmallSet* _tmp72_ = NULL;
					gint _system_group_id_size = 0;
					FolksSmallSet* _tmp73_ = NULL;
					gint _tmp74_ = 0;
					gint _tmp75_ = 0;
					gint _system_group_id_index = 0;
					_tmp71_ = self->priv->_system_groups;
					_tmp72_ = _g_object_ref0 (_tmp71_);
					_system_group_id_list = _tmp72_;
					_tmp73_ = _system_group_id_list;
					_tmp74_ = gee_collection_get_size ((GeeCollection*) _tmp73_);
					_tmp75_ = _tmp74_;
					_system_group_id_size = _tmp75_;
					_system_group_id_index = -1;
					while (TRUE) {
						gint _tmp76_ = 0;
						gint _tmp77_ = 0;
						gint _tmp78_ = 0;
						gchar* system_group_id = NULL;
						FolksSmallSet* _tmp79_ = NULL;
						gint _tmp80_ = 0;
						gconstpointer _tmp81_ = NULL;
						gchar* _tmp82_ = NULL;
						FolksSmallSet* _tmp83_ = NULL;
						const gchar* _tmp84_ = NULL;
						gboolean _tmp85_ = FALSE;
						_tmp76_ = _system_group_id_index;
						_system_group_id_index = _tmp76_ + 1;
						_tmp77_ = _system_group_id_index;
						_tmp78_ = _system_group_id_size;
						if (!(_tmp77_ < _tmp78_)) {
							break;
						}
						_tmp79_ = _system_group_id_list;
						_tmp80_ = _system_group_id_index;
						_tmp81_ = folks_small_set_get (_tmp79_, _tmp80_);
						_tmp82_ = g_strdup ((const gchar*) _tmp81_);
						system_group_id = _tmp82_;
						_tmp83_ = new_sysgroups;
						_tmp84_ = system_group_id;
						_tmp85_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp83_, _tmp84_);
						if (!_tmp85_) {
							any_removed_sysgroups = TRUE;
						}
						_g_free0 (system_group_id);
					}
					_g_object_unref0 (_system_group_id_list);
				}
			}
			_tmp86_ = new_sysgroups;
			_tmp87_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp86_, EDSF_PERSONA_GOOGLE_PERSONAL_GROUP_NAME);
			if (_tmp87_) {
				in_google_personal_group = TRUE;
			}
			_tmp88_ = new_sysgroups;
			_tmp89_ = _g_object_ref0 (_tmp88_);
			_g_object_unref0 (self->priv->_system_groups);
			self->priv->_system_groups = _tmp89_;
			_tmp90_ = new_sysgroups;
			_tmp91_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp90_);
			_tmp92_ = _tmp91_;
			_g_object_unref0 (self->priv->_system_groups_ro);
			self->priv->_system_groups_ro = _tmp92_;
			_tmp94_ = any_added_sysgroups;
			if (_tmp94_) {
				_tmp93_ = TRUE;
			} else {
				gboolean _tmp95_ = FALSE;
				_tmp95_ = any_removed_sysgroups;
				_tmp93_ = _tmp95_;
			}
			if (_tmp93_) {
				should_notify_sysgroups = TRUE;
			}
			_g_object_unref0 (new_sysgroups);
		} else {
			FolksSmallSet* _tmp96_ = NULL;
			FolksSmallSet* _tmp97_ = NULL;
			GeeSet* _tmp98_ = NULL;
			GeeSet* _tmp99_ = NULL;
			_tmp96_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
			_g_object_unref0 (self->priv->_system_groups);
			self->priv->_system_groups = _tmp96_;
			_tmp97_ = self->priv->_system_groups;
			_tmp98_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp97_);
			_tmp99_ = _tmp98_;
			_g_object_unref0 (self->priv->_system_groups_ro);
			self->priv->_system_groups_ro = _tmp99_;
		}
		_g_object_unref0 (vcard);
	}
	_tmp100_ = self->priv->_is_favourite;
	old_is_favourite = _tmp100_;
	_tmp101_ = store;
	_tmp102_ = _edsf_persona_store_is_google_contacts_address_book (_tmp101_);
	if (_tmp102_) {
		GList* _tmp103_ = NULL;
		self->priv->_is_favourite = FALSE;
		_tmp103_ = category_names;
		{
			GList* category_name_collection = NULL;
			GList* category_name_it = NULL;
			category_name_collection = _tmp103_;
			for (category_name_it = category_name_collection; category_name_it != NULL; category_name_it = category_name_it->next) {
				gchar* _tmp104_ = NULL;
				gchar* category_name = NULL;
				_tmp104_ = g_strdup ((const gchar*) category_name_it->data);
				category_name = _tmp104_;
				{
					const gchar* _tmp105_ = NULL;
					_tmp105_ = category_name;
					if (g_strcmp0 (_tmp105_, EDSF_PERSONA_STORE_android_favourite_group_name) == 0) {
						self->priv->_is_favourite = TRUE;
					}
					_g_free0 (category_name);
				}
			}
		}
	}
	g_object_freeze_notify ((GObject*) self);
	_tmp108_ = any_added_categories;
	if (_tmp108_) {
		_tmp107_ = TRUE;
	} else {
		gboolean _tmp109_ = FALSE;
		_tmp109_ = any_removed_categories;
		_tmp107_ = _tmp109_;
	}
	if (_tmp107_) {
		gboolean _tmp110_ = FALSE;
		_tmp110_ = emit_notification;
		_tmp106_ = _tmp110_;
	} else {
		_tmp106_ = FALSE;
	}
	if (_tmp106_) {
		g_object_notify ((GObject*) self, "groups");
	}
	_tmp112_ = should_notify_sysgroups;
	if (_tmp112_) {
		gboolean _tmp113_ = FALSE;
		_tmp113_ = emit_notification;
		_tmp111_ = _tmp113_;
	} else {
		_tmp111_ = FALSE;
	}
	if (_tmp111_) {
		g_object_notify ((GObject*) self, "system-groups");
	}
	_tmp115_ = self->priv->_is_favourite;
	_tmp116_ = old_is_favourite;
	if (_tmp115_ != _tmp116_) {
		gboolean _tmp117_ = FALSE;
		_tmp117_ = emit_notification;
		_tmp114_ = _tmp117_;
	} else {
		_tmp114_ = FALSE;
	}
	if (_tmp114_) {
		g_object_notify ((GObject*) self, "is-favourite");
	}
	_tmp118_ = in_google_personal_group;
	_tmp119_ = self->priv->_in_google_personal_group;
	if (_tmp118_ != _tmp119_) {
		gboolean _tmp120_ = FALSE;
		gboolean _tmp121_ = FALSE;
		_tmp120_ = in_google_personal_group;
		self->priv->_in_google_personal_group = _tmp120_;
		_tmp121_ = emit_notification;
		if (_tmp121_) {
			g_object_notify ((GObject*) self, "in-google-personal-group");
		}
	}
	g_object_thaw_notify ((GObject*) self);
	_g_object_unref0 (store);
	_g_object_unref0 (new_categories);
	__g_list_free__g_free0_0 (category_names);
}


/**
   * build a table of im protocols / im protocol aliases
   */
static gpointer _g_hash_table_ref0 (gpointer self) {
	return self ? g_hash_table_ref (self) : NULL;
}


GHashTable* _edsf_persona_get_im_eds_map (void) {
	GHashTable* result = NULL;
	GHashTable* retval = NULL;
	GError * _inner_error_ = NULL;
	{
		GHashTable* _tmp0_ = NULL;
		_tmp0_ = edsf_persona__im_eds_map;
		g_static_rec_mutex_lock (&__lock_edsf_persona__im_eds_map);
		{
			GHashTable* _tmp1_ = NULL;
			GHashTable* _tmp23_ = NULL;
			GHashTable* _tmp24_ = NULL;
			_tmp1_ = edsf_persona__im_eds_map;
			if (_tmp1_ == NULL) {
				GHashTable* table = NULL;
				GHashFunc _tmp2_ = NULL;
				GEqualFunc _tmp3_ = NULL;
				GHashTable* _tmp4_ = NULL;
				GHashTable* _tmp5_ = NULL;
				gchar* _tmp6_ = NULL;
				GHashTable* _tmp7_ = NULL;
				gchar* _tmp8_ = NULL;
				GHashTable* _tmp9_ = NULL;
				gchar* _tmp10_ = NULL;
				GHashTable* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				GHashTable* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				GHashTable* _tmp15_ = NULL;
				gchar* _tmp16_ = NULL;
				GHashTable* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				GHashTable* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				GHashTable* _tmp21_ = NULL;
				GHashTable* _tmp22_ = NULL;
				_tmp2_ = g_str_hash;
				_tmp3_ = g_str_equal;
				_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, NULL);
				table = _tmp4_;
				_tmp5_ = table;
				_tmp6_ = g_strdup ("aim");
				g_hash_table_insert (_tmp5_, _tmp6_, (gpointer) ((gintptr) E_CONTACT_IM_AIM));
				_tmp7_ = table;
				_tmp8_ = g_strdup ("yahoo");
				g_hash_table_insert (_tmp7_, _tmp8_, (gpointer) ((gintptr) E_CONTACT_IM_YAHOO));
				_tmp9_ = table;
				_tmp10_ = g_strdup ("groupwise");
				g_hash_table_insert (_tmp9_, _tmp10_, (gpointer) ((gintptr) E_CONTACT_IM_GROUPWISE));
				_tmp11_ = table;
				_tmp12_ = g_strdup ("jabber");
				g_hash_table_insert (_tmp11_, _tmp12_, (gpointer) ((gintptr) E_CONTACT_IM_JABBER));
				_tmp13_ = table;
				_tmp14_ = g_strdup ("msn");
				g_hash_table_insert (_tmp13_, _tmp14_, (gpointer) ((gintptr) E_CONTACT_IM_MSN));
				_tmp15_ = table;
				_tmp16_ = g_strdup ("icq");
				g_hash_table_insert (_tmp15_, _tmp16_, (gpointer) ((gintptr) E_CONTACT_IM_ICQ));
				_tmp17_ = table;
				_tmp18_ = g_strdup ("gadugadu");
				g_hash_table_insert (_tmp17_, _tmp18_, (gpointer) ((gintptr) E_CONTACT_IM_GADUGADU));
				_tmp19_ = table;
				_tmp20_ = g_strdup ("skype");
				g_hash_table_insert (_tmp19_, _tmp20_, (gpointer) ((gintptr) E_CONTACT_IM_SKYPE));
				_tmp21_ = table;
				_tmp22_ = _g_hash_table_ref0 (_tmp21_);
				_g_hash_table_unref0 (edsf_persona__im_eds_map);
				edsf_persona__im_eds_map = _tmp22_;
				_g_hash_table_unref0 (table);
			}
			_tmp23_ = edsf_persona__im_eds_map;
			_tmp24_ = _g_hash_table_ref0 ((GHashTable*) _tmp23_);
			_g_hash_table_unref0 (retval);
			retval = _tmp24_;
		}
		__finally2:
		{
			GHashTable* _tmp25_ = NULL;
			_tmp25_ = edsf_persona__im_eds_map;
			g_static_rec_mutex_unlock (&__lock_edsf_persona__im_eds_map);
		}
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_hash_table_unref0 (retval);
			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 NULL;
		}
	}
	result = retval;
	return result;
}


static void _edsf_persona_update_phones (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	FolksSmallSet* new_phone_numbers = NULL;
	FolksSmallSet* _tmp8_ = NULL;
	GList* attrs = NULL;
	EContact* _tmp9_ = NULL;
	EContact* _tmp10_ = NULL;
	GList* _tmp11_ = NULL;
	GList* _tmp12_ = NULL;
	FolksSmallSet* _tmp25_ = NULL;
	FolksSmallSet* _tmp26_ = NULL;
	gboolean _tmp27_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_phone_numbers;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_object_notify ((GObject*) self, "phone-numbers");
		return;
	} else {
		FolksSmallSet* _tmp3_ = NULL;
		_tmp3_ = self->priv->_phone_numbers;
		if (_tmp3_ == NULL) {
			FolksSmallSet* _tmp4_ = NULL;
			FolksSmallSet* _tmp5_ = NULL;
			GeeSet* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			_tmp4_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_phone_numbers);
			self->priv->_phone_numbers = _tmp4_;
			_tmp5_ = self->priv->_phone_numbers;
			_tmp6_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp5_);
			_tmp7_ = _tmp6_;
			_g_object_unref0 (self->priv->_phone_numbers_ro);
			self->priv->_phone_numbers_ro = _tmp7_;
		}
	}
	_tmp8_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_phone_numbers = _tmp8_;
	_tmp9_ = edsf_persona_get_contact (self);
	_tmp10_ = _tmp9_;
	_tmp11_ = e_contact_get_attributes (_tmp10_, E_CONTACT_TEL);
	attrs = _tmp11_;
	_tmp12_ = attrs;
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp12_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* _tmp13_ = NULL;
			EVCardAttribute* attr = NULL;
			_tmp13_ = __vala_EVCardAttribute_copy0 ((EVCardAttribute*) attr_it->data);
			attr = _tmp13_;
			{
				gchar* val = NULL;
				EVCardAttribute* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				gboolean _tmp16_ = FALSE;
				const gchar* _tmp17_ = NULL;
				FolksPhoneFieldDetails* phone_fd = NULL;
				const gchar* _tmp19_ = NULL;
				FolksPhoneFieldDetails* _tmp20_ = NULL;
				FolksPhoneFieldDetails* _tmp21_ = NULL;
				EVCardAttribute* _tmp22_ = NULL;
				FolksSmallSet* _tmp23_ = NULL;
				FolksPhoneFieldDetails* _tmp24_ = NULL;
				_tmp14_ = attr;
				_tmp15_ = e_vcard_attribute_get_value (_tmp14_);
				val = _tmp15_;
				_tmp17_ = val;
				if (_tmp17_ == NULL) {
					_tmp16_ = TRUE;
				} else {
					const gchar* _tmp18_ = NULL;
					_tmp18_ = val;
					_tmp16_ = g_strcmp0 ((const gchar*) _tmp18_, "") == 0;
				}
				if (_tmp16_) {
					_g_free0 (val);
					__vala_EVCardAttribute_free0 (attr);
					continue;
				}
				_tmp19_ = val;
				_tmp20_ = folks_phone_field_details_new ((const gchar*) _tmp19_, NULL);
				phone_fd = _tmp20_;
				_tmp21_ = phone_fd;
				_tmp22_ = attr;
				_edsf_persona_update_params (self, (FolksAbstractFieldDetails*) _tmp21_, _tmp22_);
				_tmp23_ = new_phone_numbers;
				_tmp24_ = phone_fd;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp23_, _tmp24_);
				_g_object_unref0 (phone_fd);
				_g_free0 (val);
				__vala_EVCardAttribute_free0 (attr);
			}
		}
	}
	_tmp25_ = self->priv->_phone_numbers;
	_tmp26_ = new_phone_numbers;
	_tmp27_ = folks_utils_set_string_afd_equal ((GeeSet*) _tmp25_, (GeeSet*) _tmp26_);
	if (!_tmp27_) {
		FolksSmallSet* _tmp28_ = NULL;
		FolksSmallSet* _tmp29_ = NULL;
		FolksSmallSet* _tmp30_ = NULL;
		GeeSet* _tmp31_ = NULL;
		GeeSet* _tmp32_ = NULL;
		gboolean _tmp33_ = FALSE;
		_tmp28_ = new_phone_numbers;
		_tmp29_ = _g_object_ref0 (_tmp28_);
		_g_object_unref0 (self->priv->_phone_numbers);
		self->priv->_phone_numbers = _tmp29_;
		_tmp30_ = new_phone_numbers;
		_tmp31_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp30_);
		_tmp32_ = _tmp31_;
		_g_object_unref0 (self->priv->_phone_numbers_ro);
		self->priv->_phone_numbers_ro = _tmp32_;
		_tmp33_ = emit_notification;
		if (_tmp33_) {
			g_object_notify ((GObject*) self, "phone-numbers");
		}
	}
	__g_list_free___vala_EVCardAttribute_free0_0 (attrs);
	_g_object_unref0 (new_phone_numbers);
}


static FolksPostalAddress* _edsf_persona_postal_address_from_attribute (EdsfPersona* self, EVCardAttribute* attr) {
	FolksPostalAddress* result = NULL;
	GList* values = NULL;
	EVCardAttribute* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* l = NULL;
	GList* _tmp2_ = NULL;
	gchar* address_format = NULL;
	gchar* _tmp3_ = NULL;
	gchar* po_box = NULL;
	gchar* _tmp4_ = NULL;
	gchar* extension = NULL;
	gchar* _tmp5_ = NULL;
	gchar* street = NULL;
	gchar* _tmp6_ = NULL;
	gchar* locality = NULL;
	gchar* _tmp7_ = NULL;
	gchar* region = NULL;
	gchar* _tmp8_ = NULL;
	gchar* postal_code = NULL;
	gchar* _tmp9_ = NULL;
	gchar* country = NULL;
	gchar* _tmp10_ = NULL;
	GList* _tmp11_ = NULL;
	GList* _tmp17_ = NULL;
	GList* _tmp23_ = NULL;
	GList* _tmp29_ = NULL;
	GList* _tmp35_ = NULL;
	GList* _tmp41_ = NULL;
	GList* _tmp47_ = NULL;
	const gchar* _tmp53_ = NULL;
	const gchar* _tmp54_ = NULL;
	const gchar* _tmp55_ = NULL;
	const gchar* _tmp56_ = NULL;
	const gchar* _tmp57_ = NULL;
	const gchar* _tmp58_ = NULL;
	const gchar* _tmp59_ = NULL;
	const gchar* _tmp60_ = NULL;
	FolksPostalAddress* _tmp61_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (attr != NULL, NULL);
	_tmp0_ = attr;
	_tmp1_ = e_vcard_attribute_get_values (_tmp0_);
	values = _tmp1_;
	_tmp2_ = values;
	l = _tmp2_;
	_tmp3_ = g_strdup ("");
	address_format = _tmp3_;
	_tmp4_ = g_strdup ("");
	po_box = _tmp4_;
	_tmp5_ = g_strdup ("");
	extension = _tmp5_;
	_tmp6_ = g_strdup ("");
	street = _tmp6_;
	_tmp7_ = g_strdup ("");
	locality = _tmp7_;
	_tmp8_ = g_strdup ("");
	region = _tmp8_;
	_tmp9_ = g_strdup ("");
	postal_code = _tmp9_;
	_tmp10_ = g_strdup ("");
	country = _tmp10_;
	_tmp11_ = l;
	if (_tmp11_ != NULL) {
		GList* _tmp12_ = NULL;
		gconstpointer _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		GList* _tmp15_ = NULL;
		GList* _tmp16_ = NULL;
		_tmp12_ = l;
		_tmp13_ = ((GList*) _tmp12_)->data;
		_tmp14_ = g_strdup ((const gchar*) _tmp13_);
		_g_free0 (po_box);
		po_box = _tmp14_;
		_tmp15_ = l;
		_tmp16_ = ((GList*) _tmp15_)->next;
		l = _tmp16_;
	}
	_tmp17_ = l;
	if (_tmp17_ != NULL) {
		GList* _tmp18_ = NULL;
		gconstpointer _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		GList* _tmp21_ = NULL;
		GList* _tmp22_ = NULL;
		_tmp18_ = l;
		_tmp19_ = ((GList*) _tmp18_)->data;
		_tmp20_ = g_strdup ((const gchar*) _tmp19_);
		_g_free0 (extension);
		extension = _tmp20_;
		_tmp21_ = l;
		_tmp22_ = ((GList*) _tmp21_)->next;
		l = _tmp22_;
	}
	_tmp23_ = l;
	if (_tmp23_ != NULL) {
		GList* _tmp24_ = NULL;
		gconstpointer _tmp25_ = NULL;
		gchar* _tmp26_ = NULL;
		GList* _tmp27_ = NULL;
		GList* _tmp28_ = NULL;
		_tmp24_ = l;
		_tmp25_ = ((GList*) _tmp24_)->data;
		_tmp26_ = g_strdup ((const gchar*) _tmp25_);
		_g_free0 (street);
		street = _tmp26_;
		_tmp27_ = l;
		_tmp28_ = ((GList*) _tmp27_)->next;
		l = _tmp28_;
	}
	_tmp29_ = l;
	if (_tmp29_ != NULL) {
		GList* _tmp30_ = NULL;
		gconstpointer _tmp31_ = NULL;
		gchar* _tmp32_ = NULL;
		GList* _tmp33_ = NULL;
		GList* _tmp34_ = NULL;
		_tmp30_ = l;
		_tmp31_ = ((GList*) _tmp30_)->data;
		_tmp32_ = g_strdup ((const gchar*) _tmp31_);
		_g_free0 (locality);
		locality = _tmp32_;
		_tmp33_ = l;
		_tmp34_ = ((GList*) _tmp33_)->next;
		l = _tmp34_;
	}
	_tmp35_ = l;
	if (_tmp35_ != NULL) {
		GList* _tmp36_ = NULL;
		gconstpointer _tmp37_ = NULL;
		gchar* _tmp38_ = NULL;
		GList* _tmp39_ = NULL;
		GList* _tmp40_ = NULL;
		_tmp36_ = l;
		_tmp37_ = ((GList*) _tmp36_)->data;
		_tmp38_ = g_strdup ((const gchar*) _tmp37_);
		_g_free0 (region);
		region = _tmp38_;
		_tmp39_ = l;
		_tmp40_ = ((GList*) _tmp39_)->next;
		l = _tmp40_;
	}
	_tmp41_ = l;
	if (_tmp41_ != NULL) {
		GList* _tmp42_ = NULL;
		gconstpointer _tmp43_ = NULL;
		gchar* _tmp44_ = NULL;
		GList* _tmp45_ = NULL;
		GList* _tmp46_ = NULL;
		_tmp42_ = l;
		_tmp43_ = ((GList*) _tmp42_)->data;
		_tmp44_ = g_strdup ((const gchar*) _tmp43_);
		_g_free0 (postal_code);
		postal_code = _tmp44_;
		_tmp45_ = l;
		_tmp46_ = ((GList*) _tmp45_)->next;
		l = _tmp46_;
	}
	_tmp47_ = l;
	if (_tmp47_ != NULL) {
		GList* _tmp48_ = NULL;
		gconstpointer _tmp49_ = NULL;
		gchar* _tmp50_ = NULL;
		GList* _tmp51_ = NULL;
		GList* _tmp52_ = NULL;
		_tmp48_ = l;
		_tmp49_ = ((GList*) _tmp48_)->data;
		_tmp50_ = g_strdup ((const gchar*) _tmp49_);
		_g_free0 (country);
		country = _tmp50_;
		_tmp51_ = l;
		_tmp52_ = ((GList*) _tmp51_)->next;
		l = _tmp52_;
	}
	_tmp53_ = po_box;
	_tmp54_ = extension;
	_tmp55_ = street;
	_tmp56_ = locality;
	_tmp57_ = region;
	_tmp58_ = postal_code;
	_tmp59_ = country;
	_tmp60_ = address_format;
	_tmp61_ = folks_postal_address_new (_tmp53_, _tmp54_, _tmp55_, _tmp56_, _tmp57_, _tmp58_, _tmp59_, _tmp60_, NULL);
	result = _tmp61_;
	_g_free0 (country);
	_g_free0 (postal_code);
	_g_free0 (region);
	_g_free0 (locality);
	_g_free0 (street);
	_g_free0 (extension);
	_g_free0 (po_box);
	_g_free0 (address_format);
	return result;
}


static void _edsf_persona_update_addresses (EdsfPersona* self, gboolean create_if_not_exist, gboolean emit_notification) {
	gboolean _tmp0_ = FALSE;
	FolksSmallSet* _tmp1_ = NULL;
	FolksSmallSet* new_postal_addresses = NULL;
	FolksSmallSet* _tmp9_ = NULL;
	GList* attrs = NULL;
	EContact* _tmp10_ = NULL;
	EContact* _tmp11_ = NULL;
	GList* _tmp12_ = NULL;
	GList* _tmp13_ = NULL;
	FolksSmallSet* _tmp24_ = NULL;
	FolksSmallSet* _tmp25_ = NULL;
	gboolean _tmp26_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_postal_addresses;
	if (_tmp1_ == NULL) {
		gboolean _tmp2_ = FALSE;
		_tmp2_ = create_if_not_exist;
		_tmp0_ = _tmp2_ == FALSE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = emit_notification;
		if (_tmp3_) {
			g_object_notify ((GObject*) self, "postal-addresses");
		}
		return;
	} else {
		FolksSmallSet* _tmp4_ = NULL;
		_tmp4_ = self->priv->_postal_addresses;
		if (_tmp4_ == NULL) {
			FolksSmallSet* _tmp5_ = NULL;
			FolksSmallSet* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			GeeSet* _tmp8_ = NULL;
			_tmp5_ = folks_small_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_postal_addresses);
			self->priv->_postal_addresses = _tmp5_;
			_tmp6_ = self->priv->_postal_addresses;
			_tmp7_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp6_);
			_tmp8_ = _tmp7_;
			_g_object_unref0 (self->priv->_postal_addresses_ro);
			self->priv->_postal_addresses_ro = _tmp8_;
		}
	}
	_tmp9_ = folks_small_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	new_postal_addresses = _tmp9_;
	_tmp10_ = edsf_persona_get_contact (self);
	_tmp11_ = _tmp10_;
	_tmp12_ = e_contact_get_attributes (_tmp11_, E_CONTACT_ADDRESS);
	attrs = _tmp12_;
	_tmp13_ = attrs;
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp13_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* attr = NULL;
			attr = (EVCardAttribute*) attr_it->data;
			{
				FolksPostalAddress* address = NULL;
				EVCardAttribute* _tmp14_ = NULL;
				FolksPostalAddress* _tmp15_ = NULL;
				FolksPostalAddress* _tmp16_ = NULL;
				gboolean _tmp17_ = FALSE;
				FolksPostalAddressFieldDetails* pa_fd = NULL;
				FolksPostalAddress* _tmp18_ = NULL;
				FolksPostalAddressFieldDetails* _tmp19_ = NULL;
				FolksPostalAddressFieldDetails* _tmp20_ = NULL;
				EVCardAttribute* _tmp21_ = NULL;
				FolksSmallSet* _tmp22_ = NULL;
				FolksPostalAddressFieldDetails* _tmp23_ = NULL;
				_tmp14_ = attr;
				_tmp15_ = _edsf_persona_postal_address_from_attribute (self, _tmp14_);
				address = _tmp15_;
				_tmp16_ = address;
				_tmp17_ = folks_postal_address_is_empty (_tmp16_);
				if (_tmp17_) {
					_g_object_unref0 (address);
					continue;
				}
				_tmp18_ = address;
				_tmp19_ = folks_postal_address_field_details_new (_tmp18_, NULL);
				pa_fd = _tmp19_;
				_tmp20_ = pa_fd;
				_tmp21_ = attr;
				_edsf_persona_update_params (self, (FolksAbstractFieldDetails*) _tmp20_, _tmp21_);
				_tmp22_ = new_postal_addresses;
				_tmp23_ = pa_fd;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
				_g_object_unref0 (pa_fd);
				_g_object_unref0 (address);
			}
		}
	}
	_tmp24_ = new_postal_addresses;
	_tmp25_ = self->priv->_postal_addresses;
	_tmp26_ = folks_internal_equal_sets (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeSet*) _tmp24_, (GeeSet*) _tmp25_);
	if (!_tmp26_) {
		FolksSmallSet* _tmp27_ = NULL;
		FolksSmallSet* _tmp28_ = NULL;
		FolksSmallSet* _tmp29_ = NULL;
		GeeSet* _tmp30_ = NULL;
		GeeSet* _tmp31_ = NULL;
		gboolean _tmp32_ = FALSE;
		_tmp27_ = new_postal_addresses;
		_tmp28_ = _g_object_ref0 (_tmp27_);
		_g_object_unref0 (self->priv->_postal_addresses);
		self->priv->_postal_addresses = _tmp28_;
		_tmp29_ = new_postal_addresses;
		_tmp30_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp29_);
		_tmp31_ = _tmp30_;
		_g_object_unref0 (self->priv->_postal_addresses_ro);
		self->priv->_postal_addresses_ro = _tmp31_;
		_tmp32_ = emit_notification;
		if (_tmp32_) {
			g_object_notify ((GObject*) self, "postal-addresses");
		}
	}
	__g_list_free___vala_EVCardAttribute_free0_0 (attrs);
	_g_object_unref0 (new_postal_addresses);
}


static void _edsf_persona_update_local_ids (EdsfPersona* self) {
	FolksSmallSet* new_local_ids = NULL;
	FolksSmallSet* _tmp0_ = NULL;
	EVCardAttribute* ids = NULL;
	EContact* _tmp1_ = NULL;
	EContact* _tmp2_ = NULL;
	EVCardAttribute* _tmp3_ = NULL;
	EVCardAttribute* _tmp4_ = NULL;
	EVCardAttribute* _tmp5_ = NULL;
	FolksSmallSet* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	FolksSmallSet* _tmp16_ = NULL;
	GeeSet* _tmp17_ = NULL;
	GeeSet* _tmp18_ = NULL;
	gboolean _tmp19_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	new_local_ids = _tmp0_;
	_tmp1_ = edsf_persona_get_contact (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = e_vcard_get_attribute ((EVCard*) _tmp2_, "X-FOLKS-CONTACTS-IDS");
	_tmp4_ = __vala_EVCardAttribute_copy0 (_tmp3_);
	ids = _tmp4_;
	_tmp5_ = ids;
	if (_tmp5_ != NULL) {
		GList* ids_v = NULL;
		EVCardAttribute* _tmp6_ = NULL;
		GList* _tmp7_ = NULL;
		GList* _tmp8_ = NULL;
		_tmp6_ = ids;
		_tmp7_ = e_vcard_attribute_get_values ((EVCardAttribute*) _tmp6_);
		ids_v = _tmp7_;
		_tmp8_ = ids_v;
		{
			GList* local_id_collection = NULL;
			GList* local_id_it = NULL;
			local_id_collection = _tmp8_;
			for (local_id_it = local_id_collection; local_id_it != NULL; local_id_it = local_id_it->next) {
				gchar* _tmp9_ = NULL;
				gchar* local_id = NULL;
				_tmp9_ = g_strdup ((const gchar*) local_id_it->data);
				local_id = _tmp9_;
				{
					const gchar* _tmp10_ = NULL;
					_tmp10_ = local_id;
					if (g_strcmp0 (_tmp10_, "") != 0) {
						FolksSmallSet* _tmp11_ = NULL;
						const gchar* _tmp12_ = NULL;
						_tmp11_ = new_local_ids;
						_tmp12_ = local_id;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, _tmp12_);
					}
					_g_free0 (local_id);
				}
			}
		}
	}
	_tmp13_ = new_local_ids;
	_tmp14_ = folks_persona_get_iid ((FolksPersona*) self);
	_tmp15_ = _tmp14_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp15_);
	_tmp16_ = new_local_ids;
	_tmp17_ = folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) self);
	_tmp18_ = _tmp17_;
	_tmp19_ = folks_internal_equal_sets (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, (GeeSet*) _tmp16_, _tmp18_);
	if (!_tmp19_) {
		FolksSmallSet* _tmp20_ = NULL;
		FolksSmallSet* _tmp21_ = NULL;
		FolksSmallSet* _tmp22_ = NULL;
		GeeSet* _tmp23_ = NULL;
		GeeSet* _tmp24_ = NULL;
		_tmp20_ = new_local_ids;
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (self->priv->_local_ids);
		self->priv->_local_ids = _tmp21_;
		_tmp22_ = self->priv->_local_ids;
		_tmp23_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp22_);
		_tmp24_ = _tmp23_;
		_g_object_unref0 (self->priv->_local_ids_ro);
		self->priv->_local_ids_ro = _tmp24_;
		g_object_notify ((GObject*) self, "local-ids");
	}
	__vala_EVCardAttribute_free0 (ids);
	_g_object_unref0 (new_local_ids);
}


static EContactGeo* _vala_EContactGeo_copy (EContactGeo* self) {
	return g_boxed_copy (e_contact_geo_get_type (), self);
}


static void _vala_EContactGeo_free (EContactGeo* self) {
	g_boxed_free (e_contact_geo_get_type (), self);
}


static void _edsf_persona_update_location (EdsfPersona* self) {
	EContactGeo* _geo = NULL;
	gpointer _tmp0_ = NULL;
	EContactGeo* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = _edsf_persona_get_property (self, e_contact_geo_get_type (), (GBoxedCopyFunc) _vala_EContactGeo_copy, _vala_EContactGeo_free, "geo");
	_geo = (EContactGeo*) _tmp0_;
	_tmp1_ = _geo;
	if (_tmp1_ != NULL) {
		gboolean _tmp2_ = FALSE;
		FolksLocation* _tmp3_ = NULL;
		_tmp3_ = self->priv->_location;
		if (_tmp3_ == NULL) {
			_tmp2_ = TRUE;
		} else {
			FolksLocation* _tmp4_ = NULL;
			EContactGeo* _tmp5_ = NULL;
			gdouble _tmp6_ = 0.0;
			EContactGeo* _tmp7_ = NULL;
			gdouble _tmp8_ = 0.0;
			gboolean _tmp9_ = FALSE;
			_tmp4_ = self->priv->_location;
			_tmp5_ = _geo;
			_tmp6_ = _tmp5_->latitude;
			_tmp7_ = _geo;
			_tmp8_ = _tmp7_->longitude;
			_tmp9_ = folks_location_equal_coordinates (_tmp4_, _tmp6_, _tmp8_);
			_tmp2_ = !_tmp9_;
		}
		if (_tmp2_) {
			FolksLocation* _tmp10_ = NULL;
			_tmp10_ = self->priv->_location;
			if (_tmp10_ != NULL) {
				FolksLocation* _tmp11_ = NULL;
				EContactGeo* _tmp12_ = NULL;
				gdouble _tmp13_ = 0.0;
				FolksLocation* _tmp14_ = NULL;
				EContactGeo* _tmp15_ = NULL;
				gdouble _tmp16_ = 0.0;
				_tmp11_ = self->priv->_location;
				_tmp12_ = _geo;
				_tmp13_ = _tmp12_->latitude;
				_tmp11_->latitude = _tmp13_;
				_tmp14_ = self->priv->_location;
				_tmp15_ = _geo;
				_tmp16_ = _tmp15_->longitude;
				_tmp14_->longitude = _tmp16_;
			} else {
				EContactGeo* _tmp17_ = NULL;
				gdouble _tmp18_ = 0.0;
				EContactGeo* _tmp19_ = NULL;
				gdouble _tmp20_ = 0.0;
				FolksLocation* _tmp21_ = NULL;
				_tmp17_ = _geo;
				_tmp18_ = _tmp17_->latitude;
				_tmp19_ = _geo;
				_tmp20_ = _tmp19_->longitude;
				_tmp21_ = folks_location_new (_tmp18_, _tmp20_);
				_g_object_unref0 (self->priv->_location);
				self->priv->_location = _tmp21_;
			}
			g_object_notify ((GObject*) self, "location");
		}
	} else {
		FolksLocation* _tmp22_ = NULL;
		_tmp22_ = self->priv->_location;
		if (_tmp22_ != NULL) {
			_g_object_unref0 (self->priv->_location);
			self->priv->_location = NULL;
			g_object_notify ((GObject*) self, "location");
		}
	}
	__vala_EContactGeo_free0 (_geo);
}


static void _edsf_persona_update_favourite (EdsfPersona* self) {
	gboolean is_fav = FALSE;
	EVCardAttribute* fav = NULL;
	EContact* _tmp0_ = NULL;
	EContact* _tmp1_ = NULL;
	EVCardAttribute* _tmp2_ = NULL;
	EVCardAttribute* _tmp3_ = NULL;
	EVCardAttribute* _tmp4_ = NULL;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	g_return_if_fail (self != NULL);
	is_fav = FALSE;
	_tmp0_ = edsf_persona_get_contact (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = e_vcard_get_attribute ((EVCard*) _tmp1_, "X-FOLKS-FAVOURITE");
	_tmp3_ = __vala_EVCardAttribute_copy0 (_tmp2_);
	fav = _tmp3_;
	_tmp4_ = fav;
	if (_tmp4_ != NULL) {
		gchar* val = NULL;
		EVCardAttribute* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
		const gchar* _tmp8_ = NULL;
		_tmp5_ = fav;
		_tmp6_ = e_vcard_attribute_get_value ((EVCardAttribute*) _tmp5_);
		val = _tmp6_;
		_tmp8_ = val;
		if (_tmp8_ != NULL) {
			const gchar* _tmp9_ = NULL;
			gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			_tmp9_ = val;
			_tmp10_ = g_utf8_strdown ((const gchar*) _tmp9_, (gssize) -1);
			_tmp11_ = _tmp10_;
			_tmp7_ = g_strcmp0 (_tmp11_, "true") == 0;
			_g_free0 (_tmp11_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			is_fav = TRUE;
		}
		_g_free0 (val);
	}
	_tmp12_ = is_fav;
	_tmp13_ = self->priv->_is_favourite;
	if (_tmp12_ != _tmp13_) {
		gboolean _tmp14_ = FALSE;
		_tmp14_ = is_fav;
		self->priv->_is_favourite = _tmp14_;
		g_object_notify ((GObject*) self, "is-favourite");
	}
	__vala_EVCardAttribute_free0 (fav);
}


static void _edsf_persona_update_anti_links (EdsfPersona* self) {
	FolksSmallSet* new_anti_links = NULL;
	FolksSmallSet* _tmp0_ = NULL;
	EVCard* vcard = NULL;
	EContact* _tmp1_ = NULL;
	EContact* _tmp2_ = NULL;
	EVCard* _tmp3_ = NULL;
	EVCard* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
	FolksSmallSet* _tmp15_ = NULL;
	FolksSmallSet* _tmp16_ = NULL;
	gboolean _tmp17_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	new_anti_links = _tmp0_;
	_tmp1_ = edsf_persona_get_contact (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, e_vcard_get_type (), EVCard));
	vcard = _tmp3_;
	_tmp4_ = vcard;
	_tmp5_ = e_vcard_get_attributes (_tmp4_);
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp5_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			EVCardAttribute* attr = NULL;
			attr = (EVCardAttribute*) attr_it->data;
			{
				EVCardAttribute* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
				gchar* val = NULL;
				EVCardAttribute* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				gboolean _tmp10_ = FALSE;
				const gchar* _tmp11_ = NULL;
				FolksSmallSet* _tmp13_ = NULL;
				const gchar* _tmp14_ = NULL;
				_tmp6_ = attr;
				_tmp7_ = e_vcard_attribute_get_name (_tmp6_);
				if (g_strcmp0 (_tmp7_, EDSF_PERSONA_STORE_anti_links_attribute_name) != 0) {
					continue;
				}
				_tmp8_ = attr;
				_tmp9_ = e_vcard_attribute_get_value (_tmp8_);
				val = _tmp9_;
				_tmp11_ = val;
				if (_tmp11_ == NULL) {
					_tmp10_ = TRUE;
				} else {
					const gchar* _tmp12_ = NULL;
					_tmp12_ = val;
					_tmp10_ = g_strcmp0 ((const gchar*) _tmp12_, "") == 0;
				}
				if (_tmp10_) {
					_g_free0 (val);
					continue;
				}
				_tmp13_ = new_anti_links;
				_tmp14_ = val;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, (const gchar*) _tmp14_);
				_g_free0 (val);
			}
		}
	}
	_tmp15_ = new_anti_links;
	_tmp16_ = self->priv->_anti_links;
	_tmp17_ = folks_internal_equal_sets (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, (GeeSet*) _tmp15_, (GeeSet*) _tmp16_);
	if (!_tmp17_) {
		FolksSmallSet* _tmp18_ = NULL;
		FolksSmallSet* _tmp19_ = NULL;
		FolksSmallSet* _tmp20_ = NULL;
		GeeSet* _tmp21_ = NULL;
		GeeSet* _tmp22_ = NULL;
		_tmp18_ = new_anti_links;
		_tmp19_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (self->priv->_anti_links);
		self->priv->_anti_links = _tmp19_;
		_tmp20_ = new_anti_links;
		_tmp21_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp20_);
		_tmp22_ = _tmp21_;
		_g_object_unref0 (self->priv->_anti_links_ro);
		self->priv->_anti_links_ro = _tmp22_;
		g_object_notify ((GObject*) self, "anti-links");
	}
	_g_object_unref0 (vcard);
	_g_object_unref0 (new_anti_links);
}


gpointer _edsf_persona_get_property_from_contact (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, EContact* contact, const gchar* prop_name) {
	gpointer result = NULL;
	gpointer prop_value = NULL;
	EContact* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	EContactField _tmp2_ = 0;
	gpointer _tmp3_ = NULL;
	g_return_val_if_fail (contact != NULL, NULL);
	g_return_val_if_fail (prop_name != NULL, NULL);
	prop_value = NULL;
	_tmp0_ = contact;
	_tmp1_ = prop_name;
	_tmp2_ = e_contact_field_id (_tmp1_);
	_tmp3_ = e_contact_get (_tmp0_, _tmp2_);
	_t_destroy_func0 (prop_value);
	prop_value = _tmp3_;
	result = prop_value;
	return result;
}


static gpointer _edsf_persona_get_property (EdsfPersona* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* prop_name) {
	gpointer result = NULL;
	EContact* _tmp0_ = NULL;
	EContact* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gpointer _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (prop_name != NULL, NULL);
	_tmp0_ = edsf_persona_get_contact (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = prop_name;
	_tmp3_ = _edsf_persona_get_property_from_contact (t_type, (GBoxedCopyFunc) t_dup_func, t_destroy_func, _tmp1_, _tmp2_);
	result = _tmp3_;
	return result;
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = needle;
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_ = NULL;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar* _edsf_persona_im_proto_from_addr (EdsfPersona* self, const gchar* addr) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gchar** tokens = NULL;
	const gchar* _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gint tokens_length1 = 0;
	gint _tokens_size_ = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gchar* domain = NULL;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	const gchar* _tmp11_ = NULL;
	gchar** _tmp12_ = NULL;
	gchar** _tmp13_ = NULL;
	gchar** _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
	gchar** _tmp15_ = NULL;
	gint _tmp15__length1 = 0;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp20_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (addr != NULL, NULL);
	_tmp0_ = addr;
	_tmp1_ = string_index_of (_tmp0_, "@", 0);
	if (_tmp1_ == -1) {
		result = NULL;
		return result;
	}
	_tmp2_ = addr;
	_tmp4_ = _tmp3_ = g_strsplit (_tmp2_, "@", 2);
	tokens = _tmp4_;
	tokens_length1 = _vala_array_length (_tmp3_);
	_tokens_size_ = tokens_length1;
	_tmp5_ = tokens;
	_tmp5__length1 = tokens_length1;
	if (_tmp5__length1 != 2) {
		result = NULL;
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	_tmp6_ = tokens;
	_tmp6__length1 = tokens_length1;
	_tmp7_ = _tmp6_[1];
	_tmp8_ = g_strdup (_tmp7_);
	domain = _tmp8_;
	_tmp9_ = domain;
	_tmp10_ = string_index_of (_tmp9_, ".", 0);
	if (_tmp10_ == -1) {
		result = NULL;
		_g_free0 (domain);
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	_tmp11_ = domain;
	_tmp13_ = _tmp12_ = g_strsplit (_tmp11_, ".", 2);
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	tokens = _tmp13_;
	tokens_length1 = _vala_array_length (_tmp12_);
	_tokens_size_ = tokens_length1;
	_tmp14_ = tokens;
	_tmp14__length1 = tokens_length1;
	if (_tmp14__length1 != 2) {
		result = NULL;
		_g_free0 (domain);
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	_tmp15_ = tokens;
	_tmp15__length1 = tokens_length1;
	_tmp16_ = _tmp15_[0];
	_tmp17_ = g_strdup (_tmp16_);
	_g_free0 (domain);
	domain = _tmp17_;
	_tmp20_ = domain;
	if (g_strcmp0 (_tmp20_, "msn") == 0) {
		_tmp19_ = TRUE;
	} else {
		const gchar* _tmp21_ = NULL;
		_tmp21_ = domain;
		_tmp19_ = g_strcmp0 (_tmp21_, "hotmail") == 0;
	}
	if (_tmp19_) {
		_tmp18_ = TRUE;
	} else {
		const gchar* _tmp22_ = NULL;
		_tmp22_ = domain;
		_tmp18_ = g_strcmp0 (_tmp22_, "live") == 0;
	}
	if (_tmp18_) {
		gchar* _tmp23_ = NULL;
		_tmp23_ = g_strdup ("msn");
		result = _tmp23_;
		_g_free0 (domain);
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
		return result;
	} else {
		gboolean _tmp24_ = FALSE;
		const gchar* _tmp25_ = NULL;
		_tmp25_ = domain;
		if (g_strcmp0 (_tmp25_, "gmail") == 0) {
			_tmp24_ = TRUE;
		} else {
			const gchar* _tmp26_ = NULL;
			_tmp26_ = domain;
			_tmp24_ = g_strcmp0 (_tmp26_, "googlemail") == 0;
		}
		if (_tmp24_) {
			gchar* _tmp27_ = NULL;
			_tmp27_ = g_strdup ("jabber");
			result = _tmp27_;
			_g_free0 (domain);
			tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
			return result;
		} else {
			const gchar* _tmp28_ = NULL;
			_tmp28_ = domain;
			if (g_strcmp0 (_tmp28_, "yahoo") == 0) {
				gchar* _tmp29_ = NULL;
				_tmp29_ = g_strdup ("yahoo");
				result = _tmp29_;
				_g_free0 (domain);
				tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
				return result;
			}
		}
	}
	result = NULL;
	_g_free0 (domain);
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	return result;
}


EContact* edsf_persona_get_contact (EdsfPersona* self) {
	EContact* result;
	EContact* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_contact;
	result = _tmp0_;
	return result;
}


static void edsf_persona_set_contact (EdsfPersona* self, EContact* value) {
	EContact* _tmp0_ = NULL;
	EContact* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_contact);
	self->priv->_contact = _tmp1_;
	g_object_notify ((GObject *) self, "contact");
}


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


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


static GeeSet* edsf_persona_real_get_local_ids (FolksLocalIdDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	FolksSmallSet* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GeeSet* _tmp7_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_local_ids;
	_tmp1_ = folks_persona_get_iid ((FolksPersona*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp0_, _tmp2_);
	if (_tmp3_ == FALSE) {
		FolksSmallSet* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		_tmp4_ = self->priv->_local_ids;
		_tmp5_ = folks_persona_get_iid ((FolksPersona*) self);
		_tmp6_ = _tmp5_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp4_, _tmp6_);
	}
	_tmp7_ = self->priv->_local_ids_ro;
	result = _tmp7_;
	return result;
}


static void edsf_persona_real_set_local_ids (FolksLocalIdDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_local_id_details_change_local_ids ((FolksLocalIdDetails*) self, _tmp0_, NULL, NULL);
}


static FolksLocation* edsf_persona_real_get_location (FolksLocationDetails* base) {
	FolksLocation* result;
	EdsfPersona* self;
	FolksLocation* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_location;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_location (FolksLocationDetails* base, FolksLocation* value) {
	EdsfPersona* self;
	FolksLocation* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_location_details_change_location ((FolksLocationDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_postal_addresses (FolksPostalAddressDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_addresses (self, TRUE, FALSE);
	_tmp0_ = self->priv->_postal_addresses_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_postal_addresses (FolksPostalAddressDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_postal_address_details_change_postal_addresses ((FolksPostalAddressDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_phone_numbers (FolksPhoneDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_phones (self, TRUE, FALSE);
	_tmp0_ = self->priv->_phone_numbers_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_phone_numbers (FolksPhoneDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_phone_details_change_phone_numbers ((FolksPhoneDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_email_addresses (FolksEmailDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_email_addresses_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_email_addresses (FolksEmailDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_email_details_change_email_addresses ((FolksEmailDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_notes (FolksNoteDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_notes (self, TRUE, FALSE);
	_tmp0_ = self->priv->_notes_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_notes (FolksNoteDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_note_details_change_notes ((FolksNoteDetails*) self, _tmp0_, NULL, NULL);
}


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


static gchar** edsf_persona_real_get_writeable_properties (FolksPersona* base, int* result_length1) {
	gchar** result;
	EdsfPersona* self;
	FolksPersonaStore* _tmp0_ = NULL;
	FolksPersonaStore* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	self = (EdsfPersona*) base;
	_tmp0_ = folks_persona_get_store ((FolksPersona*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = folks_persona_store_get_always_writeable_properties (_tmp1_, &_tmp2__length1);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}


static GLoadableIcon* edsf_persona_real_get_avatar (FolksAvatarDetails* base) {
	GLoadableIcon* result;
	EdsfPersona* self;
	GLoadableIcon* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_avatar;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_avatar (FolksAvatarDetails* base, GLoadableIcon* value) {
	EdsfPersona* self;
	GLoadableIcon* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_avatar_details_change_avatar ((FolksAvatarDetails*) self, _tmp0_, NULL, NULL);
}


static FolksStructuredName* edsf_persona_real_get_structured_name (FolksNameDetails* base) {
	FolksStructuredName* result;
	EdsfPersona* self;
	FolksStructuredName* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_structured_name;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_structured_name (FolksNameDetails* base, FolksStructuredName* value) {
	EdsfPersona* self;
	FolksStructuredName* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_name_details_change_structured_name ((FolksNameDetails*) self, _tmp0_, NULL, NULL);
}


const gchar* edsf_persona_get_contact_id (EdsfPersona* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_contact_id;
	result = _tmp0_;
	return result;
}


static void edsf_persona_set_contact_id (EdsfPersona* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_contact_id);
	self->priv->_contact_id = _tmp1_;
	g_object_notify ((GObject *) self, "contact-id");
}


static const gchar* edsf_persona_real_get_full_name (FolksNameDetails* base) {
	const gchar* result;
	EdsfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_full_name;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_full_name (FolksNameDetails* base, const gchar* value) {
	EdsfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_name_details_change_full_name ((FolksNameDetails*) self, _tmp0_, NULL, NULL);
}


static const gchar* edsf_persona_real_get_nickname (FolksNameDetails* base) {
	const gchar* result;
	EdsfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_nickname;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_nickname (FolksNameDetails* base, const gchar* value) {
	EdsfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_name_details_change_nickname ((FolksNameDetails*) self, _tmp0_, NULL, NULL);
}


static FolksGender edsf_persona_real_get_gender (FolksGenderDetails* base) {
	FolksGender result;
	EdsfPersona* self;
	FolksGender _tmp0_ = 0;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_gender;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_gender (FolksGenderDetails* base, FolksGender value) {
	EdsfPersona* self;
	FolksGender _tmp0_ = 0;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_gender_details_change_gender ((FolksGenderDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_urls (FolksUrlDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_urls (self, TRUE, FALSE);
	_tmp0_ = self->priv->_urls_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_urls (FolksUrlDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_url_details_change_urls ((FolksUrlDetails*) self, _tmp0_, NULL, NULL);
}


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


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


static GeeSet* edsf_persona_real_get_groups (FolksGroupDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_groups (self, TRUE, FALSE);
	_tmp0_ = self->priv->_groups_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_groups (FolksGroupDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_group_details_change_groups ((FolksGroupDetails*) self, _tmp0_, NULL, NULL);
}


static const gchar* edsf_persona_real_get_calendar_event_id (FolksBirthdayDetails* base) {
	const gchar* result;
	EdsfPersona* self;
	self = (EdsfPersona*) base;
	result = NULL;
	return result;
}


static void edsf_persona_real_set_calendar_event_id (FolksBirthdayDetails* base, const gchar* value) {
	EdsfPersona* self;
	const gchar* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_birthday_details_change_calendar_event_id ((FolksBirthdayDetails*) self, _tmp0_, NULL, NULL);
}


static GDateTime* edsf_persona_real_get_birthday (FolksBirthdayDetails* base) {
	GDateTime* result;
	EdsfPersona* self;
	GDateTime* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = self->priv->_birthday;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_birthday (FolksBirthdayDetails* base, GDateTime* value) {
	EdsfPersona* self;
	GDateTime* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_birthday_details_change_birthday ((FolksBirthdayDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* edsf_persona_real_get_roles (FolksRoleDetails* base) {
	GeeSet* result;
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_edsf_persona_update_roles (self, TRUE, FALSE);
	_tmp0_ = self->priv->_roles_ro;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_roles (FolksRoleDetails* base, GeeSet* value) {
	EdsfPersona* self;
	GeeSet* _tmp0_ = NULL;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_role_details_change_roles ((FolksRoleDetails*) self, _tmp0_, NULL, NULL);
}


static gboolean edsf_persona_real_get_is_favourite (FolksFavouriteDetails* base) {
	gboolean result;
	EdsfPersona* self;
	gboolean _tmp0_ = FALSE;
	self = (EdsfPersona*) base;
	_edsf_persona_update_groups (self, TRUE, FALSE);
	_tmp0_ = self->priv->_is_favourite;
	result = _tmp0_;
	return result;
}


static void edsf_persona_real_set_is_favourite (FolksFavouriteDetails* base, gboolean value) {
	EdsfPersona* self;
	gboolean _tmp0_ = FALSE;
	self = (EdsfPersona*) base;
	_tmp0_ = value;
	folks_favourite_details_change_is_favourite ((FolksFavouriteDetails*) self, _tmp0_, NULL, NULL);
}


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


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


GeeSet* edsf_persona_get_system_groups (EdsfPersona* self) {
	GeeSet* result;
	GeeSet* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_edsf_persona_update_groups (self, TRUE, TRUE);
	_tmp0_ = self->priv->_system_groups_ro;
	result = _tmp0_;
	return result;
}


void edsf_persona_set_system_groups (EdsfPersona* self, GeeSet* value) {
	GeeSet* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	edsf_persona_change_system_groups (self, _tmp0_, NULL, NULL);
}


gboolean edsf_persona_get_in_google_personal_group (EdsfPersona* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_edsf_persona_update_groups (self, TRUE, TRUE);
	_tmp0_ = self->priv->_in_google_personal_group;
	result = _tmp0_;
	return result;
}


void edsf_persona_set_in_google_personal_group (EdsfPersona* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	edsf_persona_change_in_google_personal_group (self, _tmp0_, NULL, NULL);
}


static GObject * edsf_persona_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	EdsfPersona * self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	FolksSmallSet* _tmp2_ = NULL;
	FolksSmallSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	GeeSet* _tmp5_ = NULL;
	FolksSmallSet* _tmp6_ = NULL;
	FolksSmallSet* _tmp7_ = NULL;
	GeeSet* _tmp8_ = NULL;
	GeeSet* _tmp9_ = NULL;
	FolksSmallSet* _tmp10_ = NULL;
	FolksSmallSet* _tmp11_ = NULL;
	GeeSet* _tmp12_ = NULL;
	GeeSet* _tmp13_ = NULL;
	FolksSmallSet* _tmp14_ = NULL;
	FolksSmallSet* _tmp15_ = NULL;
	GeeSet* _tmp16_ = NULL;
	GeeSet* _tmp17_ = NULL;
	FolksSmallSet* _tmp18_ = NULL;
	FolksSmallSet* _tmp19_ = NULL;
	GeeSet* _tmp20_ = NULL;
	GeeSet* _tmp21_ = NULL;
	FolksSmallSet* _tmp22_ = NULL;
	FolksSmallSet* _tmp23_ = NULL;
	GeeSet* _tmp24_ = NULL;
	GeeSet* _tmp25_ = NULL;
	GeeHashMultiMap* _tmp26_ = NULL;
	FolksSmallSet* _tmp27_ = NULL;
	FolksSmallSet* _tmp28_ = NULL;
	GeeSet* _tmp29_ = NULL;
	GeeSet* _tmp30_ = NULL;
	FolksSmallSet* _tmp31_ = NULL;
	FolksSmallSet* _tmp32_ = NULL;
	GeeSet* _tmp33_ = NULL;
	GeeSet* _tmp34_ = NULL;
	FolksSmallSet* _tmp35_ = NULL;
	FolksSmallSet* _tmp36_ = NULL;
	GeeSet* _tmp37_ = NULL;
	GeeSet* _tmp38_ = NULL;
	EContact* _tmp39_ = NULL;
	parent_class = G_OBJECT_CLASS (edsf_persona_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDSF_TYPE_PERSONA, EdsfPersona);
	_tmp0_ = folks_persona_get_iid ((FolksPersona*) self);
	_tmp1_ = _tmp0_;
	g_debug ("edsf-persona.vala:1012: Creating new Edsf.Persona with IID '%s'", _tmp1_);
	self->priv->_gender = FOLKS_GENDER_UNSPECIFIED;
	_tmp2_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_phone_numbers);
	self->priv->_phone_numbers = _tmp2_;
	_tmp3_ = self->priv->_phone_numbers;
	_tmp4_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (self->priv->_phone_numbers_ro);
	self->priv->_phone_numbers_ro = _tmp5_;
	_tmp6_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_email_addresses);
	self->priv->_email_addresses = _tmp6_;
	_tmp7_ = self->priv->_email_addresses;
	_tmp8_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (self->priv->_email_addresses_ro);
	self->priv->_email_addresses_ro = _tmp9_;
	_tmp10_ = folks_small_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_notes);
	self->priv->_notes = _tmp10_;
	_tmp11_ = self->priv->_notes;
	_tmp12_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp11_);
	_tmp13_ = _tmp12_;
	_g_object_unref0 (self->priv->_notes_ro);
	self->priv->_notes_ro = _tmp13_;
	_tmp14_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_urls);
	self->priv->_urls = _tmp14_;
	_tmp15_ = self->priv->_urls;
	_tmp16_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp15_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (self->priv->_urls_ro);
	self->priv->_urls_ro = _tmp17_;
	_tmp18_ = folks_small_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_postal_addresses);
	self->priv->_postal_addresses = _tmp18_;
	_tmp19_ = self->priv->_postal_addresses;
	_tmp20_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp19_);
	_tmp21_ = _tmp20_;
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	self->priv->_postal_addresses_ro = _tmp21_;
	_tmp22_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_local_ids);
	self->priv->_local_ids = _tmp22_;
	_tmp23_ = self->priv->_local_ids;
	_tmp24_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp23_);
	_tmp25_ = _tmp24_;
	_g_object_unref0 (self->priv->_local_ids_ro);
	self->priv->_local_ids_ro = _tmp25_;
	_g_object_unref0 (self->priv->_location);
	self->priv->_location = NULL;
	_tmp26_ = 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 = _tmp26_;
	_tmp27_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_groups);
	self->priv->_groups = _tmp27_;
	_tmp28_ = self->priv->_groups;
	_tmp29_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp28_);
	_tmp30_ = _tmp29_;
	_g_object_unref0 (self->priv->_groups_ro);
	self->priv->_groups_ro = _tmp30_;
	_tmp31_ = folks_small_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _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->_roles);
	self->priv->_roles = _tmp31_;
	_tmp32_ = self->priv->_roles;
	_tmp33_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp32_);
	_tmp34_ = _tmp33_;
	_g_object_unref0 (self->priv->_roles_ro);
	self->priv->_roles_ro = _tmp34_;
	_tmp35_ = 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 = _tmp35_;
	_tmp36_ = self->priv->_anti_links;
	_tmp37_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp36_);
	_tmp38_ = _tmp37_;
	_g_object_unref0 (self->priv->_anti_links_ro);
	self->priv->_anti_links_ro = _tmp38_;
	_tmp39_ = self->priv->_contact;
	_edsf_persona_update (self, _tmp39_);
	return obj;
}


static void edsf_persona_url_type_mapping_copy (const EdsfPersonaUrlTypeMapping* self, EdsfPersonaUrlTypeMapping* dest) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	_tmp0_ = (*self).vcard_field_name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).vcard_field_name);
	(*dest).vcard_field_name = _tmp1_;
	_tmp2_ = (*self).folks_type;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).folks_type);
	(*dest).folks_type = _tmp3_;
}


static void edsf_persona_url_type_mapping_destroy (EdsfPersonaUrlTypeMapping* self) {
	_g_free0 ((*self).vcard_field_name);
	_g_free0 ((*self).folks_type);
}


static EdsfPersonaUrlTypeMapping* edsf_persona_url_type_mapping_dup (const EdsfPersonaUrlTypeMapping* self) {
	EdsfPersonaUrlTypeMapping* dup;
	dup = g_new0 (EdsfPersonaUrlTypeMapping, 1);
	edsf_persona_url_type_mapping_copy (self, dup);
	return dup;
}


static void edsf_persona_url_type_mapping_free (EdsfPersonaUrlTypeMapping* self) {
	edsf_persona_url_type_mapping_destroy (self);
	g_free (self);
}


static GType edsf_persona_url_type_mapping_get_type (void) {
	static volatile gsize edsf_persona_url_type_mapping_type_id__volatile = 0;
	if (g_once_init_enter (&edsf_persona_url_type_mapping_type_id__volatile)) {
		GType edsf_persona_url_type_mapping_type_id;
		edsf_persona_url_type_mapping_type_id = g_boxed_type_register_static ("EdsfPersonaUrlTypeMapping", (GBoxedCopyFunc) edsf_persona_url_type_mapping_dup, (GBoxedFreeFunc) edsf_persona_url_type_mapping_free);
		g_once_init_leave (&edsf_persona_url_type_mapping_type_id__volatile, edsf_persona_url_type_mapping_type_id);
	}
	return edsf_persona_url_type_mapping_type_id__volatile;
}


static void edsf_persona_class_init (EdsfPersonaClass * klass) {
	GTimeZone* _tmp0_ = NULL;
	edsf_persona_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (EdsfPersonaPrivate));
	((FolksPersonaClass *) klass)->linkable_property_to_links = edsf_persona_real_linkable_property_to_links;
	FOLKS_PERSONA_CLASS (klass)->get_linkable_properties = edsf_persona_real_get_linkable_properties;
	FOLKS_PERSONA_CLASS (klass)->get_writeable_properties = edsf_persona_real_get_writeable_properties;
	G_OBJECT_CLASS (klass)->get_property = _vala_edsf_persona_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_edsf_persona_set_property;
	G_OBJECT_CLASS (klass)->constructor = edsf_persona_constructor;
	G_OBJECT_CLASS (klass)->finalize = edsf_persona_finalize;
	/**
	   * The e-d-s contact represented by this Persona
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_CONTACT, g_param_spec_object ("contact", "contact", "contact", e_contact_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	   * {@inheritDoc}
	   *
	   * This is stored in the X-FOLKS-WEB-SERVICES-IDS vCard field in EDS.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_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));
	/**
	   * IDs used to link {@link Edsf.Persona}s.
	   *
	   * This is stored in the X-FOLKS-CONTACTS-IDS vCard field in EDS.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_LOCAL_IDS, g_param_spec_object ("local-ids", "local-ids", "local-ids", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.9.2
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_LOCATION, g_param_spec_object ("location", "location", "location", FOLKS_TYPE_LOCATION, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * The postal addresses of the contact.
	   *
	   * A list of postal addresses associated to the contact.
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_POSTAL_ADDRESSES, g_param_spec_object ("postal-addresses", "postal-addresses", "postal-addresses", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_PHONE_NUMBERS, g_param_spec_object ("phone-numbers", "phone-numbers", "phone-numbers", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_EMAIL_ADDRESSES, g_param_spec_object ("email-addresses", "email-addresses", "email-addresses", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_NOTES, g_param_spec_object ("notes", "notes", "notes", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_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), EDSF_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));
	/**
	   * An avatar for the Persona.
	   *
	   * See {@link Folks.AvatarDetails.avatar}.
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_AVATAR, g_param_spec_object ("avatar", "avatar", "avatar", g_loadable_icon_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_STRUCTURED_NAME, g_param_spec_object ("structured-name", "structured-name", "structured-name", FOLKS_TYPE_STRUCTURED_NAME, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * The e-d-s contact uid
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_CONTACT_ID, g_param_spec_string ("contact-id", "contact-id", "contact-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_FULL_NAME, g_param_spec_string ("full-name", "full-name", "full-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_NICKNAME, g_param_spec_string ("nickname", "nickname", "nickname", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * This is stored in the {@link Edsf.Persona.gender_attribute_name} vCard
	   * field in EDS.
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_GENDER, g_param_spec_enum ("gender", "gender", "gender", FOLKS_TYPE_GENDER, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * This is stored in the X-URIS vCard field in EDS.
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_URLS, g_param_spec_object ("urls", "urls", "urls", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_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}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_GROUPS, g_param_spec_object ("groups", "groups", "groups", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * e-d-s has no equivalent field, so this is unsupported.
	   *
	   * @since 0.6.2
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_CALENDAR_EVENT_ID, g_param_spec_string ("calendar-event-id", "calendar-event-id", "calendar-event-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.2
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_BIRTHDAY, g_param_spec_boxed ("birthday", "birthday", "birthday", G_TYPE_DATE_TIME, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   *
	   * This is stored in the X-ROLES vCard field in EDS.
	   *
	   * @since 0.6.2
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_ROLES, g_param_spec_object ("roles", "roles", "roles", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Whether this contact is a user-defined favourite.
	   *
	   * This is stored in the X-FOLKS-FAVOURITE vCard field in EDS.
	   *
	   * @since 0.6.5
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_IS_FAVOURITE, g_param_spec_boolean ("is-favourite", "is-favourite", "is-favourite", FALSE, 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), EDSF_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));
	/**
	   * The complete set of system group identifiers the contact belongs to.
	   * See {@link Persona.change_system_groups} for details.
	   *
	   * This is stored in the X-GOOGLE-SYSTEM-GROUP-IDS vCard field in EDS.
	   *
	   * @since 0.9.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_SYSTEM_GROUPS, g_param_spec_object ("system-groups", "system-groups", "system-groups", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Whether this contact is in the “My Contacts” section of the user’s address
	   * book, rather than the “Other” section.
	   *
	   * @since 0.7.3
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), EDSF_PERSONA_IN_GOOGLE_PERSONAL_GROUP, g_param_spec_boolean ("in-google-personal-group", "in-google-personal-group", "in-google-personal-group", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_static_rec_mutex_init (&__lock_edsf_persona__im_eds_map);
	_tmp0_ = g_time_zone_new_local ();
	edsf_persona__local_time_zone = _tmp0_;
}


static void edsf_persona_folks_anti_linkable_interface_init (FolksAntiLinkableIface * iface) {
	edsf_persona_folks_anti_linkable_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_anti_links = (void (*)(FolksAntiLinkable*, GeeSet*, GError**)) edsf_persona_real_change_anti_links;
	iface->change_anti_links_finish = edsf_persona_real_change_anti_links_finish;
	iface->get_anti_links = edsf_persona_real_get_anti_links;
	iface->set_anti_links = edsf_persona_real_set_anti_links;
}


static void edsf_persona_folks_avatar_details_interface_init (FolksAvatarDetailsIface * iface) {
	edsf_persona_folks_avatar_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_avatar = (void (*)(FolksAvatarDetails*, GLoadableIcon*, GError**)) edsf_persona_real_change_avatar;
	iface->change_avatar_finish = edsf_persona_real_change_avatar_finish;
	iface->get_avatar = edsf_persona_real_get_avatar;
	iface->set_avatar = edsf_persona_real_set_avatar;
}


static void edsf_persona_folks_birthday_details_interface_init (FolksBirthdayDetailsIface * iface) {
	edsf_persona_folks_birthday_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_birthday = (void (*)(FolksBirthdayDetails*, GDateTime*, GError**)) edsf_persona_real_change_birthday;
	iface->change_birthday_finish = edsf_persona_real_change_birthday_finish;
	iface->get_calendar_event_id = edsf_persona_real_get_calendar_event_id;
	iface->set_calendar_event_id = edsf_persona_real_set_calendar_event_id;
	iface->get_birthday = edsf_persona_real_get_birthday;
	iface->set_birthday = edsf_persona_real_set_birthday;
}


static void edsf_persona_folks_email_details_interface_init (FolksEmailDetailsIface * iface) {
	edsf_persona_folks_email_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_email_addresses = (void (*)(FolksEmailDetails*, GeeSet*, GError**)) edsf_persona_real_change_email_addresses;
	iface->change_email_addresses_finish = edsf_persona_real_change_email_addresses_finish;
	iface->get_email_addresses = edsf_persona_real_get_email_addresses;
	iface->set_email_addresses = edsf_persona_real_set_email_addresses;
}


static void edsf_persona_folks_extended_info_interface_init (FolksExtendedInfoIface * iface) {
	edsf_persona_folks_extended_info_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_extended_field = (FolksExtendedFieldDetails* (*)(FolksExtendedInfo*, const gchar*)) edsf_persona_real_get_extended_field;
	iface->change_extended_field = (void (*)(FolksExtendedInfo*, const gchar*, FolksExtendedFieldDetails*, GError**)) edsf_persona_real_change_extended_field;
	iface->change_extended_field_finish = edsf_persona_real_change_extended_field_finish;
	iface->remove_extended_field = (void (*)(FolksExtendedInfo*, const gchar*, GError**)) edsf_persona_real_remove_extended_field;
	iface->remove_extended_field_finish = edsf_persona_real_remove_extended_field_finish;
}


static void edsf_persona_folks_favourite_details_interface_init (FolksFavouriteDetailsIface * iface) {
	edsf_persona_folks_favourite_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_is_favourite = (void (*)(FolksFavouriteDetails*, gboolean, GError**)) edsf_persona_real_change_is_favourite;
	iface->change_is_favourite_finish = edsf_persona_real_change_is_favourite_finish;
	iface->get_is_favourite = edsf_persona_real_get_is_favourite;
	iface->set_is_favourite = edsf_persona_real_set_is_favourite;
}


static void edsf_persona_folks_gender_details_interface_init (FolksGenderDetailsIface * iface) {
	edsf_persona_folks_gender_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_gender = (void (*)(FolksGenderDetails*, FolksGender, GError**)) edsf_persona_real_change_gender;
	iface->change_gender_finish = edsf_persona_real_change_gender_finish;
	iface->get_gender = edsf_persona_real_get_gender;
	iface->set_gender = edsf_persona_real_set_gender;
}


static void edsf_persona_folks_group_details_interface_init (FolksGroupDetailsIface * iface) {
	edsf_persona_folks_group_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_group = (void (*)(FolksGroupDetails*, const gchar*, gboolean, GError**)) edsf_persona_real_change_group;
	iface->change_group_finish = edsf_persona_real_change_group_finish;
	iface->change_groups = (void (*)(FolksGroupDetails*, GeeSet*, GError**)) edsf_persona_real_change_groups;
	iface->change_groups_finish = edsf_persona_real_change_groups_finish;
	iface->get_groups = edsf_persona_real_get_groups;
	iface->set_groups = edsf_persona_real_set_groups;
}


static void edsf_persona_folks_im_details_interface_init (FolksImDetailsIface * iface) {
	edsf_persona_folks_im_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_im_addresses = (void (*)(FolksImDetails*, GeeMultiMap*, GError**)) edsf_persona_real_change_im_addresses;
	iface->change_im_addresses_finish = edsf_persona_real_change_im_addresses_finish;
	iface->get_im_addresses = edsf_persona_real_get_im_addresses;
	iface->set_im_addresses = edsf_persona_real_set_im_addresses;
}


static void edsf_persona_folks_local_id_details_interface_init (FolksLocalIdDetailsIface * iface) {
	edsf_persona_folks_local_id_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_local_ids = (void (*)(FolksLocalIdDetails*, GeeSet*, GError**)) edsf_persona_real_change_local_ids;
	iface->change_local_ids_finish = edsf_persona_real_change_local_ids_finish;
	iface->get_local_ids = edsf_persona_real_get_local_ids;
	iface->set_local_ids = edsf_persona_real_set_local_ids;
}


static void edsf_persona_folks_location_details_interface_init (FolksLocationDetailsIface * iface) {
	edsf_persona_folks_location_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_location = (void (*)(FolksLocationDetails*, FolksLocation*, GError**)) edsf_persona_real_change_location;
	iface->change_location_finish = edsf_persona_real_change_location_finish;
	iface->get_location = edsf_persona_real_get_location;
	iface->set_location = edsf_persona_real_set_location;
}


static void edsf_persona_folks_name_details_interface_init (FolksNameDetailsIface * iface) {
	edsf_persona_folks_name_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_structured_name = (void (*)(FolksNameDetails*, FolksStructuredName*, GError**)) edsf_persona_real_change_structured_name;
	iface->change_structured_name_finish = edsf_persona_real_change_structured_name_finish;
	iface->change_full_name = (void (*)(FolksNameDetails*, const gchar*, GError**)) edsf_persona_real_change_full_name;
	iface->change_full_name_finish = edsf_persona_real_change_full_name_finish;
	iface->change_nickname = (void (*)(FolksNameDetails*, const gchar*, GError**)) edsf_persona_real_change_nickname;
	iface->change_nickname_finish = edsf_persona_real_change_nickname_finish;
	iface->get_structured_name = edsf_persona_real_get_structured_name;
	iface->set_structured_name = edsf_persona_real_set_structured_name;
	iface->get_full_name = edsf_persona_real_get_full_name;
	iface->set_full_name = edsf_persona_real_set_full_name;
	iface->get_nickname = edsf_persona_real_get_nickname;
	iface->set_nickname = edsf_persona_real_set_nickname;
}


static void edsf_persona_folks_note_details_interface_init (FolksNoteDetailsIface * iface) {
	edsf_persona_folks_note_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_notes = (void (*)(FolksNoteDetails*, GeeSet*, GError**)) edsf_persona_real_change_notes;
	iface->change_notes_finish = edsf_persona_real_change_notes_finish;
	iface->get_notes = edsf_persona_real_get_notes;
	iface->set_notes = edsf_persona_real_set_notes;
}


static void edsf_persona_folks_phone_details_interface_init (FolksPhoneDetailsIface * iface) {
	edsf_persona_folks_phone_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_phone_numbers = (void (*)(FolksPhoneDetails*, GeeSet*, GError**)) edsf_persona_real_change_phone_numbers;
	iface->change_phone_numbers_finish = edsf_persona_real_change_phone_numbers_finish;
	iface->get_phone_numbers = edsf_persona_real_get_phone_numbers;
	iface->set_phone_numbers = edsf_persona_real_set_phone_numbers;
}


static void edsf_persona_folks_role_details_interface_init (FolksRoleDetailsIface * iface) {
	edsf_persona_folks_role_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_roles = (void (*)(FolksRoleDetails*, GeeSet*, GError**)) edsf_persona_real_change_roles;
	iface->change_roles_finish = edsf_persona_real_change_roles_finish;
	iface->get_roles = edsf_persona_real_get_roles;
	iface->set_roles = edsf_persona_real_set_roles;
}


static void edsf_persona_folks_url_details_interface_init (FolksUrlDetailsIface * iface) {
	edsf_persona_folks_url_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_urls = (void (*)(FolksUrlDetails*, GeeSet*, GError**)) edsf_persona_real_change_urls;
	iface->change_urls_finish = edsf_persona_real_change_urls_finish;
	iface->get_urls = edsf_persona_real_get_urls;
	iface->set_urls = edsf_persona_real_set_urls;
}


static void edsf_persona_folks_postal_address_details_interface_init (FolksPostalAddressDetailsIface * iface) {
	edsf_persona_folks_postal_address_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_postal_addresses = (void (*)(FolksPostalAddressDetails*, GeeSet*, GError**)) edsf_persona_real_change_postal_addresses;
	iface->change_postal_addresses_finish = edsf_persona_real_change_postal_addresses_finish;
	iface->get_postal_addresses = edsf_persona_real_get_postal_addresses;
	iface->set_postal_addresses = edsf_persona_real_set_postal_addresses;
}


static void edsf_persona_folks_web_service_details_interface_init (FolksWebServiceDetailsIface * iface) {
	edsf_persona_folks_web_service_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_web_service_addresses = (void (*)(FolksWebServiceDetails*, GeeMultiMap*, GError**)) edsf_persona_real_change_web_service_addresses;
	iface->change_web_service_addresses_finish = edsf_persona_real_change_web_service_addresses_finish;
	iface->get_web_service_addresses = edsf_persona_real_get_web_service_addresses;
	iface->set_web_service_addresses = edsf_persona_real_set_web_service_addresses;
}


static void edsf_persona_instance_init (EdsfPersona * self) {
	FolksSmallSet* _tmp0_ = NULL;
	FolksSmallSet* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GeeHashMultiMap* _tmp4_ = NULL;
	self->priv = EDSF_PERSONA_GET_PRIVATE (self);
	_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->_local_ids = _tmp0_;
	self->priv->_location = NULL;
	self->priv->_postal_addresses = NULL;
	self->priv->_postal_addresses_ro = NULL;
	self->priv->_phone_numbers = NULL;
	self->priv->_phone_numbers_ro = NULL;
	_tmp1_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	self->priv->_email_addresses = _tmp1_;
	self->priv->_notes = NULL;
	self->priv->_notes_ro = NULL;
	self->priv->_avatar = NULL;
	self->priv->_structured_name = NULL;
	_tmp2_ = g_strdup ("");
	self->priv->_full_name = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_nickname = _tmp3_;
	self->priv->_urls = NULL;
	self->priv->_urls_ro = NULL;
	_tmp4_ = 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);
	self->priv->_im_addresses = _tmp4_;
	self->priv->_groups = NULL;
	self->priv->_groups_ro = NULL;
	self->priv->_birthday = NULL;
	self->priv->_roles = NULL;
	self->priv->_roles_ro = NULL;
	self->priv->_is_favourite = FALSE;
	self->priv->_system_groups = NULL;
	self->priv->_system_groups_ro = NULL;
}


static void edsf_persona_finalize (GObject* obj) {
	EdsfPersona * self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDSF_TYPE_PERSONA, EdsfPersona);
	_tmp0_ = folks_persona_get_uid ((FolksPersona*) self);
	_tmp1_ = _tmp0_;
	g_debug ("edsf-persona.vala:1101: Destroying Edsf.Persona '%s': %p", _tmp1_, self);
	_g_object_unref0 (self->priv->_contact);
	_g_object_unref0 (self->priv->_web_service_addresses);
	_g_object_unref0 (self->priv->_local_ids);
	_g_object_unref0 (self->priv->_local_ids_ro);
	_g_object_unref0 (self->priv->_location);
	_g_object_unref0 (self->priv->_postal_addresses);
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	_g_object_unref0 (self->priv->_phone_numbers);
	_g_object_unref0 (self->priv->_phone_numbers_ro);
	_g_object_unref0 (self->priv->_email_addresses);
	_g_object_unref0 (self->priv->_email_addresses_ro);
	_g_object_unref0 (self->priv->_notes);
	_g_object_unref0 (self->priv->_notes_ro);
	_g_object_unref0 (self->priv->_avatar);
	_g_object_unref0 (self->priv->_structured_name);
	_g_free0 (self->priv->_contact_id);
	_g_free0 (self->priv->_full_name);
	_g_free0 (self->priv->_nickname);
	_g_object_unref0 (self->priv->_urls);
	_g_object_unref0 (self->priv->_urls_ro);
	_g_object_unref0 (self->priv->_im_addresses);
	_g_object_unref0 (self->priv->_groups);
	_g_object_unref0 (self->priv->_groups_ro);
	_g_date_time_unref0 (self->priv->_birthday);
	_g_object_unref0 (self->priv->_roles);
	_g_object_unref0 (self->priv->_roles_ro);
	_g_object_unref0 (self->priv->_anti_links);
	_g_object_unref0 (self->priv->_anti_links_ro);
	_g_object_unref0 (self->priv->_system_groups);
	_g_object_unref0 (self->priv->_system_groups_ro);
	G_OBJECT_CLASS (edsf_persona_parent_class)->finalize (obj);
}


/**
 * A persona subclass which represents a single EDS contact.
 *
 * Each {@link Edsf.Persona} instance represents a single EDS {@link E.Contact}.
 * When the contact is modified (either by this folks client, or a different
 * client), the {@link Edsf.Persona} remains the same, but is assigned a new
 * {@link E.Contact}. It then updates its properties from this new contact.
 */
GType edsf_persona_get_type (void) {
	static volatile gsize edsf_persona_type_id__volatile = 0;
	if (g_once_init_enter (&edsf_persona_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EdsfPersonaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edsf_persona_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EdsfPersona), 0, (GInstanceInitFunc) edsf_persona_instance_init, NULL };
		static const GInterfaceInfo folks_anti_linkable_info = { (GInterfaceInitFunc) edsf_persona_folks_anti_linkable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_avatar_details_info = { (GInterfaceInitFunc) edsf_persona_folks_avatar_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_birthday_details_info = { (GInterfaceInitFunc) edsf_persona_folks_birthday_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_email_details_info = { (GInterfaceInitFunc) edsf_persona_folks_email_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_extended_info_info = { (GInterfaceInitFunc) edsf_persona_folks_extended_info_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_favourite_details_info = { (GInterfaceInitFunc) edsf_persona_folks_favourite_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_gender_details_info = { (GInterfaceInitFunc) edsf_persona_folks_gender_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_group_details_info = { (GInterfaceInitFunc) edsf_persona_folks_group_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_im_details_info = { (GInterfaceInitFunc) edsf_persona_folks_im_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_local_id_details_info = { (GInterfaceInitFunc) edsf_persona_folks_local_id_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_location_details_info = { (GInterfaceInitFunc) edsf_persona_folks_location_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_name_details_info = { (GInterfaceInitFunc) edsf_persona_folks_name_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_note_details_info = { (GInterfaceInitFunc) edsf_persona_folks_note_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_phone_details_info = { (GInterfaceInitFunc) edsf_persona_folks_phone_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_role_details_info = { (GInterfaceInitFunc) edsf_persona_folks_role_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_url_details_info = { (GInterfaceInitFunc) edsf_persona_folks_url_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_postal_address_details_info = { (GInterfaceInitFunc) edsf_persona_folks_postal_address_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_web_service_details_info = { (GInterfaceInitFunc) edsf_persona_folks_web_service_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType edsf_persona_type_id;
		edsf_persona_type_id = g_type_register_static (FOLKS_TYPE_PERSONA, "EdsfPersona", &g_define_type_info, 0);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_ANTI_LINKABLE, &folks_anti_linkable_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_AVATAR_DETAILS, &folks_avatar_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_BIRTHDAY_DETAILS, &folks_birthday_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_EMAIL_DETAILS, &folks_email_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_EXTENDED_INFO, &folks_extended_info_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_FAVOURITE_DETAILS, &folks_favourite_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_GENDER_DETAILS, &folks_gender_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_GROUP_DETAILS, &folks_group_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_IM_DETAILS, &folks_im_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_LOCAL_ID_DETAILS, &folks_local_id_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_LOCATION_DETAILS, &folks_location_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_NAME_DETAILS, &folks_name_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_NOTE_DETAILS, &folks_note_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_PHONE_DETAILS, &folks_phone_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_ROLE_DETAILS, &folks_role_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_URL_DETAILS, &folks_url_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, &folks_postal_address_details_info);
		g_type_add_interface_static (edsf_persona_type_id, FOLKS_TYPE_WEB_SERVICE_DETAILS, &folks_web_service_details_info);
		g_once_init_leave (&edsf_persona_type_id__volatile, edsf_persona_type_id);
	}
	return edsf_persona_type_id__volatile;
}


static void _vala_edsf_persona_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	EdsfPersona * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EDSF_TYPE_PERSONA, EdsfPersona);
	switch (property_id) {
		case EDSF_PERSONA_CONTACT:
		g_value_set_object (value, edsf_persona_get_contact (self));
		break;
		case EDSF_PERSONA_WEB_SERVICE_ADDRESSES:
		g_value_set_object (value, folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self));
		break;
		case EDSF_PERSONA_LOCAL_IDS:
		g_value_set_object (value, folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) self));
		break;
		case EDSF_PERSONA_LOCATION:
		g_value_set_object (value, folks_location_details_get_location ((FolksLocationDetails*) self));
		break;
		case EDSF_PERSONA_POSTAL_ADDRESSES:
		g_value_set_object (value, folks_postal_address_details_get_postal_addresses ((FolksPostalAddressDetails*) self));
		break;
		case EDSF_PERSONA_PHONE_NUMBERS:
		g_value_set_object (value, folks_phone_details_get_phone_numbers ((FolksPhoneDetails*) self));
		break;
		case EDSF_PERSONA_EMAIL_ADDRESSES:
		g_value_set_object (value, folks_email_details_get_email_addresses ((FolksEmailDetails*) self));
		break;
		case EDSF_PERSONA_NOTES:
		g_value_set_object (value, folks_note_details_get_notes ((FolksNoteDetails*) self));
		break;
		case EDSF_PERSONA_LINKABLE_PROPERTIES:
		{
			int length;
			g_value_set_boxed (value, folks_persona_get_linkable_properties ((FolksPersona*) self, &length));
		}
		break;
		case EDSF_PERSONA_WRITEABLE_PROPERTIES:
		{
			int length;
			g_value_set_boxed (value, folks_persona_get_writeable_properties ((FolksPersona*) self, &length));
		}
		break;
		case EDSF_PERSONA_AVATAR:
		g_value_set_object (value, folks_avatar_details_get_avatar ((FolksAvatarDetails*) self));
		break;
		case EDSF_PERSONA_STRUCTURED_NAME:
		g_value_set_object (value, folks_name_details_get_structured_name ((FolksNameDetails*) self));
		break;
		case EDSF_PERSONA_CONTACT_ID:
		g_value_set_string (value, edsf_persona_get_contact_id (self));
		break;
		case EDSF_PERSONA_FULL_NAME:
		g_value_set_string (value, folks_name_details_get_full_name ((FolksNameDetails*) self));
		break;
		case EDSF_PERSONA_NICKNAME:
		g_value_set_string (value, folks_name_details_get_nickname ((FolksNameDetails*) self));
		break;
		case EDSF_PERSONA_GENDER:
		g_value_set_enum (value, folks_gender_details_get_gender ((FolksGenderDetails*) self));
		break;
		case EDSF_PERSONA_URLS:
		g_value_set_object (value, folks_url_details_get_urls ((FolksUrlDetails*) self));
		break;
		case EDSF_PERSONA_IM_ADDRESSES:
		g_value_set_object (value, folks_im_details_get_im_addresses ((FolksImDetails*) self));
		break;
		case EDSF_PERSONA_GROUPS:
		g_value_set_object (value, folks_group_details_get_groups ((FolksGroupDetails*) self));
		break;
		case EDSF_PERSONA_CALENDAR_EVENT_ID:
		g_value_set_string (value, folks_birthday_details_get_calendar_event_id ((FolksBirthdayDetails*) self));
		break;
		case EDSF_PERSONA_BIRTHDAY:
		g_value_set_boxed (value, folks_birthday_details_get_birthday ((FolksBirthdayDetails*) self));
		break;
		case EDSF_PERSONA_ROLES:
		g_value_set_object (value, folks_role_details_get_roles ((FolksRoleDetails*) self));
		break;
		case EDSF_PERSONA_IS_FAVOURITE:
		g_value_set_boolean (value, folks_favourite_details_get_is_favourite ((FolksFavouriteDetails*) self));
		break;
		case EDSF_PERSONA_ANTI_LINKS:
		g_value_set_object (value, folks_anti_linkable_get_anti_links ((FolksAntiLinkable*) self));
		break;
		case EDSF_PERSONA_SYSTEM_GROUPS:
		g_value_set_object (value, edsf_persona_get_system_groups (self));
		break;
		case EDSF_PERSONA_IN_GOOGLE_PERSONAL_GROUP:
		g_value_set_boolean (value, edsf_persona_get_in_google_personal_group (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_edsf_persona_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	EdsfPersona * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, EDSF_TYPE_PERSONA, EdsfPersona);
	switch (property_id) {
		case EDSF_PERSONA_CONTACT:
		edsf_persona_set_contact (self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_WEB_SERVICE_ADDRESSES:
		folks_web_service_details_set_web_service_addresses ((FolksWebServiceDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_LOCAL_IDS:
		folks_local_id_details_set_local_ids ((FolksLocalIdDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_LOCATION:
		folks_location_details_set_location ((FolksLocationDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_POSTAL_ADDRESSES:
		folks_postal_address_details_set_postal_addresses ((FolksPostalAddressDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_PHONE_NUMBERS:
		folks_phone_details_set_phone_numbers ((FolksPhoneDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_EMAIL_ADDRESSES:
		folks_email_details_set_email_addresses ((FolksEmailDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_NOTES:
		folks_note_details_set_notes ((FolksNoteDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_AVATAR:
		folks_avatar_details_set_avatar ((FolksAvatarDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_STRUCTURED_NAME:
		folks_name_details_set_structured_name ((FolksNameDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_CONTACT_ID:
		edsf_persona_set_contact_id (self, g_value_get_string (value));
		break;
		case EDSF_PERSONA_FULL_NAME:
		folks_name_details_set_full_name ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case EDSF_PERSONA_NICKNAME:
		folks_name_details_set_nickname ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case EDSF_PERSONA_GENDER:
		folks_gender_details_set_gender ((FolksGenderDetails*) self, g_value_get_enum (value));
		break;
		case EDSF_PERSONA_URLS:
		folks_url_details_set_urls ((FolksUrlDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_IM_ADDRESSES:
		folks_im_details_set_im_addresses ((FolksImDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_GROUPS:
		folks_group_details_set_groups ((FolksGroupDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_CALENDAR_EVENT_ID:
		folks_birthday_details_set_calendar_event_id ((FolksBirthdayDetails*) self, g_value_get_string (value));
		break;
		case EDSF_PERSONA_BIRTHDAY:
		folks_birthday_details_set_birthday ((FolksBirthdayDetails*) self, g_value_get_boxed (value));
		break;
		case EDSF_PERSONA_ROLES:
		folks_role_details_set_roles ((FolksRoleDetails*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_IS_FAVOURITE:
		folks_favourite_details_set_is_favourite ((FolksFavouriteDetails*) self, g_value_get_boolean (value));
		break;
		case EDSF_PERSONA_ANTI_LINKS:
		folks_anti_linkable_set_anti_links ((FolksAntiLinkable*) self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_SYSTEM_GROUPS:
		edsf_persona_set_system_groups (self, g_value_get_object (value));
		break;
		case EDSF_PERSONA_IN_GOOGLE_PERSONAL_GROUP:
		edsf_persona_set_in_google_personal_group (self, g_value_get_boolean (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;
}



