/* individual.c generated by valac 0.17.2.19-5f50d, the Vala compiler
 * generated from individual.vala, do not modify */

/*
 * Copyright (C) 2010 Collabora Ltd.
 * Copyright (C) 2011 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>
 *       Philip Withnall <philip@tecnocode.co.uk>
 */

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


#define FOLKS_TYPE_TRUST_LEVEL (folks_trust_level_get_type ())

#define FOLKS_TYPE_ALIAS_DETAILS (folks_alias_details_get_type ())
#define FOLKS_ALIAS_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails))
#define FOLKS_IS_ALIAS_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_ALIAS_DETAILS))
#define FOLKS_ALIAS_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetailsIface))

typedef struct _FolksAliasDetails FolksAliasDetails;
typedef struct _FolksAliasDetailsIface FolksAliasDetailsIface;

#define FOLKS_TYPE_AVATAR_DETAILS (folks_avatar_details_get_type ())
#define FOLKS_AVATAR_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails))
#define FOLKS_IS_AVATAR_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_AVATAR_DETAILS))
#define FOLKS_AVATAR_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetailsIface))

typedef struct _FolksAvatarDetails FolksAvatarDetails;
typedef struct _FolksAvatarDetailsIface FolksAvatarDetailsIface;

#define FOLKS_TYPE_BIRTHDAY_DETAILS (folks_birthday_details_get_type ())
#define FOLKS_BIRTHDAY_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails))
#define FOLKS_IS_BIRTHDAY_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_BIRTHDAY_DETAILS))
#define FOLKS_BIRTHDAY_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetailsIface))

typedef struct _FolksBirthdayDetails FolksBirthdayDetails;
typedef struct _FolksBirthdayDetailsIface FolksBirthdayDetailsIface;

#define FOLKS_TYPE_EMAIL_DETAILS (folks_email_details_get_type ())
#define FOLKS_EMAIL_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_EMAIL_DETAILS, FolksEmailDetails))
#define FOLKS_IS_EMAIL_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_EMAIL_DETAILS))
#define FOLKS_EMAIL_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_EMAIL_DETAILS, FolksEmailDetailsIface))

typedef struct _FolksEmailDetails FolksEmailDetails;
typedef struct _FolksEmailDetailsIface FolksEmailDetailsIface;

#define FOLKS_TYPE_ABSTRACT_FIELD_DETAILS (folks_abstract_field_details_get_type ())
#define FOLKS_ABSTRACT_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetails))
#define FOLKS_ABSTRACT_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetailsClass))
#define FOLKS_IS_ABSTRACT_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS))
#define FOLKS_IS_ABSTRACT_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS))
#define FOLKS_ABSTRACT_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetailsClass))

typedef struct _FolksAbstractFieldDetails FolksAbstractFieldDetails;
typedef struct _FolksAbstractFieldDetailsClass FolksAbstractFieldDetailsClass;

#define FOLKS_TYPE_EMAIL_FIELD_DETAILS (folks_email_field_details_get_type ())
#define FOLKS_EMAIL_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_EMAIL_FIELD_DETAILS, FolksEmailFieldDetails))
#define FOLKS_EMAIL_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_EMAIL_FIELD_DETAILS, FolksEmailFieldDetailsClass))
#define FOLKS_IS_EMAIL_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_EMAIL_FIELD_DETAILS))
#define FOLKS_IS_EMAIL_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_EMAIL_FIELD_DETAILS))
#define FOLKS_EMAIL_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_EMAIL_FIELD_DETAILS, FolksEmailFieldDetailsClass))

typedef struct _FolksEmailFieldDetails FolksEmailFieldDetails;
typedef struct _FolksEmailFieldDetailsClass FolksEmailFieldDetailsClass;

#define FOLKS_TYPE_FAVOURITE_DETAILS (folks_favourite_details_get_type ())
#define FOLKS_FAVOURITE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails))
#define FOLKS_IS_FAVOURITE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_FAVOURITE_DETAILS))
#define FOLKS_FAVOURITE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetailsIface))

typedef struct _FolksFavouriteDetails FolksFavouriteDetails;
typedef struct _FolksFavouriteDetailsIface FolksFavouriteDetailsIface;

#define FOLKS_TYPE_GENDER_DETAILS (folks_gender_details_get_type ())
#define FOLKS_GENDER_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails))
#define FOLKS_IS_GENDER_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_GENDER_DETAILS))
#define FOLKS_GENDER_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetailsIface))

typedef struct _FolksGenderDetails FolksGenderDetails;
typedef struct _FolksGenderDetailsIface FolksGenderDetailsIface;

#define FOLKS_TYPE_GENDER (folks_gender_get_type ())

#define FOLKS_TYPE_GROUP_DETAILS (folks_group_details_get_type ())
#define FOLKS_GROUP_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails))
#define FOLKS_IS_GROUP_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_GROUP_DETAILS))
#define FOLKS_GROUP_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetailsIface))

typedef struct _FolksGroupDetails FolksGroupDetails;
typedef struct _FolksGroupDetailsIface FolksGroupDetailsIface;

#define FOLKS_TYPE_IM_DETAILS (folks_im_details_get_type ())
#define FOLKS_IM_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_IM_DETAILS, FolksImDetails))
#define FOLKS_IS_IM_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_IM_DETAILS))
#define FOLKS_IM_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_IM_DETAILS, FolksImDetailsIface))

typedef struct _FolksImDetails FolksImDetails;
typedef struct _FolksImDetailsIface FolksImDetailsIface;

#define FOLKS_TYPE_IM_FIELD_DETAILS (folks_im_field_details_get_type ())
#define FOLKS_IM_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_IM_FIELD_DETAILS, FolksImFieldDetails))
#define FOLKS_IM_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_IM_FIELD_DETAILS, FolksImFieldDetailsClass))
#define FOLKS_IS_IM_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_IM_FIELD_DETAILS))
#define FOLKS_IS_IM_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_IM_FIELD_DETAILS))
#define FOLKS_IM_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_IM_FIELD_DETAILS, FolksImFieldDetailsClass))

typedef struct _FolksImFieldDetails FolksImFieldDetails;
typedef struct _FolksImFieldDetailsClass FolksImFieldDetailsClass;

#define FOLKS_TYPE_INTERACTION_DETAILS (folks_interaction_details_get_type ())
#define FOLKS_INTERACTION_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_INTERACTION_DETAILS, FolksInteractionDetails))
#define FOLKS_IS_INTERACTION_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_INTERACTION_DETAILS))
#define FOLKS_INTERACTION_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_INTERACTION_DETAILS, FolksInteractionDetailsIface))

typedef struct _FolksInteractionDetails FolksInteractionDetails;
typedef struct _FolksInteractionDetailsIface FolksInteractionDetailsIface;

#define FOLKS_TYPE_LOCAL_ID_DETAILS (folks_local_id_details_get_type ())
#define FOLKS_LOCAL_ID_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_LOCAL_ID_DETAILS, FolksLocalIdDetails))
#define FOLKS_IS_LOCAL_ID_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_LOCAL_ID_DETAILS))
#define FOLKS_LOCAL_ID_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_LOCAL_ID_DETAILS, FolksLocalIdDetailsIface))

typedef struct _FolksLocalIdDetails FolksLocalIdDetails;
typedef struct _FolksLocalIdDetailsIface FolksLocalIdDetailsIface;

#define FOLKS_TYPE_NAME_DETAILS (folks_name_details_get_type ())
#define FOLKS_NAME_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_NAME_DETAILS, FolksNameDetails))
#define FOLKS_IS_NAME_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_NAME_DETAILS))
#define FOLKS_NAME_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_NAME_DETAILS, FolksNameDetailsIface))

typedef struct _FolksNameDetails FolksNameDetails;
typedef struct _FolksNameDetailsIface FolksNameDetailsIface;

#define FOLKS_TYPE_STRUCTURED_NAME (folks_structured_name_get_type ())
#define FOLKS_STRUCTURED_NAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName))
#define FOLKS_STRUCTURED_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredNameClass))
#define FOLKS_IS_STRUCTURED_NAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_STRUCTURED_NAME))
#define FOLKS_IS_STRUCTURED_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_STRUCTURED_NAME))
#define FOLKS_STRUCTURED_NAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredNameClass))

typedef struct _FolksStructuredName FolksStructuredName;
typedef struct _FolksStructuredNameClass FolksStructuredNameClass;

#define FOLKS_TYPE_NOTE_DETAILS (folks_note_details_get_type ())
#define FOLKS_NOTE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetails))
#define FOLKS_IS_NOTE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_NOTE_DETAILS))
#define FOLKS_NOTE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetailsIface))

typedef struct _FolksNoteDetails FolksNoteDetails;
typedef struct _FolksNoteDetailsIface FolksNoteDetailsIface;

#define FOLKS_TYPE_NOTE_FIELD_DETAILS (folks_note_field_details_get_type ())
#define FOLKS_NOTE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetails))
#define FOLKS_NOTE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetailsClass))
#define FOLKS_IS_NOTE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS))
#define FOLKS_IS_NOTE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_NOTE_FIELD_DETAILS))
#define FOLKS_NOTE_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetailsClass))

typedef struct _FolksNoteFieldDetails FolksNoteFieldDetails;
typedef struct _FolksNoteFieldDetailsClass FolksNoteFieldDetailsClass;

#define FOLKS_TYPE_PRESENCE_DETAILS (folks_presence_details_get_type ())
#define FOLKS_PRESENCE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails))
#define FOLKS_IS_PRESENCE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_PRESENCE_DETAILS))
#define FOLKS_PRESENCE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetailsIface))

typedef struct _FolksPresenceDetails FolksPresenceDetails;
typedef struct _FolksPresenceDetailsIface FolksPresenceDetailsIface;

#define FOLKS_TYPE_PRESENCE_TYPE (folks_presence_type_get_type ())

#define FOLKS_TYPE_PHONE_DETAILS (folks_phone_details_get_type ())
#define FOLKS_PHONE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_PHONE_DETAILS, FolksPhoneDetails))
#define FOLKS_IS_PHONE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_PHONE_DETAILS))
#define FOLKS_PHONE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_PHONE_DETAILS, FolksPhoneDetailsIface))

typedef struct _FolksPhoneDetails FolksPhoneDetails;
typedef struct _FolksPhoneDetailsIface FolksPhoneDetailsIface;

#define FOLKS_TYPE_PHONE_FIELD_DETAILS (folks_phone_field_details_get_type ())
#define FOLKS_PHONE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_PHONE_FIELD_DETAILS, FolksPhoneFieldDetails))
#define FOLKS_PHONE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_PHONE_FIELD_DETAILS, FolksPhoneFieldDetailsClass))
#define FOLKS_IS_PHONE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_PHONE_FIELD_DETAILS))
#define FOLKS_IS_PHONE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_PHONE_FIELD_DETAILS))
#define FOLKS_PHONE_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_PHONE_FIELD_DETAILS, FolksPhoneFieldDetailsClass))

typedef struct _FolksPhoneFieldDetails FolksPhoneFieldDetails;
typedef struct _FolksPhoneFieldDetailsClass FolksPhoneFieldDetailsClass;

#define FOLKS_TYPE_POSTAL_ADDRESS_DETAILS (folks_postal_address_details_get_type ())
#define FOLKS_POSTAL_ADDRESS_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetails))
#define FOLKS_IS_POSTAL_ADDRESS_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_POSTAL_ADDRESS_DETAILS))
#define FOLKS_POSTAL_ADDRESS_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetailsIface))

typedef struct _FolksPostalAddressDetails FolksPostalAddressDetails;
typedef struct _FolksPostalAddressDetailsIface FolksPostalAddressDetailsIface;

#define FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS (folks_postal_address_field_details_get_type ())
#define FOLKS_POSTAL_ADDRESS_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, FolksPostalAddressFieldDetails))
#define FOLKS_POSTAL_ADDRESS_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, FolksPostalAddressFieldDetailsClass))
#define FOLKS_IS_POSTAL_ADDRESS_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS))
#define FOLKS_IS_POSTAL_ADDRESS_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS))
#define FOLKS_POSTAL_ADDRESS_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, FolksPostalAddressFieldDetailsClass))

typedef struct _FolksPostalAddressFieldDetails FolksPostalAddressFieldDetails;
typedef struct _FolksPostalAddressFieldDetailsClass FolksPostalAddressFieldDetailsClass;

#define FOLKS_TYPE_ROLE_DETAILS (folks_role_details_get_type ())
#define FOLKS_ROLE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_ROLE_DETAILS, FolksRoleDetails))
#define FOLKS_IS_ROLE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_ROLE_DETAILS))
#define FOLKS_ROLE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_ROLE_DETAILS, FolksRoleDetailsIface))

typedef struct _FolksRoleDetails FolksRoleDetails;
typedef struct _FolksRoleDetailsIface FolksRoleDetailsIface;

#define FOLKS_TYPE_ROLE_FIELD_DETAILS (folks_role_field_details_get_type ())
#define FOLKS_ROLE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_ROLE_FIELD_DETAILS, FolksRoleFieldDetails))
#define FOLKS_ROLE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_ROLE_FIELD_DETAILS, FolksRoleFieldDetailsClass))
#define FOLKS_IS_ROLE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_ROLE_FIELD_DETAILS))
#define FOLKS_IS_ROLE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_ROLE_FIELD_DETAILS))
#define FOLKS_ROLE_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_ROLE_FIELD_DETAILS, FolksRoleFieldDetailsClass))

typedef struct _FolksRoleFieldDetails FolksRoleFieldDetails;
typedef struct _FolksRoleFieldDetailsClass FolksRoleFieldDetailsClass;

#define FOLKS_TYPE_URL_DETAILS (folks_url_details_get_type ())
#define FOLKS_URL_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_URL_DETAILS, FolksUrlDetails))
#define FOLKS_IS_URL_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_URL_DETAILS))
#define FOLKS_URL_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_URL_DETAILS, FolksUrlDetailsIface))

typedef struct _FolksUrlDetails FolksUrlDetails;
typedef struct _FolksUrlDetailsIface FolksUrlDetailsIface;

#define FOLKS_TYPE_URL_FIELD_DETAILS (folks_url_field_details_get_type ())
#define FOLKS_URL_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_URL_FIELD_DETAILS, FolksUrlFieldDetails))
#define FOLKS_URL_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_URL_FIELD_DETAILS, FolksUrlFieldDetailsClass))
#define FOLKS_IS_URL_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_URL_FIELD_DETAILS))
#define FOLKS_IS_URL_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_URL_FIELD_DETAILS))
#define FOLKS_URL_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_URL_FIELD_DETAILS, FolksUrlFieldDetailsClass))

typedef struct _FolksUrlFieldDetails FolksUrlFieldDetails;
typedef struct _FolksUrlFieldDetailsClass FolksUrlFieldDetailsClass;

#define FOLKS_TYPE_WEB_SERVICE_DETAILS (folks_web_service_details_get_type ())
#define FOLKS_WEB_SERVICE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_WEB_SERVICE_DETAILS, FolksWebServiceDetails))
#define FOLKS_IS_WEB_SERVICE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_WEB_SERVICE_DETAILS))
#define FOLKS_WEB_SERVICE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_WEB_SERVICE_DETAILS, FolksWebServiceDetailsIface))

typedef struct _FolksWebServiceDetails FolksWebServiceDetails;
typedef struct _FolksWebServiceDetailsIface FolksWebServiceDetailsIface;

#define FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS (folks_web_service_field_details_get_type ())
#define FOLKS_WEB_SERVICE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, FolksWebServiceFieldDetails))
#define FOLKS_WEB_SERVICE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, FolksWebServiceFieldDetailsClass))
#define FOLKS_IS_WEB_SERVICE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS))
#define FOLKS_IS_WEB_SERVICE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS))
#define FOLKS_WEB_SERVICE_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, FolksWebServiceFieldDetailsClass))

typedef struct _FolksWebServiceFieldDetails FolksWebServiceFieldDetails;
typedef struct _FolksWebServiceFieldDetailsClass FolksWebServiceFieldDetailsClass;

#define FOLKS_TYPE_INDIVIDUAL (folks_individual_get_type ())
#define FOLKS_INDIVIDUAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_INDIVIDUAL, FolksIndividual))
#define FOLKS_INDIVIDUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_INDIVIDUAL, FolksIndividualClass))
#define FOLKS_IS_INDIVIDUAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_INDIVIDUAL))
#define FOLKS_IS_INDIVIDUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_INDIVIDUAL))
#define FOLKS_INDIVIDUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_INDIVIDUAL, FolksIndividualClass))

typedef struct _FolksIndividual FolksIndividual;
typedef struct _FolksIndividualClass FolksIndividualClass;
typedef struct _FolksIndividualPrivate FolksIndividualPrivate;

#define FOLKS_TYPE_PERSONA (folks_persona_get_type ())
#define FOLKS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_PERSONA, FolksPersona))
#define FOLKS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_PERSONA, FolksPersonaClass))
#define FOLKS_IS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_PERSONA))
#define FOLKS_IS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_PERSONA))
#define FOLKS_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_PERSONA, FolksPersonaClass))

typedef struct _FolksPersona FolksPersona;
typedef struct _FolksPersonaClass FolksPersonaClass;

#define FOLKS_TYPE_PERSONA_STORE (folks_persona_store_get_type ())
#define FOLKS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_PERSONA_STORE, FolksPersonaStore))
#define FOLKS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_PERSONA_STORE, FolksPersonaStoreClass))
#define FOLKS_IS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_PERSONA_STORE))
#define FOLKS_IS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_PERSONA_STORE))
#define FOLKS_PERSONA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_PERSONA_STORE, FolksPersonaStoreClass))

typedef struct _FolksPersonaStore FolksPersonaStore;
typedef struct _FolksPersonaStoreClass FolksPersonaStoreClass;
#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 _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FolksIndividualChangeAvatarData FolksIndividualChangeAvatarData;
typedef struct _FolksIndividualChangeAliasData FolksIndividualChangeAliasData;
typedef struct _FolksIndividualChangeNicknameData FolksIndividualChangeNicknameData;
typedef struct _FolksIndividualChangeIsFavouriteData FolksIndividualChangeIsFavouriteData;
typedef struct _FolksIndividualChangeGroupsData FolksIndividualChangeGroupsData;
typedef struct _FolksIndividualChangeGroupData FolksIndividualChangeGroupData;

#define FOLKS_GROUP_DETAILS_TYPE_CHANGE_REASON (folks_group_details_change_reason_get_type ())
typedef struct _Block2Data Block2Data;
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))

#define FOLKS_TYPE_PERSONA_STORE_TRUST (folks_persona_store_trust_get_type ())
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

typedef enum  {
	FOLKS_TRUST_LEVEL_NONE,
	FOLKS_TRUST_LEVEL_PERSONAS
} FolksTrustLevel;

typedef enum  {
	FOLKS_PROPERTY_ERROR_NOT_WRITEABLE,
	FOLKS_PROPERTY_ERROR_INVALID_VALUE,
	FOLKS_PROPERTY_ERROR_UNKNOWN_ERROR
} FolksPropertyError;
#define FOLKS_PROPERTY_ERROR folks_property_error_quark ()
struct _FolksAliasDetailsIface {
	GTypeInterface parent_iface;
	void (*change_alias) (FolksAliasDetails* self, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_alias_finish) (FolksAliasDetails* self, GAsyncResult* _res_, GError** error);
	const gchar* (*get_alias) (FolksAliasDetails* self);
	void (*set_alias) (FolksAliasDetails* self, const gchar* value);
};

struct _FolksAvatarDetailsIface {
	GTypeInterface parent_iface;
	void (*change_avatar) (FolksAvatarDetails* self, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_avatar_finish) (FolksAvatarDetails* self, GAsyncResult* _res_, GError** error);
	GLoadableIcon* (*get_avatar) (FolksAvatarDetails* self);
	void (*set_avatar) (FolksAvatarDetails* self, GLoadableIcon* value);
};

struct _FolksBirthdayDetailsIface {
	GTypeInterface parent_iface;
	void (*change_birthday) (FolksBirthdayDetails* self, GDateTime* birthday, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_birthday_finish) (FolksBirthdayDetails* self, GAsyncResult* _res_, GError** error);
	void (*change_calendar_event_id) (FolksBirthdayDetails* self, const gchar* event_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_calendar_event_id_finish) (FolksBirthdayDetails* self, GAsyncResult* _res_, GError** error);
	GDateTime* (*get_birthday) (FolksBirthdayDetails* self);
	void (*set_birthday) (FolksBirthdayDetails* self, GDateTime* value);
	const gchar* (*get_calendar_event_id) (FolksBirthdayDetails* self);
	void (*set_calendar_event_id) (FolksBirthdayDetails* self, const gchar* value);
};

struct _FolksEmailDetailsIface {
	GTypeInterface parent_iface;
	void (*change_email_addresses) (FolksEmailDetails* self, GeeSet* email_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_email_addresses_finish) (FolksEmailDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_email_addresses) (FolksEmailDetails* self);
	void (*set_email_addresses) (FolksEmailDetails* self, GeeSet* value);
};

struct _FolksFavouriteDetailsIface {
	GTypeInterface parent_iface;
	void (*change_is_favourite) (FolksFavouriteDetails* self, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_is_favourite_finish) (FolksFavouriteDetails* self, GAsyncResult* _res_, GError** error);
	gboolean (*get_is_favourite) (FolksFavouriteDetails* self);
	void (*set_is_favourite) (FolksFavouriteDetails* self, gboolean value);
};

typedef enum  {
	FOLKS_GENDER_UNSPECIFIED,
	FOLKS_GENDER_MALE,
	FOLKS_GENDER_FEMALE
} FolksGender;

struct _FolksGenderDetailsIface {
	GTypeInterface parent_iface;
	void (*change_gender) (FolksGenderDetails* self, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_gender_finish) (FolksGenderDetails* self, GAsyncResult* _res_, GError** error);
	FolksGender (*get_gender) (FolksGenderDetails* self);
	void (*set_gender) (FolksGenderDetails* self, FolksGender value);
};

struct _FolksGroupDetailsIface {
	GTypeInterface parent_iface;
	void (*change_group) (FolksGroupDetails* self, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_group_finish) (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
	void (*change_groups) (FolksGroupDetails* self, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_groups_finish) (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_groups) (FolksGroupDetails* self);
	void (*set_groups) (FolksGroupDetails* self, GeeSet* value);
};

struct _FolksImDetailsIface {
	GTypeInterface parent_iface;
	void (*change_im_addresses) (FolksImDetails* self, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_im_addresses_finish) (FolksImDetails* self, GAsyncResult* _res_, GError** error);
	GeeMultiMap* (*get_im_addresses) (FolksImDetails* self);
	void (*set_im_addresses) (FolksImDetails* self, GeeMultiMap* value);
};

struct _FolksInteractionDetailsIface {
	GTypeInterface parent_iface;
	guint (*get_im_interaction_count) (FolksInteractionDetails* self);
	GDateTime* (*get_last_im_interaction_datetime) (FolksInteractionDetails* self);
	guint (*get_call_interaction_count) (FolksInteractionDetails* self);
	GDateTime* (*get_last_call_interaction_datetime) (FolksInteractionDetails* self);
};

struct _FolksLocalIdDetailsIface {
	GTypeInterface parent_iface;
	void (*change_local_ids) (FolksLocalIdDetails* self, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_local_ids_finish) (FolksLocalIdDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_local_ids) (FolksLocalIdDetails* self);
	void (*set_local_ids) (FolksLocalIdDetails* self, GeeSet* value);
};

struct _FolksNameDetailsIface {
	GTypeInterface parent_iface;
	void (*change_structured_name) (FolksNameDetails* self, FolksStructuredName* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_structured_name_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
	void (*change_full_name) (FolksNameDetails* self, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_full_name_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
	void (*change_nickname) (FolksNameDetails* self, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_nickname_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
	FolksStructuredName* (*get_structured_name) (FolksNameDetails* self);
	void (*set_structured_name) (FolksNameDetails* self, FolksStructuredName* value);
	const gchar* (*get_full_name) (FolksNameDetails* self);
	void (*set_full_name) (FolksNameDetails* self, const gchar* value);
	const gchar* (*get_nickname) (FolksNameDetails* self);
	void (*set_nickname) (FolksNameDetails* self, const gchar* value);
};

struct _FolksNoteDetailsIface {
	GTypeInterface parent_iface;
	void (*change_notes) (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_notes_finish) (FolksNoteDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_notes) (FolksNoteDetails* self);
	void (*set_notes) (FolksNoteDetails* self, GeeSet* value);
};

typedef enum  {
	FOLKS_PRESENCE_TYPE_UNSET,
	FOLKS_PRESENCE_TYPE_OFFLINE,
	FOLKS_PRESENCE_TYPE_AVAILABLE,
	FOLKS_PRESENCE_TYPE_AWAY,
	FOLKS_PRESENCE_TYPE_EXTENDED_AWAY,
	FOLKS_PRESENCE_TYPE_HIDDEN,
	FOLKS_PRESENCE_TYPE_BUSY,
	FOLKS_PRESENCE_TYPE_UNKNOWN,
	FOLKS_PRESENCE_TYPE_ERROR
} FolksPresenceType;

struct _FolksPresenceDetailsIface {
	GTypeInterface parent_iface;
	FolksPresenceType (*get_presence_type) (FolksPresenceDetails* self);
	void (*set_presence_type) (FolksPresenceDetails* self, FolksPresenceType value);
	const gchar* (*get_presence_message) (FolksPresenceDetails* self);
	void (*set_presence_message) (FolksPresenceDetails* self, const gchar* value);
	const gchar* (*get_presence_status) (FolksPresenceDetails* self);
	void (*set_presence_status) (FolksPresenceDetails* self, const gchar* value);
};

struct _FolksPhoneDetailsIface {
	GTypeInterface parent_iface;
	void (*change_phone_numbers) (FolksPhoneDetails* self, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_phone_numbers_finish) (FolksPhoneDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_phone_numbers) (FolksPhoneDetails* self);
	void (*set_phone_numbers) (FolksPhoneDetails* self, GeeSet* value);
};

struct _FolksPostalAddressDetailsIface {
	GTypeInterface parent_iface;
	void (*change_postal_addresses) (FolksPostalAddressDetails* self, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_postal_addresses_finish) (FolksPostalAddressDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_postal_addresses) (FolksPostalAddressDetails* self);
	void (*set_postal_addresses) (FolksPostalAddressDetails* self, GeeSet* value);
};

struct _FolksRoleDetailsIface {
	GTypeInterface parent_iface;
	void (*change_roles) (FolksRoleDetails* self, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_roles_finish) (FolksRoleDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_roles) (FolksRoleDetails* self);
	void (*set_roles) (FolksRoleDetails* self, GeeSet* value);
};

struct _FolksUrlDetailsIface {
	GTypeInterface parent_iface;
	void (*change_urls) (FolksUrlDetails* self, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_urls_finish) (FolksUrlDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_urls) (FolksUrlDetails* self);
	void (*set_urls) (FolksUrlDetails* self, GeeSet* value);
};

struct _FolksWebServiceDetailsIface {
	GTypeInterface parent_iface;
	void (*change_web_service_addresses) (FolksWebServiceDetails* self, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_web_service_addresses_finish) (FolksWebServiceDetails* self, GAsyncResult* _res_, GError** error);
	GeeMultiMap* (*get_web_service_addresses) (FolksWebServiceDetails* self);
	void (*set_web_service_addresses) (FolksWebServiceDetails* self, GeeMultiMap* value);
};

struct _FolksIndividual {
	GObject parent_instance;
	FolksIndividualPrivate * priv;
};

struct _FolksIndividualClass {
	GObjectClass parent_class;
};

struct _FolksIndividualPrivate {
	GeeHashSet* _persona_set;
	GeeSet* _persona_set_ro;
	GeeHashMap* _stores;
	guint _persona_user_count;
	FolksTrustLevel _trust_level;
	GLoadableIcon* _avatar;
	FolksPresenceType _presence_type;
	gchar* _presence_status;
	gchar* _presence_message;
	gboolean _is_user;
	gchar* _id;
	gchar* _alias;
	FolksStructuredName* _structured_name;
	gchar* _full_name;
	gchar* _nickname;
	FolksGender _gender;
	GeeHashSet* _urls;
	GeeSet* _urls_ro;
	GeeHashSet* _phone_numbers;
	GeeSet* _phone_numbers_ro;
	GeeHashSet* _email_addresses;
	GeeSet* _email_addresses_ro;
	GeeHashSet* _roles;
	GeeSet* _roles_ro;
	GeeHashSet* _local_ids;
	GeeSet* _local_ids_ro;
	GDateTime* _birthday;
	gchar* _calendar_event_id;
	GeeHashSet* _notes;
	GeeSet* _notes_ro;
	GeeHashSet* _postal_addresses;
	GeeSet* _postal_addresses_ro;
	gboolean _is_favourite;
	GeeHashSet* _groups;
	GeeSet* _groups_ro;
	GeeHashMultiMap* _im_addresses;
	GeeHashMultiMap* _web_service_addresses;
	GDateTime* _last_im_interaction_datetime;
	GDateTime* _last_call_interaction_datetime;
};

struct _FolksIndividualChangeAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	GLoadableIcon* avatar;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GLoadableIcon* _tmp2_;
	GLoadableIcon* _tmp3_;
	GLoadableIcon* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GLoadableIcon* _tmp8_;
	GLoadableIcon* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	const gchar* _tmp12_;
	GLoadableIcon* _tmp13_;
	GError* persona_error;
	gboolean avatar_changed;
	GeeHashSet* _tmp14_;
	GeeIterator* _tmp15_;
	GeeIterator* _p_it;
	GeeIterator* _tmp16_;
	gboolean _tmp17_;
	GeeIterator* _tmp18_;
	gpointer _tmp19_;
	FolksPersona* p;
	FolksPersona* _tmp20_;
	FolksAvatarDetails* _tmp21_;
	FolksAvatarDetails* _a;
	FolksAvatarDetails* _tmp22_;
	FolksAvatarDetails* _tmp23_;
	FolksAvatarDetails* _tmp24_;
	FolksAvatarDetails* a;
	FolksPersona* _tmp25_;
	gchar** _tmp26_;
	gint _tmp26__length1;
	gchar** _tmp27_;
	gint _tmp27__length1;
	FolksAvatarDetails* _tmp28_;
	GLoadableIcon* _tmp29_;
	FolksPersona* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GError* e;
	GError* _tmp33_;
	GError* _tmp34_;
	GError* _tmp35_;
	gboolean _tmp36_;
	GError* _tmp37_;
	GError* _tmp38_;
	GError* _tmp39_;
	GError * _inner_error_;
};

struct _FolksIndividualChangeAliasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	gchar* alias;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GError* persona_error;
	gboolean alias_changed;
	GeeHashSet* _tmp4_;
	GeeIterator* _tmp5_;
	GeeIterator* _p_it;
	GeeIterator* _tmp6_;
	gboolean _tmp7_;
	GeeIterator* _tmp8_;
	gpointer _tmp9_;
	FolksPersona* p;
	FolksPersona* _tmp10_;
	FolksAliasDetails* _tmp11_;
	FolksAliasDetails* _a;
	FolksAliasDetails* _tmp12_;
	FolksAliasDetails* _tmp13_;
	FolksAliasDetails* _tmp14_;
	FolksAliasDetails* a;
	FolksPersona* _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	gchar** _tmp17_;
	gint _tmp17__length1;
	FolksAliasDetails* _tmp18_;
	const gchar* _tmp19_;
	FolksPersona* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	GError* e;
	GError* _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	gboolean _tmp26_;
	GError* _tmp27_;
	GError* _tmp28_;
	GError* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	GError * _inner_error_;
};

struct _FolksIndividualChangeNicknameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	gchar* nickname;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GError* persona_error;
	gboolean nickname_changed;
	GeeHashSet* _tmp5_;
	GeeIterator* _tmp6_;
	GeeIterator* _p_it;
	GeeIterator* _tmp7_;
	gboolean _tmp8_;
	GeeIterator* _tmp9_;
	gpointer _tmp10_;
	FolksPersona* p;
	FolksPersona* _tmp11_;
	FolksNameDetails* _tmp12_;
	FolksNameDetails* _n;
	FolksNameDetails* _tmp13_;
	FolksNameDetails* _tmp14_;
	FolksNameDetails* _tmp15_;
	FolksNameDetails* n;
	FolksPersona* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gchar** _tmp18_;
	gint _tmp18__length1;
	FolksNameDetails* _tmp19_;
	const gchar* _tmp20_;
	FolksPersona* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	GError* e;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	gboolean _tmp27_;
	GError* _tmp28_;
	GError* _tmp29_;
	GError* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	GError * _inner_error_;
};

struct _FolksIndividualChangeIsFavouriteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	gboolean is_favourite;
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GError* persona_error;
	gboolean is_favourite_changed;
	GeeHashSet* _tmp6_;
	GeeIterator* _tmp7_;
	GeeIterator* _p_it;
	GeeIterator* _tmp8_;
	gboolean _tmp9_;
	GeeIterator* _tmp10_;
	gpointer _tmp11_;
	FolksPersona* p;
	FolksPersona* _tmp12_;
	FolksFavouriteDetails* _tmp13_;
	FolksFavouriteDetails* _a;
	FolksFavouriteDetails* _tmp14_;
	FolksFavouriteDetails* _tmp15_;
	FolksFavouriteDetails* _tmp16_;
	FolksFavouriteDetails* a;
	FolksPersona* _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	gchar** _tmp19_;
	gint _tmp19__length1;
	FolksFavouriteDetails* _tmp20_;
	gboolean _tmp21_;
	FolksPersona* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	GError* e;
	GError* _tmp25_;
	GError* _tmp26_;
	GError* _tmp27_;
	gboolean _tmp28_;
	GError* _tmp29_;
	GError* _tmp30_;
	GError* _tmp31_;
	gboolean _tmp32_;
	GError * _inner_error_;
};

struct _FolksIndividualChangeGroupsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	GeeSet* groups;
	const gchar* _tmp0_;
	GError* persona_error;
	gboolean groups_changed;
	GeeHashSet* _tmp1_;
	GeeIterator* _tmp2_;
	GeeIterator* _p_it;
	GeeIterator* _tmp3_;
	gboolean _tmp4_;
	GeeIterator* _tmp5_;
	gpointer _tmp6_;
	FolksPersona* p;
	FolksPersona* _tmp7_;
	FolksGroupDetails* _tmp8_;
	FolksGroupDetails* _g;
	FolksGroupDetails* _tmp9_;
	FolksGroupDetails* _tmp10_;
	FolksGroupDetails* _tmp11_;
	FolksGroupDetails* g;
	FolksPersona* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	gchar** _tmp14_;
	gint _tmp14__length1;
	FolksGroupDetails* _tmp15_;
	GeeSet* _tmp16_;
	FolksPersona* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GError* e;
	GError* _tmp20_;
	GError* _tmp21_;
	GError* _tmp22_;
	gboolean _tmp23_;
	GError* _tmp24_;
	GError* _tmp25_;
	GError* _tmp26_;
	GError * _inner_error_;
};

struct _FolksIndividualChangeGroupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividual* self;
	gchar* group;
	gboolean is_member;
	GeeHashSet* _tmp0_;
	GeeIterator* _tmp1_;
	GeeIterator* _p_it;
	GeeIterator* _tmp2_;
	gboolean _tmp3_;
	GeeIterator* _tmp4_;
	gpointer _tmp5_;
	FolksPersona* p;
	FolksPersona* _tmp6_;
	FolksPersona* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp9_;
};

typedef enum  {
	FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE = 0,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_OFFLINE = 1,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_KICKED = 2,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_BUSY = 3,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_INVITED = 4,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_BANNED = 5,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_ERROR = 6,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_INVALID_MEMBER = 7,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_NO_ANSWER = 8,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_RENAMED = 9,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_PERMISSION_DENIED = 10,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_SEPARATED = 11
} FolksGroupDetailsChangeReason;

typedef gboolean (*FolksIndividualPropertyFilter) (FolksPersona* persona, void* user_data);
typedef void (*FolksIndividualSingleValuedPropertySetter) (FolksPersona* chosen_persona, void* user_data);
struct _Block2Data {
	int _ref_count_;
	FolksIndividual * self;
	FolksIndividualPropertyFilter filter_func;
	gpointer filter_func_target;
	GCompareFunc compare_func;
	gchar* prop_name;
};

typedef enum  {
	FOLKS_PERSONA_STORE_TRUST_NONE,
	FOLKS_PERSONA_STORE_TRUST_PARTIAL,
	FOLKS_PERSONA_STORE_TRUST_FULL
} FolksPersonaStoreTrust;


static gpointer folks_individual_parent_class = NULL;
static FolksAliasDetailsIface* folks_individual_folks_alias_details_parent_iface = NULL;
static FolksAvatarDetailsIface* folks_individual_folks_avatar_details_parent_iface = NULL;
static FolksBirthdayDetailsIface* folks_individual_folks_birthday_details_parent_iface = NULL;
static FolksEmailDetailsIface* folks_individual_folks_email_details_parent_iface = NULL;
static FolksFavouriteDetailsIface* folks_individual_folks_favourite_details_parent_iface = NULL;
static FolksGenderDetailsIface* folks_individual_folks_gender_details_parent_iface = NULL;
static FolksGroupDetailsIface* folks_individual_folks_group_details_parent_iface = NULL;
static FolksImDetailsIface* folks_individual_folks_im_details_parent_iface = NULL;
static FolksInteractionDetailsIface* folks_individual_folks_interaction_details_parent_iface = NULL;
static FolksLocalIdDetailsIface* folks_individual_folks_local_id_details_parent_iface = NULL;
static FolksNameDetailsIface* folks_individual_folks_name_details_parent_iface = NULL;
static FolksNoteDetailsIface* folks_individual_folks_note_details_parent_iface = NULL;
static FolksPresenceDetailsIface* folks_individual_folks_presence_details_parent_iface = NULL;
static FolksPhoneDetailsIface* folks_individual_folks_phone_details_parent_iface = NULL;
static FolksPostalAddressDetailsIface* folks_individual_folks_postal_address_details_parent_iface = NULL;
static FolksRoleDetailsIface* folks_individual_folks_role_details_parent_iface = NULL;
static FolksUrlDetailsIface* folks_individual_folks_url_details_parent_iface = NULL;
static FolksWebServiceDetailsIface* folks_individual_folks_web_service_details_parent_iface = NULL;

GType folks_trust_level_get_type (void) G_GNUC_CONST;
GQuark folks_property_error_quark (void);
GType folks_alias_details_get_type (void) G_GNUC_CONST;
GType folks_avatar_details_get_type (void) G_GNUC_CONST;
GType folks_birthday_details_get_type (void) G_GNUC_CONST;
GType folks_abstract_field_details_get_type (void) G_GNUC_CONST;
GType folks_email_field_details_get_type (void) G_GNUC_CONST;
GType folks_email_details_get_type (void) G_GNUC_CONST;
GType folks_favourite_details_get_type (void) G_GNUC_CONST;
GType folks_gender_get_type (void) G_GNUC_CONST;
GType folks_gender_details_get_type (void) G_GNUC_CONST;
GType folks_group_details_get_type (void) G_GNUC_CONST;
GType folks_im_field_details_get_type (void) G_GNUC_CONST;
GType folks_im_details_get_type (void) G_GNUC_CONST;
GType folks_interaction_details_get_type (void) G_GNUC_CONST;
GType folks_local_id_details_get_type (void) G_GNUC_CONST;
GType folks_structured_name_get_type (void) G_GNUC_CONST;
GType folks_name_details_get_type (void) G_GNUC_CONST;
GType folks_note_field_details_get_type (void) G_GNUC_CONST;
GType folks_note_details_get_type (void) G_GNUC_CONST;
GType folks_presence_type_get_type (void) G_GNUC_CONST;
GType folks_presence_details_get_type (void) G_GNUC_CONST;
GType folks_phone_field_details_get_type (void) G_GNUC_CONST;
GType folks_phone_details_get_type (void) G_GNUC_CONST;
GType folks_postal_address_field_details_get_type (void) G_GNUC_CONST;
GType folks_postal_address_details_get_type (void) G_GNUC_CONST;
GType folks_role_field_details_get_type (void) G_GNUC_CONST;
GType folks_role_details_get_type (void) G_GNUC_CONST;
GType folks_url_field_details_get_type (void) G_GNUC_CONST;
GType folks_url_details_get_type (void) G_GNUC_CONST;
GType folks_web_service_field_details_get_type (void) G_GNUC_CONST;
GType folks_web_service_details_get_type (void) G_GNUC_CONST;
GType folks_individual_get_type (void) G_GNUC_CONST;
GType folks_persona_get_type (void) G_GNUC_CONST;
GType folks_persona_store_get_type (void) G_GNUC_CONST;
#define FOLKS_INDIVIDUAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_TYPE_INDIVIDUAL, FolksIndividualPrivate))
enum  {
	FOLKS_INDIVIDUAL_DUMMY_PROPERTY,
	FOLKS_INDIVIDUAL_TRUST_LEVEL,
	FOLKS_INDIVIDUAL_AVATAR,
	FOLKS_INDIVIDUAL_PRESENCE_TYPE,
	FOLKS_INDIVIDUAL_PRESENCE_STATUS,
	FOLKS_INDIVIDUAL_PRESENCE_MESSAGE,
	FOLKS_INDIVIDUAL_IS_USER,
	FOLKS_INDIVIDUAL_ID,
	FOLKS_INDIVIDUAL_ALIAS,
	FOLKS_INDIVIDUAL_STRUCTURED_NAME,
	FOLKS_INDIVIDUAL_FULL_NAME,
	FOLKS_INDIVIDUAL_NICKNAME,
	FOLKS_INDIVIDUAL_GENDER,
	FOLKS_INDIVIDUAL_URLS,
	FOLKS_INDIVIDUAL_PHONE_NUMBERS,
	FOLKS_INDIVIDUAL_EMAIL_ADDRESSES,
	FOLKS_INDIVIDUAL_ROLES,
	FOLKS_INDIVIDUAL_LOCAL_IDS,
	FOLKS_INDIVIDUAL_BIRTHDAY,
	FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID,
	FOLKS_INDIVIDUAL_NOTES,
	FOLKS_INDIVIDUAL_POSTAL_ADDRESSES,
	FOLKS_INDIVIDUAL_IS_FAVOURITE,
	FOLKS_INDIVIDUAL_GROUPS,
	FOLKS_INDIVIDUAL_IM_ADDRESSES,
	FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES,
	FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT,
	FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME,
	FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT,
	FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME,
	FOLKS_INDIVIDUAL_PERSONAS
};
const gchar* folks_individual_get_id (FolksIndividual* self);
guint folks_abstract_field_details_hash (FolksAbstractFieldDetails* self);
gboolean folks_abstract_field_details_equal (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that);
static guint _folks_abstract_field_details_hash_ghash_func (gconstpointer key);
static void folks_individual_real_change_avatar_data_free (gpointer _data);
static void folks_individual_real_change_avatar (FolksAvatarDetails* base, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_avatar_co (FolksIndividualChangeAvatarData* _data_);
gchar** folks_persona_get_writeable_properties (FolksPersona* self, int* result_length1);
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
void folks_avatar_details_change_avatar (FolksAvatarDetails* self, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_avatar_details_change_avatar_finish (FolksAvatarDetails* self, GAsyncResult* _res_, GError** error);
static void folks_individual_change_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
const gchar* folks_persona_get_uid (FolksPersona* self);
static void folks_individual_real_change_alias_data_free (gpointer _data);
static void folks_individual_real_change_alias (FolksAliasDetails* base, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_alias_co (FolksIndividualChangeAliasData* _data_);
void folks_alias_details_change_alias (FolksAliasDetails* self, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_alias_details_change_alias_finish (FolksAliasDetails* self, GAsyncResult* _res_, GError** error);
static void folks_individual_change_alias_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_individual_real_change_nickname_data_free (gpointer _data);
static void folks_individual_real_change_nickname (FolksNameDetails* base, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_nickname_co (FolksIndividualChangeNicknameData* _data_);
void folks_name_details_change_nickname (FolksNameDetails* self, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_name_details_change_nickname_finish (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
static void folks_individual_change_nickname_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_individual_real_change_is_favourite_data_free (gpointer _data);
static void folks_individual_real_change_is_favourite (FolksFavouriteDetails* base, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_is_favourite_co (FolksIndividualChangeIsFavouriteData* _data_);
void folks_favourite_details_change_is_favourite (FolksFavouriteDetails* self, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_favourite_details_change_is_favourite_finish (FolksFavouriteDetails* self, GAsyncResult* _res_, GError** error);
static void folks_individual_change_is_favourite_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_individual_real_change_groups_data_free (gpointer _data);
static void folks_individual_real_change_groups (FolksGroupDetails* base, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_groups_co (FolksIndividualChangeGroupsData* _data_);
void folks_group_details_change_groups (FolksGroupDetails* self, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_group_details_change_groups_finish (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
static void folks_individual_change_groups_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _folks_individual_update_groups (FolksIndividual* self);
static void _folks_individual_notify_alias_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_alias (FolksIndividual* self);
static void _folks_individual_notify_avatar_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_avatar (FolksIndividual* self);
static void _folks_individual_notify_full_name_cb (FolksIndividual* self);
static void _folks_individual_update_full_name (FolksIndividual* self);
static void _folks_individual_notify_structured_name_cb (FolksIndividual* self);
static void _folks_individual_update_structured_name (FolksIndividual* self);
static void _folks_individual_notify_nickname_cb (FolksIndividual* self);
static void _folks_individual_update_nickname (FolksIndividual* self);
static void _folks_individual_persona_group_changed_cb (FolksIndividual* self, const gchar* group, gboolean is_member);
static void _folks_individual_notify_gender_cb (FolksIndividual* self);
static void _folks_individual_update_gender (FolksIndividual* self);
static void _folks_individual_notify_urls_cb (FolksIndividual* self);
static void _folks_individual_update_urls (FolksIndividual* self);
static void _folks_individual_notify_phone_numbers_cb (FolksIndividual* self);
static void _folks_individual_update_phone_numbers (FolksIndividual* self);
static void _folks_individual_notify_postal_addresses_cb (FolksIndividual* self);
static void _folks_individual_update_postal_addresses (FolksIndividual* self);
static void _folks_individual_notify_email_addresses_cb (FolksIndividual* self);
static void _folks_individual_update_email_addresses (FolksIndividual* self);
static void _folks_individual_notify_roles_cb (FolksIndividual* self);
static void _folks_individual_update_roles (FolksIndividual* self);
static void _folks_individual_notify_birthday_cb (FolksIndividual* self);
static void _folks_individual_update_birthday (FolksIndividual* self);
static void _folks_individual_notify_notes_cb (FolksIndividual* self);
static void _folks_individual_update_notes (FolksIndividual* self);
static void _folks_individual_notify_local_ids_cb (FolksIndividual* self);
static void _folks_individual_update_local_ids (FolksIndividual* self);
static void folks_individual_real_change_group_data_free (gpointer _data);
static void folks_individual_real_change_group (FolksGroupDetails* base, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_individual_real_change_group_co (FolksIndividualChangeGroupData* _data_);
void folks_group_details_change_group (FolksGroupDetails* self, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_group_details_change_group_finish (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
static void _folks_individual_notify_presence_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_presence (FolksIndividual* self);
static void _folks_individual_notify_im_addresses_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_im_addresses (FolksIndividual* self);
static void _folks_individual_notify_web_service_addresses_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_web_service_addresses (FolksIndividual* self);
static void _folks_individual_notify_is_favourite_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_update_is_favourite (FolksIndividual* self);
static void _folks_individual_notify_im_interaction_count_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_notify_call_interaction_count_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_notify_last_im_interaction_datetime_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
static void _folks_individual_notify_last_call_interaction_datetime_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps);
FolksIndividual* folks_individual_new (GeeSet* personas);
FolksIndividual* folks_individual_construct (GType object_type, GeeSet* personas);
static void _folks_individual_emit_personas_changed (FolksIndividual* self, GeeSet* added, GeeSet* removed);
static void _folks_individual_store_removed_cb (FolksIndividual* self, FolksPersonaStore* store);
FolksPersonaStore* folks_persona_get_store (FolksPersona* self);
static void _folks_individual_set_personas (FolksIndividual* self, GeeSet* personas, FolksIndividual* replacement_individual);
GType folks_group_details_change_reason_get_type (void) G_GNUC_CONST;
static void _folks_individual_store_personas_changed_cb (FolksIndividual* self, FolksPersonaStore* store, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason);
static void _folks_individual_update_fields (FolksIndividual* self);
static void _folks_individual_update_trust_level (FolksIndividual* self);
static void _folks_individual_update_single_valued_property (FolksIndividual* self, GType interface_type, FolksIndividualPropertyFilter filter_func, void* filter_func_target, GCompareFunc compare_func, const gchar* prop_name, FolksIndividualSingleValuedPropertySetter setter, void* setter_target);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gint __lambda5_ (Block2Data* _data2_, FolksPersona* a, FolksPersona* b);
gboolean folks_persona_store_get_is_primary_store (FolksPersonaStore* self);
static gint ___lambda5__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
GeeSet* folks_group_details_get_groups (FolksGroupDetails* self);
static void __lambda4_ (FolksIndividual* self, const gchar* l);
static void ___lambda4__gfunc (gconstpointer data, gpointer self);
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static gboolean __lambda27_ (FolksIndividual* self, FolksPersona* p);
FolksPresenceType folks_presence_details_get_presence_type (FolksPresenceDetails* self);
static gboolean ___lambda27__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda28_ (FolksPersona* a, FolksPersona* b);
gint folks_presence_details_typecmp (FolksPresenceType type_a, FolksPresenceType type_b);
static gint ___lambda28__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda29_ (FolksIndividual* self, FolksPersona* p);
const gchar* folks_presence_details_get_presence_message (FolksPresenceDetails* self);
const gchar* folks_presence_details_get_presence_status (FolksPresenceDetails* self);
void folks_presence_details_set_presence_message (FolksPresenceDetails* self, const gchar* value);
void folks_presence_details_set_presence_type (FolksPresenceDetails* self, FolksPresenceType value);
void folks_presence_details_set_presence_status (FolksPresenceDetails* self, const gchar* value);
static void ___lambda29__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static gboolean __lambda30_ (FolksIndividual* self, FolksPersona* p);
static gboolean ___lambda30__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda31_ (FolksPersona* a, FolksPersona* b);
gboolean folks_favourite_details_get_is_favourite (FolksFavouriteDetails* self);
static gint ___lambda31__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda32_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda32__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static gboolean __lambda6_ (FolksIndividual* self, FolksPersona* p);
const gchar* folks_alias_details_get_alias (FolksAliasDetails* self);
static gboolean ___lambda6__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda7_ (FolksPersona* a, FolksPersona* b);
const gchar* folks_persona_get_display_id (FolksPersona* self);
static gint ___lambda7__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda8_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda8__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static gboolean __lambda9_ (FolksIndividual* self, FolksPersona* p);
GLoadableIcon* folks_avatar_details_get_avatar (FolksAvatarDetails* self);
static gboolean ___lambda9__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda10_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda10__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda11_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda11__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
gboolean folks_persona_get_is_user (FolksPersona* self);
GType folks_persona_store_trust_get_type (void) G_GNUC_CONST;
FolksPersonaStoreTrust folks_persona_store_get_trust_level (FolksPersonaStore* self);
FolksTrustLevel folks_individual_get_trust_level (FolksIndividual* self);
static void folks_individual_set_trust_level (FolksIndividual* self, FolksTrustLevel value);
GeeMultiMap* folks_im_details_get_im_addresses (FolksImDetails* self);
GeeSet* folks_individual_get_personas (FolksIndividual* self);
GeeMultiMap* folks_web_service_details_get_web_service_addresses (FolksWebServiceDetails* self);
static void _folks_individual_connect_to_persona (FolksIndividual* self, FolksPersona* persona);
void folks_persona_set_individual (FolksPersona* self, FolksIndividual* value);
static void __folks_individual_notify_alias_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_presence_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_web_service_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_is_favourite_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_structured_name_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_full_name_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_nickname_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_gender_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_urls_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_phone_numbers_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_email_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_roles_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_birthday_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_notes_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_postal_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_local_ids_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_persona_group_changed_cb_folks_group_details_group_changed (FolksGroupDetails* _sender, const gchar* group, gboolean is_member, gpointer self);
static void __folks_individual_notify_im_interaction_count_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_call_interaction_count_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_last_im_interaction_datetime_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __folks_individual_notify_last_call_interaction_datetime_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean __lambda15_ (FolksIndividual* self, FolksPersona* p);
FolksStructuredName* folks_name_details_get_structured_name (FolksNameDetails* self);
gboolean folks_structured_name_is_empty (FolksStructuredName* self);
static gboolean ___lambda15__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda16_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda16__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda17_ (FolksIndividual* self, FolksPersona* p);
gboolean folks_structured_name_equal (FolksStructuredName* self, FolksStructuredName* other);
static void ___lambda17__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static gboolean __lambda12_ (FolksIndividual* self, FolksPersona* p);
const gchar* folks_name_details_get_full_name (FolksNameDetails* self);
static gboolean ___lambda12__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda13_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda13__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda14_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda14__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static gboolean __lambda18_ (FolksIndividual* self, FolksPersona* p);
const gchar* folks_name_details_get_nickname (FolksNameDetails* self);
static gboolean ___lambda18__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda19_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda19__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda20_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda20__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
static void _folks_individual_disconnect_from_persona (FolksIndividual* self, FolksPersona* persona, FolksIndividual* replacement_individual);
FolksIndividual* folks_persona_get_individual (FolksPersona* self);
static gboolean __lambda21_ (FolksIndividual* self, FolksPersona* p);
FolksGender folks_gender_details_get_gender (FolksGenderDetails* self);
static gboolean ___lambda21__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda22_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda22__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda23_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda23__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
GeeSet* folks_url_details_get_urls (FolksUrlDetails* self);
gconstpointer folks_abstract_field_details_get_value (FolksAbstractFieldDetails* self);
void folks_abstract_field_details_extend_parameters (FolksAbstractFieldDetails* self, GeeMultiMap* additional);
GeeMultiMap* folks_abstract_field_details_get_parameters (FolksAbstractFieldDetails* self);
FolksUrlFieldDetails* folks_url_field_details_new (const gchar* value, GeeMultiMap* parameters);
FolksUrlFieldDetails* folks_url_field_details_construct (GType object_type, const gchar* value, GeeMultiMap* parameters);
GeeSet* folks_phone_details_get_phone_numbers (FolksPhoneDetails* self);
FolksPhoneFieldDetails* folks_phone_field_details_new (const gchar* value, GeeMultiMap* parameters);
FolksPhoneFieldDetails* folks_phone_field_details_construct (GType object_type, const gchar* value, GeeMultiMap* parameters);
GeeSet* folks_email_details_get_email_addresses (FolksEmailDetails* self);
FolksEmailFieldDetails* folks_email_field_details_new (const gchar* value, GeeMultiMap* parameters);
FolksEmailFieldDetails* folks_email_field_details_construct (GType object_type, const gchar* value, GeeMultiMap* parameters);
GeeSet* folks_role_details_get_roles (FolksRoleDetails* self);
GeeSet* folks_local_id_details_get_local_ids (FolksLocalIdDetails* self);
GeeSet* folks_postal_address_details_get_postal_addresses (FolksPostalAddressDetails* self);
static gboolean __lambda24_ (FolksIndividual* self, FolksPersona* p);
GDateTime* folks_birthday_details_get_birthday (FolksBirthdayDetails* self);
const gchar* folks_birthday_details_get_calendar_event_id (FolksBirthdayDetails* self);
static gboolean ___lambda24__folks_individual_property_filter (FolksPersona* persona, gpointer self);
static gint __lambda25_ (FolksPersona* a, FolksPersona* b);
static gint ___lambda25__gcompare_func (gconstpointer a, gconstpointer b);
static void __lambda26_ (FolksIndividual* self, FolksPersona* p);
static void ___lambda26__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self);
GeeSet* folks_note_details_get_notes (FolksNoteDetails* self);
static void __folks_individual_store_removed_cb_folks_persona_store_removed (FolksPersonaStore* _sender, gpointer self);
static void __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
gboolean folks_individual_get_is_user (FolksIndividual* self);
static void folks_individual_set_is_user (FolksIndividual* self, gboolean value);
const gchar* folks_persona_store_get_id (FolksPersonaStore* self);
static void folks_individual_set_id (FolksIndividual* self, const gchar* value);
void folks_individual_replace (FolksIndividual* self, FolksIndividual* replacement_individual);
void folks_name_details_change_structured_name (FolksNameDetails* self, FolksStructuredName* name, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_name_details_change_structured_name_finish (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
void folks_name_details_change_full_name (FolksNameDetails* self, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_name_details_change_full_name_finish (FolksNameDetails* self, GAsyncResult* _res_, GError** error);
void folks_gender_details_change_gender (FolksGenderDetails* self, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_gender_details_change_gender_finish (FolksGenderDetails* self, GAsyncResult* _res_, GError** error);
void folks_url_details_change_urls (FolksUrlDetails* self, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_url_details_change_urls_finish (FolksUrlDetails* self, GAsyncResult* _res_, GError** error);
void folks_phone_details_change_phone_numbers (FolksPhoneDetails* self, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_phone_details_change_phone_numbers_finish (FolksPhoneDetails* self, GAsyncResult* _res_, GError** error);
void folks_email_details_change_email_addresses (FolksEmailDetails* self, GeeSet* email_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_email_details_change_email_addresses_finish (FolksEmailDetails* self, GAsyncResult* _res_, GError** error);
void folks_role_details_change_roles (FolksRoleDetails* self, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_role_details_change_roles_finish (FolksRoleDetails* self, GAsyncResult* _res_, GError** error);
void folks_local_id_details_change_local_ids (FolksLocalIdDetails* self, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_local_id_details_change_local_ids_finish (FolksLocalIdDetails* self, GAsyncResult* _res_, GError** error);
void folks_birthday_details_change_birthday (FolksBirthdayDetails* self, GDateTime* birthday, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_birthday_details_change_birthday_finish (FolksBirthdayDetails* self, GAsyncResult* _res_, GError** error);
void folks_birthday_details_change_calendar_event_id (FolksBirthdayDetails* self, const gchar* event_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_birthday_details_change_calendar_event_id_finish (FolksBirthdayDetails* self, GAsyncResult* _res_, GError** error);
void folks_note_details_change_notes (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_note_details_change_notes_finish (FolksNoteDetails* self, GAsyncResult* _res_, GError** error);
void folks_postal_address_details_change_postal_addresses (FolksPostalAddressDetails* self, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_postal_address_details_change_postal_addresses_finish (FolksPostalAddressDetails* self, GAsyncResult* _res_, GError** error);
void folks_im_details_change_im_addresses (FolksImDetails* self, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_im_details_change_im_addresses_finish (FolksImDetails* self, GAsyncResult* _res_, GError** error);
void folks_web_service_details_change_web_service_addresses (FolksWebServiceDetails* self, GeeMultiMap* web_service_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_web_service_details_change_web_service_addresses_finish (FolksWebServiceDetails* self, GAsyncResult* _res_, GError** error);
guint folks_interaction_details_get_im_interaction_count (FolksInteractionDetails* self);
GDateTime* folks_interaction_details_get_last_im_interaction_datetime (FolksInteractionDetails* self);
guint folks_interaction_details_get_call_interaction_count (FolksInteractionDetails* self);
GDateTime* folks_interaction_details_get_last_call_interaction_datetime (FolksInteractionDetails* self);
void folks_individual_set_personas (FolksIndividual* self, GeeSet* value);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static GObject * folks_individual_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void folks_individual_finalize (GObject* obj);
static void _vala_folks_individual_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void folks_avatar_details_set_avatar (FolksAvatarDetails* self, GLoadableIcon* value);
void folks_alias_details_set_alias (FolksAliasDetails* self, const gchar* value);
void folks_name_details_set_structured_name (FolksNameDetails* self, FolksStructuredName* value);
void folks_name_details_set_full_name (FolksNameDetails* self, const gchar* value);
void folks_name_details_set_nickname (FolksNameDetails* self, const gchar* value);
void folks_gender_details_set_gender (FolksGenderDetails* self, FolksGender value);
void folks_url_details_set_urls (FolksUrlDetails* self, GeeSet* value);
void folks_phone_details_set_phone_numbers (FolksPhoneDetails* self, GeeSet* value);
void folks_email_details_set_email_addresses (FolksEmailDetails* self, GeeSet* value);
void folks_role_details_set_roles (FolksRoleDetails* self, GeeSet* value);
void folks_local_id_details_set_local_ids (FolksLocalIdDetails* self, GeeSet* value);
void folks_birthday_details_set_birthday (FolksBirthdayDetails* self, GDateTime* value);
void folks_birthday_details_set_calendar_event_id (FolksBirthdayDetails* self, const gchar* value);
void folks_note_details_set_notes (FolksNoteDetails* self, GeeSet* value);
void folks_postal_address_details_set_postal_addresses (FolksPostalAddressDetails* self, GeeSet* value);
void folks_favourite_details_set_is_favourite (FolksFavouriteDetails* self, gboolean value);
void folks_group_details_set_groups (FolksGroupDetails* self, GeeSet* value);
void folks_im_details_set_im_addresses (FolksImDetails* self, GeeMultiMap* value);
void folks_web_service_details_set_web_service_addresses (FolksWebServiceDetails* self, GeeMultiMap* value);
static void _vala_folks_individual_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


/**
 * Trust level for an {@link Individual} for use in the UI.
 *
 * @since 0.1.15
 */
GType folks_trust_level_get_type (void) {
	static volatile gsize folks_trust_level_type_id__volatile = 0;
	if (g_once_init_enter (&folks_trust_level_type_id__volatile)) {
		static const GEnumValue values[] = {{FOLKS_TRUST_LEVEL_NONE, "FOLKS_TRUST_LEVEL_NONE", "none"}, {FOLKS_TRUST_LEVEL_PERSONAS, "FOLKS_TRUST_LEVEL_PERSONAS", "personas"}, {0, NULL, NULL}};
		GType folks_trust_level_type_id;
		folks_trust_level_type_id = g_enum_register_static ("FolksTrustLevel", values);
		g_once_init_leave (&folks_trust_level_type_id__volatile, folks_trust_level_type_id);
	}
	return folks_trust_level_type_id__volatile;
}


static guint _folks_abstract_field_details_hash_ghash_func (gconstpointer key) {
	guint result;
	result = folks_abstract_field_details_hash (key);
	return result;
}


static void folks_individual_real_change_avatar_data_free (gpointer _data) {
	FolksIndividualChangeAvatarData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->avatar);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeAvatarData, _data_);
}


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


static void folks_individual_real_change_avatar (FolksAvatarDetails* base, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeAvatarData* _data_;
	FolksIndividual* _tmp0_;
	GLoadableIcon* _tmp1_;
	GLoadableIcon* _tmp2_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeAvatarData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_avatar);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = avatar;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->avatar = _tmp2_;
	folks_individual_real_change_avatar_co (_data_);
}


static void folks_individual_real_change_avatar_finish (FolksAvatarDetails* base, GAsyncResult* _res_, GError** error) {
	FolksIndividualChangeAvatarData* _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_));
}


static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


static void folks_individual_change_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksIndividualChangeAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_individual_real_change_avatar_co (_data_);
}


static gpointer _g_error_copy0 (gpointer self) {
	return self ? g_error_copy (self) : NULL;
}


static gboolean folks_individual_real_change_avatar_co (FolksIndividualChangeAvatarData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp2_ = _data_->self->priv->_avatar;
	if (_data_->_tmp2_ != NULL) {
		_data_->_tmp3_ = _data_->self->priv->_avatar;
		_data_->_tmp4_ = _data_->avatar;
		_data_->_tmp5_ = FALSE;
		_data_->_tmp5_ = g_icon_equal ((GIcon*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp3_, g_loadable_icon_get_type (), GLoadableIcon), (GIcon*) _data_->_tmp4_);
		_data_->_tmp1_ = _data_->_tmp5_;
	} else {
		_data_->_tmp1_ = FALSE;
	}
	_data_->_tmp6_ = _data_->_tmp1_;
	if (_data_->_tmp6_) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp8_ = _data_->self->priv->_avatar;
		if (_data_->_tmp8_ == NULL) {
			_data_->_tmp9_ = _data_->avatar;
			_data_->_tmp7_ = _data_->_tmp9_ == NULL;
		} else {
			_data_->_tmp7_ = FALSE;
		}
		_data_->_tmp10_ = _data_->_tmp7_;
		_data_->_tmp0_ = _data_->_tmp10_;
	}
	_data_->_tmp11_ = _data_->_tmp0_;
	if (_data_->_tmp11_) {
		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_->_tmp12_ = _data_->self->priv->_id;
	_data_->_tmp13_ = _data_->avatar;
	g_debug ("individual.vala:169: Setting avatar of individual '%s' to '%p'…", _data_->_tmp12_, _data_->_tmp13_);
	_data_->persona_error = NULL;
	_data_->avatar_changed = FALSE;
	{
		_data_->_tmp14_ = _data_->self->priv->_persona_set;
		_data_->_tmp15_ = NULL;
		_data_->_tmp15_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp14_);
		_data_->_p_it = _data_->_tmp15_;
		while (TRUE) {
			_data_->_tmp16_ = _data_->_p_it;
			_data_->_tmp17_ = FALSE;
			_data_->_tmp17_ = gee_iterator_next (_data_->_tmp16_);
			if (!_data_->_tmp17_) {
				break;
			}
			_data_->_tmp18_ = _data_->_p_it;
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = gee_iterator_get (_data_->_tmp18_);
			_data_->p = (FolksPersona*) _data_->_tmp19_;
			_data_->_tmp20_ = _data_->p;
			_data_->_tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp20_, FOLKS_TYPE_AVATAR_DETAILS) ? ((FolksAvatarDetails*) _data_->_tmp20_) : NULL);
			_data_->_a = _data_->_tmp21_;
			_data_->_tmp22_ = _data_->_a;
			if (_data_->_tmp22_ == NULL) {
				_g_object_unref0 (_data_->_a);
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp23_ = _data_->_a;
			_data_->_tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp23_, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails));
			_data_->a = _data_->_tmp24_;
			_data_->_tmp25_ = _data_->p;
			_data_->_tmp26_ = folks_persona_get_writeable_properties (_data_->_tmp25_, &_data_->_tmp26__length1);
			_data_->_tmp27_ = _data_->_tmp26_;
			_data_->_tmp27__length1 = _data_->_tmp26__length1;
			if (_vala_string_array_contains (_data_->_tmp27_, _data_->_tmp27__length1, "avatar")) {
				{
					_data_->_tmp28_ = _data_->a;
					_data_->_tmp29_ = _data_->avatar;
					_data_->_state_ = 1;
					folks_avatar_details_change_avatar (_data_->_tmp28_, _data_->_tmp29_, folks_individual_change_avatar_ready, _data_);
					return FALSE;
					_state_1:
					folks_avatar_details_change_avatar_finish (_data_->_tmp28_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch9_folks_property_error;
						}
						_g_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
						g_clear_error (&_data_->_inner_error_);
						return FALSE;
					}
					_data_->_tmp30_ = _data_->p;
					_data_->_tmp31_ = folks_persona_get_uid (_data_->_tmp30_);
					_data_->_tmp32_ = _data_->_tmp31_;
					g_debug ("individual.vala:190:     written to writeable persona '%s'", _data_->_tmp32_);
					_data_->avatar_changed = TRUE;
				}
				goto __finally9;
				__catch9_folks_property_error:
				{
					_data_->e = _data_->_inner_error_;
					_data_->_inner_error_ = NULL;
					_data_->_tmp33_ = _data_->persona_error;
					if (_data_->_tmp33_ == NULL) {
						_data_->_tmp34_ = _data_->e;
						_data_->_tmp35_ = _g_error_copy0 (_data_->_tmp34_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp35_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally9:
				if (_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_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_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_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						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_->a);
			_g_object_unref0 (_data_->_a);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp36_ = _data_->avatar_changed;
	if (_data_->_tmp36_ == FALSE) {
		_data_->_tmp37_ = _data_->persona_error;
		_vala_assert (_data_->_tmp37_ != NULL, "persona_error != null");
		_data_->_tmp38_ = _data_->persona_error;
		_data_->_tmp39_ = _g_error_copy0 (_data_->_tmp38_);
		_data_->_inner_error_ = _data_->_tmp39_;
		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_error_free0 (_data_->persona_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_error_free0 (_data_->persona_error);
			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_error_free0 (_data_->persona_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;
}


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


static void folks_individual_real_change_alias (FolksAliasDetails* base, const gchar* alias, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeAliasData* _data_;
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeAliasData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_alias);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_alias_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = alias;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->alias = _tmp2_;
	folks_individual_real_change_alias_co (_data_);
}


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


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


static gboolean folks_individual_real_change_alias_co (FolksIndividualChangeAliasData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_alias;
	_data_->_tmp1_ = _data_->alias;
	if (g_strcmp0 (_data_->_tmp0_, _data_->_tmp1_) == 0) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->self->priv->_id;
	_data_->_tmp3_ = _data_->alias;
	g_debug ("individual.vala:311: Setting alias of individual '%s' to '%s'…", _data_->_tmp2_, _data_->_tmp3_);
	_data_->persona_error = NULL;
	_data_->alias_changed = FALSE;
	{
		_data_->_tmp4_ = _data_->self->priv->_persona_set;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp4_);
		_data_->_p_it = _data_->_tmp5_;
		while (TRUE) {
			_data_->_tmp6_ = _data_->_p_it;
			_data_->_tmp7_ = FALSE;
			_data_->_tmp7_ = gee_iterator_next (_data_->_tmp6_);
			if (!_data_->_tmp7_) {
				break;
			}
			_data_->_tmp8_ = _data_->_p_it;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = gee_iterator_get (_data_->_tmp8_);
			_data_->p = (FolksPersona*) _data_->_tmp9_;
			_data_->_tmp10_ = _data_->p;
			_data_->_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp10_, FOLKS_TYPE_ALIAS_DETAILS) ? ((FolksAliasDetails*) _data_->_tmp10_) : NULL);
			_data_->_a = _data_->_tmp11_;
			_data_->_tmp12_ = _data_->_a;
			if (_data_->_tmp12_ == NULL) {
				_g_object_unref0 (_data_->_a);
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp13_ = _data_->_a;
			_data_->_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp13_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
			_data_->a = _data_->_tmp14_;
			_data_->_tmp15_ = _data_->p;
			_data_->_tmp16_ = folks_persona_get_writeable_properties (_data_->_tmp15_, &_data_->_tmp16__length1);
			_data_->_tmp17_ = _data_->_tmp16_;
			_data_->_tmp17__length1 = _data_->_tmp16__length1;
			if (_vala_string_array_contains (_data_->_tmp17_, _data_->_tmp17__length1, "alias")) {
				{
					_data_->_tmp18_ = _data_->a;
					_data_->_tmp19_ = _data_->alias;
					_data_->_state_ = 1;
					folks_alias_details_change_alias (_data_->_tmp18_, _data_->_tmp19_, folks_individual_change_alias_ready, _data_);
					return FALSE;
					_state_1:
					folks_alias_details_change_alias_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch10_folks_property_error;
						}
						_g_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
						g_clear_error (&_data_->_inner_error_);
						return FALSE;
					}
					_data_->_tmp20_ = _data_->p;
					_data_->_tmp21_ = folks_persona_get_uid (_data_->_tmp20_);
					_data_->_tmp22_ = _data_->_tmp21_;
					g_debug ("individual.vala:332:     written to writeable persona '%s'", _data_->_tmp22_);
					_data_->alias_changed = TRUE;
				}
				goto __finally10;
				__catch10_folks_property_error:
				{
					_data_->e = _data_->_inner_error_;
					_data_->_inner_error_ = NULL;
					_data_->_tmp23_ = _data_->persona_error;
					if (_data_->_tmp23_ == NULL) {
						_data_->_tmp24_ = _data_->e;
						_data_->_tmp25_ = _g_error_copy0 (_data_->_tmp24_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp25_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally10:
				if (_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_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_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_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						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_->a);
			_g_object_unref0 (_data_->_a);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp26_ = _data_->alias_changed;
	if (_data_->_tmp26_ == FALSE) {
		_data_->_tmp27_ = _data_->persona_error;
		_vala_assert (_data_->_tmp27_ != NULL, "persona_error != null");
		_data_->_tmp28_ = _data_->persona_error;
		_data_->_tmp29_ = _g_error_copy0 (_data_->_tmp28_);
		_data_->_inner_error_ = _data_->_tmp29_;
		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_error_free0 (_data_->persona_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_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp30_ = _data_->alias;
	_data_->_tmp31_ = g_strdup (_data_->_tmp30_);
	_g_free0 (_data_->self->priv->_alias);
	_data_->self->priv->_alias = _data_->_tmp31_;
	g_object_notify ((GObject*) _data_->self, "alias");
	_g_error_free0 (_data_->persona_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;
}


static void folks_individual_real_change_nickname_data_free (gpointer _data) {
	FolksIndividualChangeNicknameData* _data_;
	_data_ = _data;
	_g_free0 (_data_->nickname);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeNicknameData, _data_);
}


static void folks_individual_real_change_nickname (FolksNameDetails* base, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeNicknameData* _data_;
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeNicknameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_nickname);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_nickname_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = nickname;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->nickname = _tmp2_;
	folks_individual_real_change_nickname_co (_data_);
}


static void folks_individual_real_change_nickname_finish (FolksNameDetails* base, GAsyncResult* _res_, GError** error) {
	FolksIndividualChangeNicknameData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


static gboolean folks_individual_real_change_nickname_co (FolksIndividualChangeNicknameData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->nickname;
	if (_data_->_tmp0_ == NULL) {
		_data_->nickname = "";
	}
	_data_->_tmp1_ = _data_->self->priv->_nickname;
	_data_->_tmp2_ = _data_->nickname;
	if (g_strcmp0 (_data_->_tmp1_, _data_->_tmp2_) == 0) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->self->priv->_id;
	_data_->_tmp4_ = _data_->nickname;
	g_debug ("individual.vala:413: Setting nickname of individual '%s' to '%s'…", _data_->_tmp3_, _data_->_tmp4_);
	_data_->persona_error = NULL;
	_data_->nickname_changed = FALSE;
	{
		_data_->_tmp5_ = _data_->self->priv->_persona_set;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp5_);
		_data_->_p_it = _data_->_tmp6_;
		while (TRUE) {
			_data_->_tmp7_ = _data_->_p_it;
			_data_->_tmp8_ = FALSE;
			_data_->_tmp8_ = gee_iterator_next (_data_->_tmp7_);
			if (!_data_->_tmp8_) {
				break;
			}
			_data_->_tmp9_ = _data_->_p_it;
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = gee_iterator_get (_data_->_tmp9_);
			_data_->p = (FolksPersona*) _data_->_tmp10_;
			_data_->_tmp11_ = _data_->p;
			_data_->_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp11_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _data_->_tmp11_) : NULL);
			_data_->_n = _data_->_tmp12_;
			_data_->_tmp13_ = _data_->_n;
			if (_data_->_tmp13_ == NULL) {
				_g_object_unref0 (_data_->_n);
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp14_ = _data_->_n;
			_data_->_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp14_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
			_data_->n = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->p;
			_data_->_tmp17_ = folks_persona_get_writeable_properties (_data_->_tmp16_, &_data_->_tmp17__length1);
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_tmp18__length1 = _data_->_tmp17__length1;
			if (_vala_string_array_contains (_data_->_tmp18_, _data_->_tmp18__length1, "nickname")) {
				{
					_data_->_tmp19_ = _data_->n;
					_data_->_tmp20_ = _data_->nickname;
					_data_->_state_ = 1;
					folks_name_details_change_nickname (_data_->_tmp19_, _data_->_tmp20_, folks_individual_change_nickname_ready, _data_);
					return FALSE;
					_state_1:
					folks_name_details_change_nickname_finish (_data_->_tmp19_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch11_folks_property_error;
						}
						_g_object_unref0 (_data_->n);
						_g_object_unref0 (_data_->_n);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
						g_clear_error (&_data_->_inner_error_);
						return FALSE;
					}
					_data_->_tmp21_ = _data_->p;
					_data_->_tmp22_ = folks_persona_get_uid (_data_->_tmp21_);
					_data_->_tmp23_ = _data_->_tmp22_;
					g_debug ("individual.vala:434:     written to writeable persona '%s'", _data_->_tmp23_);
					_data_->nickname_changed = TRUE;
				}
				goto __finally11;
				__catch11_folks_property_error:
				{
					_data_->e = _data_->_inner_error_;
					_data_->_inner_error_ = NULL;
					_data_->_tmp24_ = _data_->persona_error;
					if (_data_->_tmp24_ == NULL) {
						_data_->_tmp25_ = _data_->e;
						_data_->_tmp26_ = _g_error_copy0 (_data_->_tmp25_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp26_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally11:
				if (_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_->n);
						_g_object_unref0 (_data_->_n);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_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_object_unref0 (_data_->n);
						_g_object_unref0 (_data_->_n);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						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_->n);
			_g_object_unref0 (_data_->_n);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp27_ = _data_->nickname_changed;
	if (_data_->_tmp27_ == FALSE) {
		_data_->_tmp28_ = _data_->persona_error;
		_vala_assert (_data_->_tmp28_ != NULL, "persona_error != null");
		_data_->_tmp29_ = _data_->persona_error;
		_data_->_tmp30_ = _g_error_copy0 (_data_->_tmp29_);
		_data_->_inner_error_ = _data_->_tmp30_;
		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_error_free0 (_data_->persona_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_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp31_ = _data_->nickname;
	_data_->_tmp32_ = g_strdup (_data_->_tmp31_);
	_g_free0 (_data_->self->priv->_nickname);
	_data_->self->priv->_nickname = _data_->_tmp32_;
	g_object_notify ((GObject*) _data_->self, "nickname");
	_g_error_free0 (_data_->persona_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;
}


static void folks_individual_real_change_is_favourite_data_free (gpointer _data) {
	FolksIndividualChangeIsFavouriteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeIsFavouriteData, _data_);
}


static void folks_individual_real_change_is_favourite (FolksFavouriteDetails* base, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeIsFavouriteData* _data_;
	FolksIndividual* _tmp0_;
	gboolean _tmp1_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeIsFavouriteData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_is_favourite);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_is_favourite_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = is_favourite;
	_data_->is_favourite = _tmp1_;
	folks_individual_real_change_is_favourite_co (_data_);
}


static void folks_individual_real_change_is_favourite_finish (FolksFavouriteDetails* base, GAsyncResult* _res_, GError** error) {
	FolksIndividualChangeIsFavouriteData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


static gboolean folks_individual_real_change_is_favourite_co (FolksIndividualChangeIsFavouriteData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_is_favourite;
	_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_->_tmp3_ = _data_->is_favourite;
	if (_data_->_tmp3_) {
		_data_->_tmp2_ = "TRUE";
	} else {
		_data_->_tmp2_ = "FALSE";
	}
	_data_->_tmp4_ = _data_->self->priv->_id;
	_data_->_tmp5_ = _data_->_tmp2_;
	g_debug ("individual.vala:629: Setting '%s' favourite status to %s…", _data_->_tmp4_, _data_->_tmp5_);
	_data_->persona_error = NULL;
	_data_->is_favourite_changed = FALSE;
	{
		_data_->_tmp6_ = _data_->self->priv->_persona_set;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp6_);
		_data_->_p_it = _data_->_tmp7_;
		while (TRUE) {
			_data_->_tmp8_ = _data_->_p_it;
			_data_->_tmp9_ = FALSE;
			_data_->_tmp9_ = gee_iterator_next (_data_->_tmp8_);
			if (!_data_->_tmp9_) {
				break;
			}
			_data_->_tmp10_ = _data_->_p_it;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = gee_iterator_get (_data_->_tmp10_);
			_data_->p = (FolksPersona*) _data_->_tmp11_;
			_data_->_tmp12_ = _data_->p;
			_data_->_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp12_, FOLKS_TYPE_FAVOURITE_DETAILS) ? ((FolksFavouriteDetails*) _data_->_tmp12_) : NULL);
			_data_->_a = _data_->_tmp13_;
			_data_->_tmp14_ = _data_->_a;
			if (_data_->_tmp14_ == NULL) {
				_g_object_unref0 (_data_->_a);
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp15_ = _data_->_a;
			_data_->_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp15_, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
			_data_->a = _data_->_tmp16_;
			_data_->_tmp17_ = _data_->p;
			_data_->_tmp18_ = folks_persona_get_writeable_properties (_data_->_tmp17_, &_data_->_tmp18__length1);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp19__length1 = _data_->_tmp18__length1;
			if (_vala_string_array_contains (_data_->_tmp19_, _data_->_tmp19__length1, "is-favourite")) {
				{
					_data_->_tmp20_ = _data_->a;
					_data_->_tmp21_ = _data_->is_favourite;
					_data_->_state_ = 1;
					folks_favourite_details_change_is_favourite (_data_->_tmp20_, _data_->_tmp21_, folks_individual_change_is_favourite_ready, _data_);
					return FALSE;
					_state_1:
					folks_favourite_details_change_is_favourite_finish (_data_->_tmp20_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch12_folks_property_error;
						}
						_g_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
						g_clear_error (&_data_->_inner_error_);
						return FALSE;
					}
					_data_->_tmp22_ = _data_->p;
					_data_->_tmp23_ = folks_persona_get_uid (_data_->_tmp22_);
					_data_->_tmp24_ = _data_->_tmp23_;
					g_debug ("individual.vala:655:     written to persona '%s'", _data_->_tmp24_);
					_data_->is_favourite_changed = TRUE;
				}
				goto __finally12;
				__catch12_folks_property_error:
				{
					_data_->e = _data_->_inner_error_;
					_data_->_inner_error_ = NULL;
					_data_->_tmp25_ = _data_->persona_error;
					if (_data_->_tmp25_ == NULL) {
						_data_->_tmp26_ = _data_->e;
						_data_->_tmp27_ = _g_error_copy0 (_data_->_tmp26_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp27_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally12:
				if (_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_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_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_object_unref0 (_data_->a);
						_g_object_unref0 (_data_->_a);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						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_->a);
			_g_object_unref0 (_data_->_a);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp28_ = _data_->is_favourite_changed;
	if (_data_->_tmp28_ == FALSE) {
		_data_->_tmp29_ = _data_->persona_error;
		_vala_assert (_data_->_tmp29_ != NULL, "persona_error != null");
		_data_->_tmp30_ = _data_->persona_error;
		_data_->_tmp31_ = _g_error_copy0 (_data_->_tmp30_);
		_data_->_inner_error_ = _data_->_tmp31_;
		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_error_free0 (_data_->persona_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_error_free0 (_data_->persona_error);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp32_ = _data_->is_favourite;
	_data_->self->priv->_is_favourite = _data_->_tmp32_;
	g_object_notify ((GObject*) _data_->self, "is-favourite");
	_g_error_free0 (_data_->persona_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;
}


static void folks_individual_real_change_groups_data_free (gpointer _data) {
	FolksIndividualChangeGroupsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->groups);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeGroupsData, _data_);
}


static void folks_individual_real_change_groups (FolksGroupDetails* base, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeGroupsData* _data_;
	FolksIndividual* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeGroupsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_groups);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_groups_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = groups;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->groups = _tmp2_;
	folks_individual_real_change_groups_co (_data_);
}


static void folks_individual_real_change_groups_finish (FolksGroupDetails* base, GAsyncResult* _res_, GError** error) {
	FolksIndividualChangeGroupsData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


static gboolean folks_individual_real_change_groups_co (FolksIndividualChangeGroupsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_id;
	g_debug ("individual.vala:702: Setting '%s' groups…", _data_->_tmp0_);
	_data_->persona_error = NULL;
	_data_->groups_changed = FALSE;
	{
		_data_->_tmp1_ = _data_->self->priv->_persona_set;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp1_);
		_data_->_p_it = _data_->_tmp2_;
		while (TRUE) {
			_data_->_tmp3_ = _data_->_p_it;
			_data_->_tmp4_ = FALSE;
			_data_->_tmp4_ = gee_iterator_next (_data_->_tmp3_);
			if (!_data_->_tmp4_) {
				break;
			}
			_data_->_tmp5_ = _data_->_p_it;
			_data_->_tmp6_ = NULL;
			_data_->_tmp6_ = gee_iterator_get (_data_->_tmp5_);
			_data_->p = (FolksPersona*) _data_->_tmp6_;
			_data_->_tmp7_ = _data_->p;
			_data_->_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp7_, FOLKS_TYPE_GROUP_DETAILS) ? ((FolksGroupDetails*) _data_->_tmp7_) : NULL);
			_data_->_g = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->_g;
			if (_data_->_tmp9_ == NULL) {
				_g_object_unref0 (_data_->_g);
				_g_object_unref0 (_data_->p);
				continue;
			}
			_data_->_tmp10_ = _data_->_g;
			_data_->_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp10_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails));
			_data_->g = _data_->_tmp11_;
			_data_->_tmp12_ = _data_->p;
			_data_->_tmp13_ = folks_persona_get_writeable_properties (_data_->_tmp12_, &_data_->_tmp13__length1);
			_data_->_tmp14_ = _data_->_tmp13_;
			_data_->_tmp14__length1 = _data_->_tmp13__length1;
			if (_vala_string_array_contains (_data_->_tmp14_, _data_->_tmp14__length1, "groups")) {
				{
					_data_->_tmp15_ = _data_->g;
					_data_->_tmp16_ = _data_->groups;
					_data_->_state_ = 1;
					folks_group_details_change_groups (_data_->_tmp15_, _data_->_tmp16_, folks_individual_change_groups_ready, _data_);
					return FALSE;
					_state_1:
					folks_group_details_change_groups_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						if (_data_->_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
							goto __catch13_folks_property_error;
						}
						_g_object_unref0 (_data_->g);
						_g_object_unref0 (_data_->_g);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
						g_clear_error (&_data_->_inner_error_);
						return FALSE;
					}
					_data_->_tmp17_ = _data_->p;
					_data_->_tmp18_ = folks_persona_get_uid (_data_->_tmp17_);
					_data_->_tmp19_ = _data_->_tmp18_;
					g_debug ("individual.vala:723:     written to persona '%s'", _data_->_tmp19_);
					_data_->groups_changed = TRUE;
				}
				goto __finally13;
				__catch13_folks_property_error:
				{
					_data_->e = _data_->_inner_error_;
					_data_->_inner_error_ = NULL;
					_data_->_tmp20_ = _data_->persona_error;
					if (_data_->_tmp20_ == NULL) {
						_data_->_tmp21_ = _data_->e;
						_data_->_tmp22_ = _g_error_copy0 (_data_->_tmp21_);
						_g_error_free0 (_data_->persona_error);
						_data_->persona_error = _data_->_tmp22_;
					}
					_g_error_free0 (_data_->e);
				}
				__finally13:
				if (_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_->g);
						_g_object_unref0 (_data_->_g);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_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_object_unref0 (_data_->g);
						_g_object_unref0 (_data_->_g);
						_g_object_unref0 (_data_->p);
						_g_object_unref0 (_data_->_p_it);
						_g_error_free0 (_data_->persona_error);
						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_->g);
			_g_object_unref0 (_data_->_g);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp23_ = _data_->groups_changed;
	if (_data_->_tmp23_ == FALSE) {
		_data_->_tmp24_ = _data_->persona_error;
		_vala_assert (_data_->_tmp24_ != NULL, "persona_error != null");
		_data_->_tmp25_ = _data_->persona_error;
		_data_->_tmp26_ = _g_error_copy0 (_data_->_tmp25_);
		_data_->_inner_error_ = _data_->_tmp26_;
		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_error_free0 (_data_->persona_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_error_free0 (_data_->persona_error);
			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;
		}
	}
	_folks_individual_update_groups (_data_->self);
	_g_error_free0 (_data_->persona_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;
}


static void _folks_individual_notify_alias_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_alias (self);
}


static void _folks_individual_notify_avatar_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_avatar (self);
}


static void _folks_individual_notify_full_name_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_full_name (self);
}


static void _folks_individual_notify_structured_name_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_structured_name (self);
}


static void _folks_individual_notify_nickname_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_nickname (self);
}


static void _folks_individual_persona_group_changed_cb (FolksIndividual* self, const gchar* group, gboolean is_member) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (group != NULL);
	_folks_individual_update_groups (self);
}


static void _folks_individual_notify_gender_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_gender (self);
}


static void _folks_individual_notify_urls_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_urls (self);
}


static void _folks_individual_notify_phone_numbers_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_phone_numbers (self);
}


static void _folks_individual_notify_postal_addresses_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_postal_addresses (self);
}


static void _folks_individual_notify_email_addresses_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_email_addresses (self);
}


static void _folks_individual_notify_roles_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_roles (self);
}


static void _folks_individual_notify_birthday_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_birthday (self);
}


static void _folks_individual_notify_notes_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_notes (self);
}


static void _folks_individual_notify_local_ids_cb (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_local_ids (self);
}


static void folks_individual_real_change_group_data_free (gpointer _data) {
	FolksIndividualChangeGroupData* _data_;
	_data_ = _data;
	_g_free0 (_data_->group);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksIndividualChangeGroupData, _data_);
}


static void folks_individual_real_change_group (FolksGroupDetails* base, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksIndividual * self;
	FolksIndividualChangeGroupData* _data_;
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	self = (FolksIndividual*) base;
	_data_ = g_slice_new0 (FolksIndividualChangeGroupData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_individual_real_change_group);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_individual_real_change_group_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = group;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->group = _tmp2_;
	_tmp3_ = is_member;
	_data_->is_member = _tmp3_;
	folks_individual_real_change_group_co (_data_);
}


static void folks_individual_real_change_group_finish (FolksGroupDetails* base, GAsyncResult* _res_, GError** error) {
	FolksIndividualChangeGroupData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * Add or remove the Individual from the specified group.
   *
   * If `is_member` is `true`, the Individual will be added to the `group`. If
   * it is `false`, they will be removed from the `group`.
   *
   * The group membership change will propagate to every {@link Persona} in
   * the Individual.
   *
   * @param group a freeform group identifier
   * @param is_member whether the Individual should be a member of the group
   * @since 0.1.11
   */
static gboolean folks_individual_real_change_group_co (FolksIndividualChangeGroupData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->_persona_set;
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp0_);
		_data_->_p_it = _data_->_tmp1_;
		while (TRUE) {
			_data_->_tmp2_ = _data_->_p_it;
			_data_->_tmp3_ = FALSE;
			_data_->_tmp3_ = gee_iterator_next (_data_->_tmp2_);
			if (!_data_->_tmp3_) {
				break;
			}
			_data_->_tmp4_ = _data_->_p_it;
			_data_->_tmp5_ = NULL;
			_data_->_tmp5_ = gee_iterator_get (_data_->_tmp4_);
			_data_->p = (FolksPersona*) _data_->_tmp5_;
			_data_->_tmp6_ = _data_->p;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp6_, FOLKS_TYPE_GROUP_DETAILS)) {
				_data_->_tmp7_ = _data_->p;
				_data_->_tmp8_ = _data_->group;
				_data_->_tmp9_ = _data_->is_member;
				folks_group_details_change_group (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp7_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), _data_->_tmp8_, _data_->_tmp9_, NULL, NULL);
			}
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void _folks_individual_notify_presence_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_presence (self);
}


static void _folks_individual_notify_im_addresses_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_im_addresses (self);
}


static void _folks_individual_notify_web_service_addresses_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_web_service_addresses (self);
}


static void _folks_individual_notify_is_favourite_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_folks_individual_update_is_favourite (self);
}


static void _folks_individual_notify_im_interaction_count_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	g_object_notify ((GObject*) self, "im-interaction-count");
}


static void _folks_individual_notify_call_interaction_count_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	g_object_notify ((GObject*) self, "call-interaction-count");
}


static void _folks_individual_notify_last_im_interaction_datetime_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_g_date_time_unref0 (self->priv->_last_im_interaction_datetime);
	self->priv->_last_im_interaction_datetime = NULL;
	g_object_notify ((GObject*) self, "last-im-interaction-datetime");
}


static void _folks_individual_notify_last_call_interaction_datetime_cb (FolksIndividual* self, GObject* obj, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (ps != NULL);
	_g_date_time_unref0 (self->priv->_last_call_interaction_datetime);
	self->priv->_last_call_interaction_datetime = NULL;
	g_object_notify ((GObject*) self, "last-call-interaction-datetime");
}


/**
   * Create a new Individual.
   *
   * The Individual can optionally be seeded with the {@link Persona}s in
   * `personas`. Otherwise, it will have to have personas added using the
   * {@link Folks.Individual.personas} property after construction.
   *
   * @param personas a list of {@link Persona}s to initialise the
   * {@link Individual} with, or `null`
   * @return a new Individual
   *
   * @since 0.5.1
   */
FolksIndividual* folks_individual_construct (GType object_type, GeeSet* personas) {
	FolksIndividual * self = NULL;
	GeeSet* _tmp0_;
	_tmp0_ = personas;
	self = (FolksIndividual*) g_object_new (object_type, "personas", _tmp0_, NULL);
	return self;
}


FolksIndividual* folks_individual_new (GeeSet* personas) {
	return folks_individual_construct (FOLKS_TYPE_INDIVIDUAL, personas);
}


static void _folks_individual_emit_personas_changed (FolksIndividual* self, GeeSet* added, GeeSet* removed) {
	GeeSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _added;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	GeeSet* _removed;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GeeSet* _tmp6_;
	gboolean _tmp10_;
	gboolean _tmp17_;
	GeeSet* _tmp22_;
	GeeSet* _tmp23_;
	GeeSet* _tmp24_;
	GeeSet* _tmp25_;
	GeeSet* _tmp26_;
	GeeSet* _tmp27_;
	GeeSet* _tmp28_;
	GeeSet* _tmp29_;
	g_return_if_fail (self != NULL);
	_tmp0_ = added;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_added = _tmp1_;
	_tmp2_ = removed;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_removed = _tmp3_;
	_tmp6_ = added;
	if (_tmp6_ == NULL) {
		_tmp5_ = TRUE;
	} else {
		GeeSet* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		_tmp7_ = added;
		_tmp8_ = gee_collection_get_size ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_SET, GeeSet));
		_tmp9_ = _tmp8_;
		_tmp5_ = _tmp9_ == 0;
	}
	_tmp10_ = _tmp5_;
	if (_tmp10_) {
		gboolean _tmp11_ = FALSE;
		GeeSet* _tmp12_;
		gboolean _tmp16_;
		_tmp12_ = removed;
		if (_tmp12_ == NULL) {
			_tmp11_ = TRUE;
		} else {
			GeeSet* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			_tmp13_ = removed;
			_tmp14_ = gee_collection_get_size ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_SET, GeeSet));
			_tmp15_ = _tmp14_;
			_tmp11_ = _tmp15_ == 0;
		}
		_tmp16_ = _tmp11_;
		_tmp4_ = _tmp16_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp17_ = _tmp4_;
	if (_tmp17_) {
		_g_object_unref0 (_removed);
		_g_object_unref0 (_added);
		return;
	} else {
		GeeSet* _tmp18_;
		_tmp18_ = added;
		if (_tmp18_ == NULL) {
			GeeHashSet* _tmp19_;
			_tmp19_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
			_g_object_unref0 (_added);
			_added = (GeeSet*) _tmp19_;
		} else {
			GeeSet* _tmp20_;
			_tmp20_ = removed;
			if (_tmp20_ == NULL) {
				GeeHashSet* _tmp21_;
				_tmp21_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
				_g_object_unref0 (_removed);
				_removed = (GeeSet*) _tmp21_;
			}
		}
	}
	_tmp22_ = _added;
	_tmp23_ = gee_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_SET, GeeSet));
	_tmp24_ = _tmp23_;
	_tmp25_ = _tmp24_;
	_tmp26_ = _removed;
	_tmp27_ = gee_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_SET, GeeSet));
	_tmp28_ = _tmp27_;
	_tmp29_ = _tmp28_;
	g_signal_emit_by_name (self, "personas-changed", _tmp25_, _tmp29_);
	_g_object_unref0 (_tmp29_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (_removed);
	_g_object_unref0 (_added);
}


static void _folks_individual_store_removed_cb (FolksIndividual* self, FolksPersonaStore* store) {
	GeeHashSet* _tmp0_;
	GeeHashSet* remaining_personas;
	GeeHashSet* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (store != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
	remaining_personas = _tmp0_;
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			FolksPersonaStore* _tmp8_;
			FolksPersonaStore* _tmp9_;
			FolksPersonaStore* _tmp10_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			_tmp8_ = folks_persona_get_store (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = store;
			if (_tmp9_ != _tmp10_) {
				GeeHashSet* _tmp11_;
				FolksPersona* _tmp12_;
				_tmp11_ = remaining_personas;
				_tmp12_ = persona;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, _tmp12_);
			}
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	_tmp13_ = remaining_personas;
	_folks_individual_set_personas (self, (GeeSet*) _tmp13_, NULL);
	_g_object_unref0 (remaining_personas);
}


static void _folks_individual_store_personas_changed_cb (FolksIndividual* self, FolksPersonaStore* store, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason) {
	GeeHashSet* _tmp0_;
	GeeHashSet* remaining_personas;
	GeeHashSet* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (store != NULL);
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
	remaining_personas = _tmp0_;
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			GeeSet* _tmp7_;
			FolksPersona* _tmp8_;
			gboolean _tmp9_ = FALSE;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = removed;
			_tmp8_ = persona;
			_tmp9_ = gee_collection_contains ((GeeCollection*) _tmp7_, _tmp8_);
			if (!_tmp9_) {
				GeeHashSet* _tmp10_;
				FolksPersona* _tmp11_;
				_tmp10_ = remaining_personas;
				_tmp11_ = persona;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, _tmp11_);
			}
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	_tmp12_ = remaining_personas;
	_folks_individual_set_personas (self, (GeeSet*) _tmp12_, NULL);
	_g_object_unref0 (remaining_personas);
}


static void _folks_individual_update_fields (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_groups (self);
	_folks_individual_update_presence (self);
	_folks_individual_update_is_favourite (self);
	_folks_individual_update_avatar (self);
	_folks_individual_update_alias (self);
	_folks_individual_update_trust_level (self);
	_folks_individual_update_im_addresses (self);
	_folks_individual_update_web_service_addresses (self);
	_folks_individual_update_structured_name (self);
	_folks_individual_update_full_name (self);
	_folks_individual_update_nickname (self);
	_folks_individual_update_gender (self);
	_folks_individual_update_urls (self);
	_folks_individual_update_phone_numbers (self);
	_folks_individual_update_email_addresses (self);
	_folks_individual_update_roles (self);
	_folks_individual_update_birthday (self);
	_folks_individual_update_notes (self);
	_folks_individual_update_postal_addresses (self);
	_folks_individual_update_local_ids (self);
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		FolksIndividual * self;
		self = _data2_->self;
		_g_free0 (_data2_->prop_name);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static gint __lambda5_ (Block2Data* _data2_, FolksPersona* a, FolksPersona* b) {
	FolksIndividual * self;
	gint result = 0;
	FolksPersona* _tmp0_;
	FolksPersona* _tmp1_;
	FolksIndividualPropertyFilter _tmp2_;
	void* _tmp2__target;
	FolksPersona* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean a_is_set;
	FolksIndividualPropertyFilter _tmp5_;
	void* _tmp5__target;
	FolksPersona* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean b_is_set;
	gboolean _tmp8_;
	gboolean _tmp9_;
	FolksPersona* _tmp16_;
	FolksPersonaStore* _tmp17_;
	FolksPersonaStore* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	gboolean a_is_primary;
	FolksPersona* _tmp21_;
	FolksPersonaStore* _tmp22_;
	FolksPersonaStore* _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	gboolean b_is_primary;
	gboolean _tmp26_;
	gboolean _tmp27_;
	const gchar* _tmp34_;
	FolksPersona* _tmp35_;
	gchar** _tmp36_;
	gint _tmp36__length1;
	gchar** _tmp37_;
	gint _tmp37__length1;
	gboolean a_is_writeable;
	const gchar* _tmp38_;
	FolksPersona* _tmp39_;
	gchar** _tmp40_;
	gint _tmp40__length1;
	gchar** _tmp41_;
	gint _tmp41__length1;
	gboolean b_is_writeable;
	gboolean _tmp42_;
	gboolean _tmp43_;
	GCompareFunc _tmp50_;
	FolksPersona* _tmp51_;
	FolksPersona* _tmp52_;
	gint _tmp53_ = 0;
	gint order;
	gint _tmp54_;
	self = _data2_->self;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_vala_assert (_tmp0_ != NULL, "a != null");
	_tmp1_ = b;
	_vala_assert (_tmp1_ != NULL, "b != null");
	_tmp2_ = _data2_->filter_func;
	_tmp2__target = _data2_->filter_func_target;
	_tmp3_ = a;
	_tmp4_ = _tmp2_ (_tmp3_, _tmp2__target);
	a_is_set = _tmp4_;
	_tmp5_ = _data2_->filter_func;
	_tmp5__target = _data2_->filter_func_target;
	_tmp6_ = b;
	_tmp7_ = _tmp5_ (_tmp6_, _tmp5__target);
	b_is_set = _tmp7_;
	_tmp8_ = a_is_set;
	_tmp9_ = b_is_set;
	if (_tmp8_ != _tmp9_) {
		gint _tmp10_ = 0;
		gboolean _tmp11_;
		gint _tmp12_ = 0;
		gboolean _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp11_ = a_is_set;
		if (_tmp11_) {
			_tmp10_ = 1;
		} else {
			_tmp10_ = 0;
		}
		_tmp13_ = b_is_set;
		if (_tmp13_) {
			_tmp12_ = 1;
		} else {
			_tmp12_ = 0;
		}
		_tmp14_ = _tmp10_;
		_tmp15_ = _tmp12_;
		result = _tmp14_ - _tmp15_;
		return result;
	}
	_tmp16_ = a;
	_tmp17_ = folks_persona_get_store (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = folks_persona_store_get_is_primary_store (_tmp18_);
	_tmp20_ = _tmp19_;
	a_is_primary = _tmp20_;
	_tmp21_ = b;
	_tmp22_ = folks_persona_get_store (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = folks_persona_store_get_is_primary_store (_tmp23_);
	_tmp25_ = _tmp24_;
	b_is_primary = _tmp25_;
	_tmp26_ = a_is_primary;
	_tmp27_ = b_is_primary;
	if (_tmp26_ != _tmp27_) {
		gint _tmp28_ = 0;
		gboolean _tmp29_;
		gint _tmp30_ = 0;
		gboolean _tmp31_;
		gint _tmp32_;
		gint _tmp33_;
		_tmp29_ = a_is_primary;
		if (_tmp29_) {
			_tmp28_ = 1;
		} else {
			_tmp28_ = 0;
		}
		_tmp31_ = b_is_primary;
		if (_tmp31_) {
			_tmp30_ = 1;
		} else {
			_tmp30_ = 0;
		}
		_tmp32_ = _tmp28_;
		_tmp33_ = _tmp30_;
		result = _tmp32_ - _tmp33_;
		return result;
	}
	_tmp34_ = _data2_->prop_name;
	_tmp35_ = a;
	_tmp36_ = folks_persona_get_writeable_properties (_tmp35_, &_tmp36__length1);
	_tmp37_ = _tmp36_;
	_tmp37__length1 = _tmp36__length1;
	a_is_writeable = _vala_string_array_contains (_tmp37_, _tmp37__length1, _tmp34_);
	_tmp38_ = _data2_->prop_name;
	_tmp39_ = b;
	_tmp40_ = folks_persona_get_writeable_properties (_tmp39_, &_tmp40__length1);
	_tmp41_ = _tmp40_;
	_tmp41__length1 = _tmp40__length1;
	b_is_writeable = _vala_string_array_contains (_tmp41_, _tmp41__length1, _tmp38_);
	_tmp42_ = a_is_writeable;
	_tmp43_ = b_is_writeable;
	if (_tmp42_ != _tmp43_) {
		gint _tmp44_ = 0;
		gboolean _tmp45_;
		gint _tmp46_ = 0;
		gboolean _tmp47_;
		gint _tmp48_;
		gint _tmp49_;
		_tmp45_ = a_is_writeable;
		if (_tmp45_) {
			_tmp44_ = 1;
		} else {
			_tmp44_ = 0;
		}
		_tmp47_ = b_is_writeable;
		if (_tmp47_) {
			_tmp46_ = 1;
		} else {
			_tmp46_ = 0;
		}
		_tmp48_ = _tmp44_;
		_tmp49_ = _tmp46_;
		result = _tmp48_ - _tmp49_;
		return result;
	}
	_tmp50_ = _data2_->compare_func;
	_tmp51_ = a;
	_tmp52_ = b;
	_tmp53_ = _tmp50_ (_tmp51_, _tmp52_);
	order = _tmp53_;
	_tmp54_ = order;
	if (_tmp54_ == 0) {
		GCompareFunc _tmp55_;
		FolksPersona* _tmp56_;
		const gchar* _tmp57_;
		const gchar* _tmp58_;
		FolksPersona* _tmp59_;
		const gchar* _tmp60_;
		const gchar* _tmp61_;
		gint _tmp62_ = 0;
		_tmp55_ = g_strcmp0;
		_tmp56_ = a;
		_tmp57_ = folks_persona_get_uid (_tmp56_);
		_tmp58_ = _tmp57_;
		_tmp59_ = b;
		_tmp60_ = folks_persona_get_uid (_tmp59_);
		_tmp61_ = _tmp60_;
		_tmp62_ = _tmp55_ (_tmp58_, _tmp61_);
		order = _tmp62_;
	}
	result = order;
	return result;
}


static gint ___lambda5__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda5_ (self, a, b);
	return result;
}


static void _folks_individual_update_single_valued_property (FolksIndividual* self, GType interface_type, FolksIndividualPropertyFilter filter_func, void* filter_func_target, GCompareFunc compare_func, const gchar* prop_name, FolksIndividualSingleValuedPropertySetter setter, void* setter_target) {
	Block2Data* _data2_;
	FolksIndividualPropertyFilter _tmp0_;
	void* _tmp0__target;
	GCompareFunc _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GCompareDataFunc primary_compare_func;
	void* primary_compare_func_target;
	GDestroyNotify primary_compare_func_target_destroy_notify;
	FolksPersona* candidate_p;
	FolksIndividualSingleValuedPropertySetter _tmp23_;
	void* _tmp23__target;
	FolksPersona* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prop_name != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = filter_func;
	_tmp0__target = filter_func_target;
	_data2_->filter_func = _tmp0_;
	_data2_->filter_func_target = _tmp0__target;
	_tmp1_ = compare_func;
	_data2_->compare_func = _tmp1_;
	_tmp2_ = prop_name;
	_tmp3_ = g_strdup (_tmp2_);
	_data2_->prop_name = _tmp3_;
	primary_compare_func = ___lambda5__gcompare_data_func;
	primary_compare_func_target = block2_data_ref (_data2_);
	primary_compare_func_target_destroy_notify = block2_data_unref;
	candidate_p = NULL;
	{
		GeeHashSet* _tmp4_;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _p_it;
		_tmp4_ = self->priv->_persona_set;
		_tmp5_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp4_);
		_p_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_;
			gpointer _tmp9_ = NULL;
			FolksPersona* p;
			FolksPersona* _tmp10_;
			GType _tmp11_ = 0UL;
			GType _tmp12_;
			gboolean _tmp13_ = FALSE;
			_tmp6_ = _p_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _p_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			p = (FolksPersona*) _tmp9_;
			_tmp10_ = p;
			_tmp11_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp10_);
			_tmp12_ = interface_type;
			_tmp13_ = g_type_is_a (_tmp11_, _tmp12_);
			if (_tmp13_) {
				gboolean _tmp14_ = FALSE;
				FolksPersona* _tmp15_;
				gboolean _tmp20_;
				_tmp15_ = candidate_p;
				if (_tmp15_ == NULL) {
					_tmp14_ = TRUE;
				} else {
					GCompareDataFunc _tmp16_;
					void* _tmp16__target;
					FolksPersona* _tmp17_;
					FolksPersona* _tmp18_;
					gint _tmp19_ = 0;
					_tmp16_ = primary_compare_func;
					_tmp16__target = primary_compare_func_target;
					_tmp17_ = p;
					_tmp18_ = candidate_p;
					_tmp19_ = _tmp16_ (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, FOLKS_TYPE_PERSONA, FolksPersona), _tmp16__target);
					_tmp14_ = _tmp19_ > 0;
				}
				_tmp20_ = _tmp14_;
				if (_tmp20_) {
					FolksPersona* _tmp21_;
					FolksPersona* _tmp22_;
					_tmp21_ = p;
					_tmp22_ = _g_object_ref0 (_tmp21_);
					_g_object_unref0 (candidate_p);
					candidate_p = _tmp22_;
				}
			}
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	_tmp23_ = setter;
	_tmp23__target = setter_target;
	_tmp24_ = candidate_p;
	_tmp23_ (_tmp24_, _tmp23__target);
	_g_object_unref0 (candidate_p);
	(primary_compare_func_target_destroy_notify == NULL) ? NULL : (primary_compare_func_target_destroy_notify (primary_compare_func_target), NULL);
	primary_compare_func = NULL;
	primary_compare_func_target = NULL;
	primary_compare_func_target_destroy_notify = NULL;
	block2_data_unref (_data2_);
	_data2_ = NULL;
}


static void __lambda4_ (FolksIndividual* self, const gchar* l) {
	const gchar* _tmp0_;
	const gchar* group;
	GeeHashSet* _tmp1_;
	g_return_if_fail (l != NULL);
	_tmp0_ = l;
	group = (const gchar*) _tmp0_;
	_tmp1_ = self->priv->_groups;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp1_, group);
	g_signal_emit_by_name ((FolksGroupDetails*) self, "group-changed", group, FALSE);
}


static void ___lambda4__gfunc (gconstpointer data, gpointer self) {
	__lambda4_ (self, data);
}


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 _folks_individual_update_groups (FolksIndividual* self) {
	GeeHashSet* _tmp0_;
	GeeHashSet* new_groups;
	GList* removes;
	GList* _tmp41_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	new_groups = _tmp0_;
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _p_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_p_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* p;
			FolksPersona* _tmp7_;
			_tmp3_ = _p_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _p_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			p = (FolksPersona*) _tmp6_;
			_tmp7_ = p;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_GROUP_DETAILS)) {
				FolksPersona* _tmp8_;
				FolksGroupDetails* _tmp9_;
				FolksGroupDetails* persona;
				_tmp8_ = p;
				_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails));
				persona = _tmp9_;
				{
					FolksGroupDetails* _tmp10_;
					GeeSet* _tmp11_;
					GeeSet* _tmp12_;
					GeeIterator* _tmp13_ = NULL;
					GeeIterator* _group_it;
					_tmp10_ = persona;
					_tmp11_ = folks_group_details_get_groups (_tmp10_);
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
					_group_it = _tmp13_;
					while (TRUE) {
						GeeIterator* _tmp14_;
						gboolean _tmp15_ = FALSE;
						GeeIterator* _tmp16_;
						gpointer _tmp17_ = NULL;
						gchar* group;
						GeeHashSet* _tmp18_;
						const gchar* _tmp19_;
						_tmp14_ = _group_it;
						_tmp15_ = gee_iterator_next (_tmp14_);
						if (!_tmp15_) {
							break;
						}
						_tmp16_ = _group_it;
						_tmp17_ = gee_iterator_get (_tmp16_);
						group = (gchar*) _tmp17_;
						_tmp18_ = new_groups;
						_tmp19_ = group;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
						_g_free0 (group);
					}
					_g_object_unref0 (_group_it);
				}
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	{
		GeeHashSet* _tmp20_;
		GeeIterator* _tmp21_ = NULL;
		GeeIterator* _group_it;
		_tmp20_ = new_groups;
		_tmp21_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp20_);
		_group_it = _tmp21_;
		while (TRUE) {
			GeeIterator* _tmp22_;
			gboolean _tmp23_ = FALSE;
			GeeIterator* _tmp24_;
			gpointer _tmp25_ = NULL;
			gchar* group;
			GeeHashSet* _tmp26_;
			const gchar* _tmp27_;
			gboolean _tmp28_ = FALSE;
			_tmp22_ = _group_it;
			_tmp23_ = gee_iterator_next (_tmp22_);
			if (!_tmp23_) {
				break;
			}
			_tmp24_ = _group_it;
			_tmp25_ = gee_iterator_get (_tmp24_);
			group = (gchar*) _tmp25_;
			_tmp26_ = self->priv->_groups;
			_tmp27_ = group;
			_tmp28_ = gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp27_);
			if (_tmp28_) {
				const gchar* _tmp29_;
				_tmp29_ = group;
				g_signal_emit_by_name ((FolksGroupDetails*) self, "group-changed", _tmp29_, TRUE);
			}
			_g_free0 (group);
		}
		_g_object_unref0 (_group_it);
	}
	removes = NULL;
	{
		GeeHashSet* _tmp30_;
		GeeIterator* _tmp31_ = NULL;
		GeeIterator* _group_it;
		_tmp30_ = self->priv->_groups;
		_tmp31_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp30_);
		_group_it = _tmp31_;
		while (TRUE) {
			GeeIterator* _tmp32_;
			gboolean _tmp33_ = FALSE;
			GeeIterator* _tmp34_;
			gpointer _tmp35_ = NULL;
			gchar* group;
			GeeHashSet* _tmp36_;
			const gchar* _tmp37_;
			gboolean _tmp38_ = FALSE;
			_tmp32_ = _group_it;
			_tmp33_ = gee_iterator_next (_tmp32_);
			if (!_tmp33_) {
				break;
			}
			_tmp34_ = _group_it;
			_tmp35_ = gee_iterator_get (_tmp34_);
			group = (gchar*) _tmp35_;
			_tmp36_ = new_groups;
			_tmp37_ = group;
			_tmp38_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp36_, _tmp37_);
			if (!_tmp38_) {
				const gchar* _tmp39_;
				gchar* _tmp40_;
				_tmp39_ = group;
				_tmp40_ = g_strdup (_tmp39_);
				removes = g_list_prepend (removes, _tmp40_);
			}
			_g_free0 (group);
		}
		_g_object_unref0 (_group_it);
	}
	_tmp41_ = removes;
	g_list_foreach (_tmp41_, ___lambda4__gfunc, self);
	__g_list_free__g_free0_0 (removes);
	_g_object_unref0 (new_groups);
}


static gboolean __lambda27_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	FolksPresenceType _tmp1_;
	FolksPresenceType _tmp2_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp2_ = _tmp1_;
	result = _tmp2_ != FOLKS_PRESENCE_TYPE_UNSET;
	return result;
}


static gboolean ___lambda27__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda27_ (self, persona);
	return result;
}


static gint __lambda28_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	FolksPersona* _tmp0_;
	FolksPresenceType _tmp1_;
	FolksPresenceType _tmp2_;
	FolksPresenceType a_presence;
	FolksPersona* _tmp3_;
	FolksPresenceType _tmp4_;
	FolksPresenceType _tmp5_;
	FolksPresenceType b_presence;
	gint _tmp6_ = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_tmp1_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp2_ = _tmp1_;
	a_presence = _tmp2_;
	_tmp3_ = b;
	_tmp4_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
	_tmp5_ = _tmp4_;
	b_presence = _tmp5_;
	_tmp6_ = folks_presence_details_typecmp (a_presence, b_presence);
	result = _tmp6_;
	return result;
}


static gint ___lambda28__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda28_ (a, b);
	return result;
}


static void __lambda29_ (FolksIndividual* self, FolksPersona* p) {
	gchar* _tmp0_;
	gchar* presence_message;
	gchar* _tmp1_;
	gchar* presence_status;
	FolksPresenceType presence_type;
	FolksPersona* _tmp2_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	FolksPresenceType _tmp16_;
	FolksPresenceType _tmp17_;
	FolksPresenceType _tmp18_;
	gboolean _tmp22_;
	gboolean _tmp26_;
	_tmp0_ = g_strdup ("");
	presence_message = _tmp0_;
	_tmp1_ = g_strdup ("");
	presence_status = _tmp1_;
	presence_type = FOLKS_PRESENCE_TYPE_UNSET;
	_tmp2_ = p;
	if (_tmp2_ != NULL) {
		FolksPersona* _tmp3_;
		FolksPresenceType _tmp4_;
		FolksPresenceType _tmp5_;
		FolksPersona* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		FolksPersona* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp3_ = p;
		_tmp4_ = folks_presence_details_get_presence_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp5_ = _tmp4_;
		presence_type = _tmp5_;
		_tmp6_ = p;
		_tmp7_ = folks_presence_details_get_presence_message (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (presence_message);
		presence_message = _tmp9_;
		_tmp10_ = p;
		_tmp11_ = folks_presence_details_get_presence_status (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FOLKS_TYPE_PRESENCE_DETAILS, FolksPresenceDetails));
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup (_tmp12_);
		_g_free0 (presence_status);
		presence_status = _tmp13_;
	}
	_tmp16_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) self);
	_tmp17_ = _tmp16_;
	_tmp18_ = presence_type;
	if (_tmp17_ != _tmp18_) {
		_tmp15_ = TRUE;
	} else {
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp19_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) self);
		_tmp20_ = _tmp19_;
		_tmp21_ = presence_message;
		_tmp15_ = g_strcmp0 (_tmp20_, _tmp21_) != 0;
	}
	_tmp22_ = _tmp15_;
	if (_tmp22_) {
		_tmp14_ = TRUE;
	} else {
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		_tmp23_ = folks_presence_details_get_presence_status ((FolksPresenceDetails*) self);
		_tmp24_ = _tmp23_;
		_tmp25_ = presence_status;
		_tmp14_ = g_strcmp0 (_tmp24_, _tmp25_) != 0;
	}
	_tmp26_ = _tmp14_;
	if (_tmp26_) {
		const gchar* _tmp27_;
		FolksPresenceType _tmp28_;
		const gchar* _tmp29_;
		g_object_freeze_notify ((GObject*) self);
		_tmp27_ = presence_message;
		folks_presence_details_set_presence_message ((FolksPresenceDetails*) self, _tmp27_);
		_tmp28_ = presence_type;
		folks_presence_details_set_presence_type ((FolksPresenceDetails*) self, _tmp28_);
		_tmp29_ = presence_status;
		folks_presence_details_set_presence_status ((FolksPresenceDetails*) self, _tmp29_);
		g_object_thaw_notify ((GObject*) self);
	}
	_g_free0 (presence_status);
	_g_free0 (presence_message);
}


static void ___lambda29__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda29_ (self, chosen_persona);
}


static void _folks_individual_update_presence (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_PRESENCE_DETAILS, ___lambda27__folks_individual_property_filter, self, ___lambda28__gcompare_func, "presence", ___lambda29__folks_individual_single_valued_property_setter, self);
}


static gboolean __lambda30_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	g_return_val_if_fail (p != NULL, FALSE);
	result = TRUE;
	return result;
}


static gboolean ___lambda30__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda30_ (self, persona);
	return result;
}


static gint __lambda31_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	FolksPersona* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean a_is_favourite;
	FolksPersona* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean b_is_favourite;
	gint _tmp6_ = 0;
	gboolean _tmp7_;
	gint _tmp8_ = 0;
	gboolean _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_tmp1_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
	_tmp2_ = _tmp1_;
	a_is_favourite = _tmp2_;
	_tmp3_ = b;
	_tmp4_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
	_tmp5_ = _tmp4_;
	b_is_favourite = _tmp5_;
	_tmp7_ = a_is_favourite;
	if (_tmp7_ == TRUE) {
		_tmp6_ = 1;
	} else {
		_tmp6_ = 0;
	}
	_tmp9_ = b_is_favourite;
	if (_tmp9_ == TRUE) {
		_tmp8_ = 1;
	} else {
		_tmp8_ = 0;
	}
	_tmp10_ = _tmp6_;
	_tmp11_ = _tmp8_;
	result = _tmp10_ - _tmp11_;
	return result;
}


static gint ___lambda31__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda31_ (a, b);
	return result;
}


static void __lambda32_ (FolksIndividual* self, FolksPersona* p) {
	gboolean favourite;
	FolksPersona* _tmp0_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	favourite = FALSE;
	_tmp0_ = p;
	if (_tmp0_ != NULL) {
		FolksPersona* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp1_ = p;
		_tmp2_ = folks_favourite_details_get_is_favourite (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_FAVOURITE_DETAILS, FolksFavouriteDetails));
		_tmp3_ = _tmp2_;
		favourite = _tmp3_;
	}
	_tmp4_ = self->priv->_is_favourite;
	_tmp5_ = favourite;
	if (_tmp4_ != _tmp5_) {
		gboolean _tmp6_;
		_tmp6_ = favourite;
		self->priv->_is_favourite = _tmp6_;
		g_object_notify ((GObject*) self, "is-favourite");
	}
}


static void ___lambda32__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda32_ (self, chosen_persona);
}


static void _folks_individual_update_is_favourite (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_FAVOURITE_DETAILS, ___lambda30__folks_individual_property_filter, self, ___lambda31__gcompare_func, "is-favourite", ___lambda32__folks_individual_single_valued_property_setter, self);
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _result_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static gboolean __lambda6_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* alias;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gboolean _tmp6_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	alias = _tmp3_;
	_vala_assert (alias != NULL, "alias != null");
	_tmp4_ = string_strip (alias);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strcmp0 (_tmp5_, "") != 0;
	_g_free0 (_tmp5_);
	result = _tmp6_;
	_g_free0 (alias);
	return result;
}


static gboolean ___lambda6__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda6_ (self, persona);
	return result;
}


static gint __lambda7_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* a_alias;
	FolksPersona* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* b_alias;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gint _tmp10_ = 0;
	const gchar* _tmp11_;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_;
	gboolean _tmp14_;
	gint _tmp15_;
	gint a_is_empty;
	gint _tmp16_ = 0;
	const gchar* _tmp17_;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_;
	gboolean _tmp20_;
	gint _tmp21_;
	gint b_is_empty;
	gint _tmp22_ = 0;
	const gchar* _tmp23_;
	FolksPersona* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gint _tmp27_;
	gint a_is_display_id;
	gint _tmp28_ = 0;
	const gchar* _tmp29_;
	FolksPersona* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	gint _tmp33_;
	gint b_is_display_id;
	gint _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_tmp1_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	a_alias = _tmp3_;
	_tmp4_ = b;
	_tmp5_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	b_alias = _tmp7_;
	_tmp8_ = a_alias;
	_vala_assert (_tmp8_ != NULL, "a_alias != null");
	_tmp9_ = b_alias;
	_vala_assert (_tmp9_ != NULL, "b_alias != null");
	_tmp11_ = a_alias;
	_tmp12_ = string_strip (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strcmp0 (_tmp13_, "") == 0;
	_g_free0 (_tmp13_);
	if (_tmp14_) {
		_tmp10_ = 1;
	} else {
		_tmp10_ = 0;
	}
	_tmp15_ = _tmp10_;
	a_is_empty = _tmp15_;
	_tmp17_ = b_alias;
	_tmp18_ = string_strip (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strcmp0 (_tmp19_, "") == 0;
	_g_free0 (_tmp19_);
	if (_tmp20_) {
		_tmp16_ = 1;
	} else {
		_tmp16_ = 0;
	}
	_tmp21_ = _tmp16_;
	b_is_empty = _tmp21_;
	_tmp23_ = a_alias;
	_tmp24_ = a;
	_tmp25_ = folks_persona_get_display_id (_tmp24_);
	_tmp26_ = _tmp25_;
	if (g_strcmp0 (_tmp23_, _tmp26_) == 0) {
		_tmp22_ = 1;
	} else {
		_tmp22_ = 0;
	}
	_tmp27_ = _tmp22_;
	a_is_display_id = _tmp27_;
	_tmp29_ = b_alias;
	_tmp30_ = b;
	_tmp31_ = folks_persona_get_display_id (_tmp30_);
	_tmp32_ = _tmp31_;
	if (g_strcmp0 (_tmp29_, _tmp32_) == 0) {
		_tmp28_ = 1;
	} else {
		_tmp28_ = 0;
	}
	_tmp33_ = _tmp28_;
	b_is_display_id = _tmp33_;
	_tmp34_ = b_is_empty;
	_tmp35_ = a_is_empty;
	_tmp36_ = a_is_display_id;
	result = (_tmp34_ + b_is_display_id) - (_tmp35_ + _tmp36_);
	_g_free0 (b_alias);
	_g_free0 (a_alias);
	return result;
}


static gint ___lambda7__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda7_ (a, b);
	return result;
}


static void __lambda8_ (FolksIndividual* self, FolksPersona* p) {
	gchar* _tmp0_;
	gchar* alias;
	FolksPersona* _tmp1_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	_tmp0_ = g_strdup ("");
	alias = _tmp0_;
	_tmp1_ = p;
	if (_tmp1_ != NULL) {
		FolksPersona* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		_tmp2_ = p;
		_tmp3_ = folks_alias_details_get_alias (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FOLKS_TYPE_ALIAS_DETAILS, FolksAliasDetails));
		_tmp4_ = _tmp3_;
		_tmp5_ = string_strip (_tmp4_);
		_g_free0 (alias);
		alias = _tmp5_;
	}
	_tmp6_ = self->priv->_alias;
	_tmp7_ = alias;
	if (g_strcmp0 (_tmp6_, _tmp7_) != 0) {
		const gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp8_ = alias;
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (self->priv->_alias);
		self->priv->_alias = _tmp9_;
		g_object_notify ((GObject*) self, "alias");
	}
	_g_free0 (alias);
}


static void ___lambda8__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda8_ (self, chosen_persona);
}


static void _folks_individual_update_alias (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_ALIAS_DETAILS, ___lambda6__folks_individual_property_filter, self, ___lambda7__gcompare_func, "alias", ___lambda8__folks_individual_single_valued_property_setter, self);
}


static gboolean __lambda9_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	GLoadableIcon* _tmp1_;
	GLoadableIcon* _tmp2_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_avatar_details_get_avatar (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails));
	_tmp2_ = _tmp1_;
	result = _tmp2_ != NULL;
	return result;
}


static gboolean ___lambda9__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda9_ (self, persona);
	return result;
}


static gint __lambda10_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}


static gint ___lambda10__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda10_ (a, b);
	return result;
}


static void __lambda11_ (FolksIndividual* self, FolksPersona* p) {
	GLoadableIcon* avatar;
	FolksPersona* _tmp0_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	GLoadableIcon* _tmp7_;
	gboolean _tmp9_;
	gboolean _tmp19_;
	avatar = NULL;
	_tmp0_ = p;
	if (_tmp0_ != NULL) {
		FolksPersona* _tmp1_;
		GLoadableIcon* _tmp2_;
		GLoadableIcon* _tmp3_;
		GLoadableIcon* _tmp4_;
		_tmp1_ = p;
		_tmp2_ = folks_avatar_details_get_avatar (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails));
		_tmp3_ = _tmp2_;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_g_object_unref0 (avatar);
		avatar = _tmp4_;
	}
	_tmp7_ = self->priv->_avatar;
	if (_tmp7_ == NULL) {
		GLoadableIcon* _tmp8_;
		_tmp8_ = avatar;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	_tmp9_ = _tmp6_;
	if (_tmp9_) {
		_tmp5_ = TRUE;
	} else {
		gboolean _tmp10_ = FALSE;
		GLoadableIcon* _tmp11_;
		gboolean _tmp18_;
		_tmp11_ = self->priv->_avatar;
		if (_tmp11_ != NULL) {
			gboolean _tmp12_ = FALSE;
			GLoadableIcon* _tmp13_;
			gboolean _tmp17_;
			_tmp13_ = avatar;
			if (_tmp13_ == NULL) {
				_tmp12_ = TRUE;
			} else {
				GLoadableIcon* _tmp14_;
				GLoadableIcon* _tmp15_;
				gboolean _tmp16_ = FALSE;
				_tmp14_ = self->priv->_avatar;
				_tmp15_ = avatar;
				_tmp16_ = g_icon_equal ((GIcon*) G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, g_loadable_icon_get_type (), GLoadableIcon), (GIcon*) _tmp15_);
				_tmp12_ = !_tmp16_;
			}
			_tmp17_ = _tmp12_;
			_tmp10_ = _tmp17_;
		} else {
			_tmp10_ = FALSE;
		}
		_tmp18_ = _tmp10_;
		_tmp5_ = _tmp18_;
	}
	_tmp19_ = _tmp5_;
	if (_tmp19_) {
		GLoadableIcon* _tmp20_;
		GLoadableIcon* _tmp21_;
		_tmp20_ = avatar;
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (self->priv->_avatar);
		self->priv->_avatar = _tmp21_;
		g_object_notify ((GObject*) self, "avatar");
	}
	_g_object_unref0 (avatar);
}


static void ___lambda11__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda11_ (self, chosen_persona);
}


static void _folks_individual_update_avatar (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_AVATAR_DETAILS, ___lambda9__folks_individual_property_filter, self, ___lambda10__gcompare_func, "avatar", ___lambda11__folks_individual_single_valued_property_setter, self);
}


static void _folks_individual_update_trust_level (FolksIndividual* self) {
	FolksTrustLevel trust_level;
	FolksTrustLevel _tmp16_;
	FolksTrustLevel _tmp17_;
	g_return_if_fail (self != NULL);
	trust_level = FOLKS_TRUST_LEVEL_PERSONAS;
	{
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _p_it;
		_tmp0_ = self->priv->_persona_set;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_p_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			FolksPersona* p;
			gboolean _tmp6_ = FALSE;
			FolksPersona* _tmp7_;
			gboolean _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp15_;
			_tmp2_ = _p_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = _p_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			p = (FolksPersona*) _tmp5_;
			_tmp7_ = p;
			_tmp8_ = folks_persona_get_is_user (_tmp7_);
			_tmp9_ = _tmp8_;
			if (_tmp9_ == FALSE) {
				FolksPersona* _tmp10_;
				FolksPersonaStore* _tmp11_;
				FolksPersonaStore* _tmp12_;
				FolksPersonaStoreTrust _tmp13_;
				FolksPersonaStoreTrust _tmp14_;
				_tmp10_ = p;
				_tmp11_ = folks_persona_get_store (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = folks_persona_store_get_trust_level (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp6_ = _tmp14_ == FOLKS_PERSONA_STORE_TRUST_NONE;
			} else {
				_tmp6_ = FALSE;
			}
			_tmp15_ = _tmp6_;
			if (_tmp15_) {
				trust_level = FOLKS_TRUST_LEVEL_NONE;
			}
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	_tmp16_ = self->priv->_trust_level;
	_tmp17_ = trust_level;
	if (_tmp16_ != _tmp17_) {
		FolksTrustLevel _tmp18_;
		_tmp18_ = trust_level;
		folks_individual_set_trust_level (self, _tmp18_);
	}
}


static void _folks_individual_update_im_addresses (FolksIndividual* self) {
	GeeHashMultiMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_im_addresses;
	gee_multi_map_clear ((GeeMultiMap*) _tmp0_);
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_IM_DETAILS)) {
				FolksPersona* _tmp8_;
				FolksImDetails* _tmp9_;
				FolksImDetails* im_details;
				_tmp8_ = persona;
				_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, FOLKS_TYPE_IM_DETAILS, FolksImDetails));
				im_details = _tmp9_;
				{
					FolksImDetails* _tmp10_;
					GeeMultiMap* _tmp11_;
					GeeMultiMap* _tmp12_;
					GeeSet* _tmp13_ = NULL;
					GeeSet* _tmp14_;
					GeeIterator* _tmp15_ = NULL;
					GeeIterator* _tmp16_;
					GeeIterator* _cur_protocol_it;
					_tmp10_ = im_details;
					_tmp11_ = folks_im_details_get_im_addresses (_tmp10_);
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_multi_map_get_keys (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
					_tmp16_ = _tmp15_;
					_g_object_unref0 (_tmp14_);
					_cur_protocol_it = _tmp16_;
					while (TRUE) {
						GeeIterator* _tmp17_;
						gboolean _tmp18_ = FALSE;
						GeeIterator* _tmp19_;
						gpointer _tmp20_ = NULL;
						gchar* cur_protocol;
						FolksImDetails* _tmp21_;
						GeeMultiMap* _tmp22_;
						GeeMultiMap* _tmp23_;
						const gchar* _tmp24_;
						GeeCollection* _tmp25_ = NULL;
						GeeCollection* cur_addresses;
						_tmp17_ = _cur_protocol_it;
						_tmp18_ = gee_iterator_next (_tmp17_);
						if (!_tmp18_) {
							break;
						}
						_tmp19_ = _cur_protocol_it;
						_tmp20_ = gee_iterator_get (_tmp19_);
						cur_protocol = (gchar*) _tmp20_;
						_tmp21_ = im_details;
						_tmp22_ = folks_im_details_get_im_addresses (_tmp21_);
						_tmp23_ = _tmp22_;
						_tmp24_ = cur_protocol;
						_tmp25_ = gee_multi_map_get (_tmp23_, _tmp24_);
						cur_addresses = _tmp25_;
						{
							GeeCollection* _tmp26_;
							GeeIterator* _tmp27_ = NULL;
							GeeIterator* _address_it;
							_tmp26_ = cur_addresses;
							_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
							_address_it = _tmp27_;
							while (TRUE) {
								GeeIterator* _tmp28_;
								gboolean _tmp29_ = FALSE;
								GeeIterator* _tmp30_;
								gpointer _tmp31_ = NULL;
								FolksImFieldDetails* address;
								GeeHashMultiMap* _tmp32_;
								const gchar* _tmp33_;
								FolksImFieldDetails* _tmp34_;
								_tmp28_ = _address_it;
								_tmp29_ = gee_iterator_next (_tmp28_);
								if (!_tmp29_) {
									break;
								}
								_tmp30_ = _address_it;
								_tmp31_ = gee_iterator_get (_tmp30_);
								address = (FolksImFieldDetails*) _tmp31_;
								_tmp32_ = self->priv->_im_addresses;
								_tmp33_ = cur_protocol;
								_tmp34_ = address;
								gee_multi_map_set ((GeeMultiMap*) _tmp32_, _tmp33_, _tmp34_);
								_g_object_unref0 (address);
							}
							_g_object_unref0 (_address_it);
						}
						_g_object_unref0 (cur_addresses);
						_g_free0 (cur_protocol);
					}
					_g_object_unref0 (_cur_protocol_it);
				}
				_g_object_unref0 (im_details);
			}
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "im-addresses");
}


static void _folks_individual_update_web_service_addresses (FolksIndividual* self) {
	GeeHashMultiMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_web_service_addresses;
	gee_multi_map_clear ((GeeMultiMap*) _tmp0_);
	{
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = folks_individual_get_personas (self);
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_persona_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp8_;
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _persona_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			persona = (FolksPersona*) _tmp7_;
			_tmp8_ = persona;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, FOLKS_TYPE_WEB_SERVICE_DETAILS)) {
				FolksPersona* _tmp9_;
				FolksWebServiceDetails* _tmp10_;
				FolksWebServiceDetails* web_service_details;
				_tmp9_ = persona;
				_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, FOLKS_TYPE_WEB_SERVICE_DETAILS, FolksWebServiceDetails));
				web_service_details = _tmp10_;
				{
					FolksWebServiceDetails* _tmp11_;
					GeeMultiMap* _tmp12_;
					GeeMultiMap* _tmp13_;
					GeeSet* _tmp14_ = NULL;
					GeeSet* _tmp15_;
					GeeIterator* _tmp16_ = NULL;
					GeeIterator* _tmp17_;
					GeeIterator* _cur_web_service_it;
					_tmp11_ = web_service_details;
					_tmp12_ = folks_web_service_details_get_web_service_addresses (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp14_ = gee_multi_map_get_keys (_tmp13_);
					_tmp15_ = _tmp14_;
					_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
					_tmp17_ = _tmp16_;
					_g_object_unref0 (_tmp15_);
					_cur_web_service_it = _tmp17_;
					while (TRUE) {
						GeeIterator* _tmp18_;
						gboolean _tmp19_ = FALSE;
						GeeIterator* _tmp20_;
						gpointer _tmp21_ = NULL;
						gchar* cur_web_service;
						FolksWebServiceDetails* _tmp22_;
						GeeMultiMap* _tmp23_;
						GeeMultiMap* _tmp24_;
						const gchar* _tmp25_;
						GeeCollection* _tmp26_ = NULL;
						GeeCollection* cur_addresses;
						_tmp18_ = _cur_web_service_it;
						_tmp19_ = gee_iterator_next (_tmp18_);
						if (!_tmp19_) {
							break;
						}
						_tmp20_ = _cur_web_service_it;
						_tmp21_ = gee_iterator_get (_tmp20_);
						cur_web_service = (gchar*) _tmp21_;
						_tmp22_ = web_service_details;
						_tmp23_ = folks_web_service_details_get_web_service_addresses (_tmp22_);
						_tmp24_ = _tmp23_;
						_tmp25_ = cur_web_service;
						_tmp26_ = gee_multi_map_get (_tmp24_, _tmp25_);
						cur_addresses = _tmp26_;
						{
							GeeCollection* _tmp27_;
							GeeIterator* _tmp28_ = NULL;
							GeeIterator* _ws_fd_it;
							_tmp27_ = cur_addresses;
							_tmp28_ = gee_iterable_iterator ((GeeIterable*) _tmp27_);
							_ws_fd_it = _tmp28_;
							while (TRUE) {
								GeeIterator* _tmp29_;
								gboolean _tmp30_ = FALSE;
								GeeIterator* _tmp31_;
								gpointer _tmp32_ = NULL;
								FolksWebServiceFieldDetails* ws_fd;
								GeeHashMultiMap* _tmp33_;
								const gchar* _tmp34_;
								FolksWebServiceFieldDetails* _tmp35_;
								_tmp29_ = _ws_fd_it;
								_tmp30_ = gee_iterator_next (_tmp29_);
								if (!_tmp30_) {
									break;
								}
								_tmp31_ = _ws_fd_it;
								_tmp32_ = gee_iterator_get (_tmp31_);
								ws_fd = (FolksWebServiceFieldDetails*) _tmp32_;
								_tmp33_ = self->priv->_web_service_addresses;
								_tmp34_ = cur_web_service;
								_tmp35_ = ws_fd;
								gee_multi_map_set ((GeeMultiMap*) _tmp33_, _tmp34_, _tmp35_);
								_g_object_unref0 (ws_fd);
							}
							_g_object_unref0 (_ws_fd_it);
						}
						_g_object_unref0 (cur_addresses);
						_g_free0 (cur_web_service);
					}
					_g_object_unref0 (_cur_web_service_it);
				}
				_g_object_unref0 (web_service_details);
			}
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "web-service-addresses");
}


static void __folks_individual_notify_alias_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_alias_cb (self, _sender, pspec);
}


static void __folks_individual_notify_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_avatar_cb (self, _sender, pspec);
}


static void __folks_individual_notify_presence_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_presence_cb (self, _sender, pspec);
}


static void __folks_individual_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_im_addresses_cb (self, _sender, pspec);
}


static void __folks_individual_notify_web_service_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_web_service_addresses_cb (self, _sender, pspec);
}


static void __folks_individual_notify_is_favourite_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_is_favourite_cb (self, _sender, pspec);
}


static void __folks_individual_notify_structured_name_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_structured_name_cb (self);
}


static void __folks_individual_notify_full_name_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_full_name_cb (self);
}


static void __folks_individual_notify_nickname_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_nickname_cb (self);
}


static void __folks_individual_notify_gender_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_gender_cb (self);
}


static void __folks_individual_notify_urls_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_urls_cb (self);
}


static void __folks_individual_notify_phone_numbers_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_phone_numbers_cb (self);
}


static void __folks_individual_notify_email_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_email_addresses_cb (self);
}


static void __folks_individual_notify_roles_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_roles_cb (self);
}


static void __folks_individual_notify_birthday_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_birthday_cb (self);
}


static void __folks_individual_notify_notes_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_notes_cb (self);
}


static void __folks_individual_notify_postal_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_postal_addresses_cb (self);
}


static void __folks_individual_notify_local_ids_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_local_ids_cb (self);
}


static void __folks_individual_persona_group_changed_cb_folks_group_details_group_changed (FolksGroupDetails* _sender, const gchar* group, gboolean is_member, gpointer self) {
	_folks_individual_persona_group_changed_cb (self, group, is_member);
}


static void __folks_individual_notify_im_interaction_count_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_im_interaction_count_cb (self, _sender, pspec);
}


static void __folks_individual_notify_call_interaction_count_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_call_interaction_count_cb (self, _sender, pspec);
}


static void __folks_individual_notify_last_im_interaction_datetime_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_last_im_interaction_datetime_cb (self, _sender, pspec);
}


static void __folks_individual_notify_last_call_interaction_datetime_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_folks_individual_notify_last_call_interaction_datetime_cb (self, _sender, pspec);
}


static void _folks_individual_connect_to_persona (FolksIndividual* self, FolksPersona* persona) {
	FolksPersona* _tmp0_;
	FolksPersona* _tmp1_;
	FolksPersona* _tmp2_;
	FolksPersona* _tmp3_;
	FolksPersona* _tmp4_;
	FolksPersona* _tmp5_;
	FolksPersona* _tmp6_;
	FolksPersona* _tmp7_;
	FolksPersona* _tmp8_;
	FolksPersona* _tmp9_;
	FolksPersona* _tmp10_;
	FolksPersona* _tmp11_;
	FolksPersona* _tmp12_;
	FolksPersona* _tmp13_;
	FolksPersona* _tmp14_;
	FolksPersona* _tmp15_;
	FolksPersona* _tmp16_;
	FolksPersona* _tmp17_;
	FolksPersona* _tmp18_;
	FolksPersona* _tmp19_;
	FolksPersona* _tmp20_;
	FolksPersona* _tmp22_;
	FolksInteractionDetails* _tmp23_;
	FolksInteractionDetails* p_interaction_details;
	FolksInteractionDetails* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (persona != NULL);
	_tmp0_ = persona;
	folks_persona_set_individual (_tmp0_, self);
	_tmp1_ = persona;
	g_signal_connect_object ((GObject*) _tmp1_, "notify::alias", (GCallback) __folks_individual_notify_alias_cb_g_object_notify, self, 0);
	_tmp2_ = persona;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::avatar", (GCallback) __folks_individual_notify_avatar_cb_g_object_notify, self, 0);
	_tmp3_ = persona;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::presence-message", (GCallback) __folks_individual_notify_presence_cb_g_object_notify, self, 0);
	_tmp4_ = persona;
	g_signal_connect_object ((GObject*) _tmp4_, "notify::presence-type", (GCallback) __folks_individual_notify_presence_cb_g_object_notify, self, 0);
	_tmp5_ = persona;
	g_signal_connect_object ((GObject*) _tmp5_, "notify::im-addresses", (GCallback) __folks_individual_notify_im_addresses_cb_g_object_notify, self, 0);
	_tmp6_ = persona;
	g_signal_connect_object ((GObject*) _tmp6_, "notify::web-service-addresses", (GCallback) __folks_individual_notify_web_service_addresses_cb_g_object_notify, self, 0);
	_tmp7_ = persona;
	g_signal_connect_object ((GObject*) _tmp7_, "notify::is-favourite", (GCallback) __folks_individual_notify_is_favourite_cb_g_object_notify, self, 0);
	_tmp8_ = persona;
	g_signal_connect_object ((GObject*) _tmp8_, "notify::structured-name", (GCallback) __folks_individual_notify_structured_name_cb_g_object_notify, self, 0);
	_tmp9_ = persona;
	g_signal_connect_object ((GObject*) _tmp9_, "notify::full-name", (GCallback) __folks_individual_notify_full_name_cb_g_object_notify, self, 0);
	_tmp10_ = persona;
	g_signal_connect_object ((GObject*) _tmp10_, "notify::nickname", (GCallback) __folks_individual_notify_nickname_cb_g_object_notify, self, 0);
	_tmp11_ = persona;
	g_signal_connect_object ((GObject*) _tmp11_, "notify::gender", (GCallback) __folks_individual_notify_gender_cb_g_object_notify, self, 0);
	_tmp12_ = persona;
	g_signal_connect_object ((GObject*) _tmp12_, "notify::urls", (GCallback) __folks_individual_notify_urls_cb_g_object_notify, self, 0);
	_tmp13_ = persona;
	g_signal_connect_object ((GObject*) _tmp13_, "notify::phone-numbers", (GCallback) __folks_individual_notify_phone_numbers_cb_g_object_notify, self, 0);
	_tmp14_ = persona;
	g_signal_connect_object ((GObject*) _tmp14_, "notify::email-addresses", (GCallback) __folks_individual_notify_email_addresses_cb_g_object_notify, self, 0);
	_tmp15_ = persona;
	g_signal_connect_object ((GObject*) _tmp15_, "notify::roles", (GCallback) __folks_individual_notify_roles_cb_g_object_notify, self, 0);
	_tmp16_ = persona;
	g_signal_connect_object ((GObject*) _tmp16_, "notify::birthday", (GCallback) __folks_individual_notify_birthday_cb_g_object_notify, self, 0);
	_tmp17_ = persona;
	g_signal_connect_object ((GObject*) _tmp17_, "notify::notes", (GCallback) __folks_individual_notify_notes_cb_g_object_notify, self, 0);
	_tmp18_ = persona;
	g_signal_connect_object ((GObject*) _tmp18_, "notify::postal-addresses", (GCallback) __folks_individual_notify_postal_addresses_cb_g_object_notify, self, 0);
	_tmp19_ = persona;
	g_signal_connect_object ((GObject*) _tmp19_, "notify::local-ids", (GCallback) __folks_individual_notify_local_ids_cb_g_object_notify, self, 0);
	_tmp20_ = persona;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, FOLKS_TYPE_GROUP_DETAILS)) {
		FolksPersona* _tmp21_;
		_tmp21_ = persona;
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), "group-changed", (GCallback) __folks_individual_persona_group_changed_cb_folks_group_details_group_changed, self, 0);
	}
	_tmp22_ = persona;
	_tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp22_) : NULL);
	p_interaction_details = _tmp23_;
	_tmp24_ = p_interaction_details;
	if (_tmp24_ != NULL) {
		FolksPersona* _tmp25_;
		FolksPersona* _tmp26_;
		FolksPersona* _tmp27_;
		FolksPersona* _tmp28_;
		_tmp25_ = persona;
		g_signal_connect_object ((GObject*) _tmp25_, "notify::im-interaction-count", (GCallback) __folks_individual_notify_im_interaction_count_cb_g_object_notify, self, 0);
		_tmp26_ = persona;
		g_signal_connect_object ((GObject*) _tmp26_, "notify::call-interaction-count", (GCallback) __folks_individual_notify_call_interaction_count_cb_g_object_notify, self, 0);
		_tmp27_ = persona;
		g_signal_connect_object ((GObject*) _tmp27_, "notify::last-im-interaction-datetime", (GCallback) __folks_individual_notify_last_im_interaction_datetime_cb_g_object_notify, self, 0);
		_tmp28_ = persona;
		g_signal_connect_object ((GObject*) _tmp28_, "notify::last-call-interaction-datetime", (GCallback) __folks_individual_notify_last_call_interaction_datetime_cb_g_object_notify, self, 0);
	}
	_g_object_unref0 (p_interaction_details);
}


static gboolean __lambda15_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	FolksStructuredName* _tmp1_;
	FolksStructuredName* _tmp2_;
	FolksStructuredName* _tmp3_;
	FolksStructuredName* name;
	gboolean _tmp4_ = FALSE;
	FolksStructuredName* _tmp5_;
	gboolean _tmp8_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_name_details_get_structured_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	name = _tmp3_;
	_tmp5_ = name;
	if (_tmp5_ != NULL) {
		FolksStructuredName* _tmp6_;
		gboolean _tmp7_ = FALSE;
		_tmp6_ = name;
		_tmp7_ = folks_structured_name_is_empty (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
		_tmp4_ = !_tmp7_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp8_ = _tmp4_;
	result = _tmp8_;
	_g_object_unref0 (name);
	return result;
}


static gboolean ___lambda15__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda15_ (self, persona);
	return result;
}


static gint __lambda16_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}


static gint ___lambda16__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda16_ (a, b);
	return result;
}


static void __lambda17_ (FolksIndividual* self, FolksPersona* p) {
	FolksStructuredName* name;
	FolksPersona* _tmp0_;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	FolksStructuredName* _tmp12_;
	gboolean _tmp14_;
	gboolean _tmp24_;
	name = NULL;
	_tmp0_ = p;
	if (_tmp0_ != NULL) {
		FolksPersona* _tmp1_;
		FolksStructuredName* _tmp2_;
		FolksStructuredName* _tmp3_;
		FolksStructuredName* _tmp4_;
		gboolean _tmp5_ = FALSE;
		FolksStructuredName* _tmp6_;
		gboolean _tmp9_;
		_tmp1_ = p;
		_tmp2_ = folks_name_details_get_structured_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp3_ = _tmp2_;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_g_object_unref0 (name);
		name = _tmp4_;
		_tmp6_ = name;
		if (_tmp6_ != NULL) {
			FolksStructuredName* _tmp7_;
			gboolean _tmp8_ = FALSE;
			_tmp7_ = name;
			_tmp8_ = folks_structured_name_is_empty (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
			_tmp5_ = _tmp8_;
		} else {
			_tmp5_ = FALSE;
		}
		_tmp9_ = _tmp5_;
		if (_tmp9_) {
			_g_object_unref0 (name);
			name = NULL;
		}
	}
	_tmp12_ = self->priv->_structured_name;
	if (_tmp12_ == NULL) {
		FolksStructuredName* _tmp13_;
		_tmp13_ = name;
		_tmp11_ = _tmp13_ != NULL;
	} else {
		_tmp11_ = FALSE;
	}
	_tmp14_ = _tmp11_;
	if (_tmp14_) {
		_tmp10_ = TRUE;
	} else {
		gboolean _tmp15_ = FALSE;
		FolksStructuredName* _tmp16_;
		gboolean _tmp23_;
		_tmp16_ = self->priv->_structured_name;
		if (_tmp16_ != NULL) {
			gboolean _tmp17_ = FALSE;
			FolksStructuredName* _tmp18_;
			gboolean _tmp22_;
			_tmp18_ = name;
			if (_tmp18_ == NULL) {
				_tmp17_ = TRUE;
			} else {
				FolksStructuredName* _tmp19_;
				FolksStructuredName* _tmp20_;
				gboolean _tmp21_ = FALSE;
				_tmp19_ = self->priv->_structured_name;
				_tmp20_ = name;
				_tmp21_ = folks_structured_name_equal (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
				_tmp17_ = !_tmp21_;
			}
			_tmp22_ = _tmp17_;
			_tmp15_ = _tmp22_;
		} else {
			_tmp15_ = FALSE;
		}
		_tmp23_ = _tmp15_;
		_tmp10_ = _tmp23_;
	}
	_tmp24_ = _tmp10_;
	if (_tmp24_) {
		FolksStructuredName* _tmp25_;
		FolksStructuredName* _tmp26_;
		_tmp25_ = name;
		_tmp26_ = _g_object_ref0 (_tmp25_);
		_g_object_unref0 (self->priv->_structured_name);
		self->priv->_structured_name = _tmp26_;
		g_object_notify ((GObject*) self, "structured-name");
	}
	_g_object_unref0 (name);
}


static void ___lambda17__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda17_ (self, chosen_persona);
}


static void _folks_individual_update_structured_name (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda15__folks_individual_property_filter, self, ___lambda16__gcompare_func, "structured-name", ___lambda17__folks_individual_single_valued_property_setter, self);
}


static gboolean __lambda12_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* name;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gboolean _tmp6_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_name_details_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	name = _tmp3_;
	_vala_assert (name != NULL, "name != null");
	_tmp4_ = string_strip (name);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strcmp0 (_tmp5_, "") != 0;
	_g_free0 (_tmp5_);
	result = _tmp6_;
	_g_free0 (name);
	return result;
}


static gboolean ___lambda12__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda12_ (self, persona);
	return result;
}


static gint __lambda13_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}


static gint ___lambda13__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda13_ (a, b);
	return result;
}


static void __lambda14_ (FolksIndividual* self, FolksPersona* p) {
	gchar* _tmp0_;
	gchar* new_full_name;
	FolksPersona* _tmp1_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	_tmp0_ = g_strdup ("");
	new_full_name = _tmp0_;
	_tmp1_ = p;
	if (_tmp1_ != NULL) {
		FolksPersona* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		_tmp2_ = p;
		_tmp3_ = folks_name_details_get_full_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp4_ = _tmp3_;
		_tmp5_ = string_strip (_tmp4_);
		_g_free0 (new_full_name);
		new_full_name = _tmp5_;
	}
	_tmp6_ = new_full_name;
	_tmp7_ = self->priv->_full_name;
	if (g_strcmp0 (_tmp6_, _tmp7_) != 0) {
		const gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp8_ = new_full_name;
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (self->priv->_full_name);
		self->priv->_full_name = _tmp9_;
		g_object_notify ((GObject*) self, "full-name");
	}
	_g_free0 (new_full_name);
}


static void ___lambda14__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda14_ (self, chosen_persona);
}


static void _folks_individual_update_full_name (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda12__folks_individual_property_filter, self, ___lambda13__gcompare_func, "full-name", ___lambda14__folks_individual_single_valued_property_setter, self);
}


static gboolean __lambda18_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* nickname;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gboolean _tmp6_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_name_details_get_nickname (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	nickname = _tmp3_;
	_vala_assert (nickname != NULL, "nickname != null");
	_tmp4_ = string_strip (nickname);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strcmp0 (_tmp5_, "") != 0;
	_g_free0 (_tmp5_);
	result = _tmp6_;
	_g_free0 (nickname);
	return result;
}


static gboolean ___lambda18__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda18_ (self, persona);
	return result;
}


static gint __lambda19_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}


static gint ___lambda19__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda19_ (a, b);
	return result;
}


static void __lambda20_ (FolksIndividual* self, FolksPersona* p) {
	gchar* _tmp0_;
	gchar* new_nickname;
	FolksPersona* _tmp1_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	_tmp0_ = g_strdup ("");
	new_nickname = _tmp0_;
	_tmp1_ = p;
	if (_tmp1_ != NULL) {
		FolksPersona* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		_tmp2_ = p;
		_tmp3_ = folks_name_details_get_nickname (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
		_tmp4_ = _tmp3_;
		_tmp5_ = string_strip (_tmp4_);
		_g_free0 (new_nickname);
		new_nickname = _tmp5_;
	}
	_tmp6_ = new_nickname;
	_tmp7_ = self->priv->_nickname;
	if (g_strcmp0 (_tmp6_, _tmp7_) != 0) {
		const gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp8_ = new_nickname;
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (self->priv->_nickname);
		self->priv->_nickname = _tmp9_;
		g_object_notify ((GObject*) self, "nickname");
	}
	_g_free0 (new_nickname);
}


static void ___lambda20__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda20_ (self, chosen_persona);
}


static void _folks_individual_update_nickname (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_NAME_DETAILS, ___lambda18__folks_individual_property_filter, self, ___lambda19__gcompare_func, "nickname", ___lambda20__folks_individual_single_valued_property_setter, self);
}


static void _folks_individual_disconnect_from_persona (FolksIndividual* self, FolksPersona* persona, FolksIndividual* replacement_individual) {
	FolksPersona* _tmp0_;
	guint _tmp1_ = 0U;
	GQuark _tmp2_ = 0U;
	FolksPersona* _tmp3_;
	guint _tmp4_ = 0U;
	GQuark _tmp5_ = 0U;
	FolksPersona* _tmp6_;
	guint _tmp7_ = 0U;
	GQuark _tmp8_ = 0U;
	FolksPersona* _tmp9_;
	guint _tmp10_ = 0U;
	GQuark _tmp11_ = 0U;
	FolksPersona* _tmp12_;
	guint _tmp13_ = 0U;
	GQuark _tmp14_ = 0U;
	FolksPersona* _tmp15_;
	guint _tmp16_ = 0U;
	GQuark _tmp17_ = 0U;
	FolksPersona* _tmp18_;
	guint _tmp19_ = 0U;
	GQuark _tmp20_ = 0U;
	FolksPersona* _tmp21_;
	guint _tmp22_ = 0U;
	GQuark _tmp23_ = 0U;
	FolksPersona* _tmp24_;
	guint _tmp25_ = 0U;
	GQuark _tmp26_ = 0U;
	FolksPersona* _tmp27_;
	guint _tmp28_ = 0U;
	GQuark _tmp29_ = 0U;
	FolksPersona* _tmp30_;
	guint _tmp31_ = 0U;
	GQuark _tmp32_ = 0U;
	FolksPersona* _tmp33_;
	guint _tmp34_ = 0U;
	GQuark _tmp35_ = 0U;
	FolksPersona* _tmp36_;
	guint _tmp37_ = 0U;
	GQuark _tmp38_ = 0U;
	FolksPersona* _tmp39_;
	guint _tmp40_ = 0U;
	GQuark _tmp41_ = 0U;
	FolksPersona* _tmp42_;
	guint _tmp43_ = 0U;
	GQuark _tmp44_ = 0U;
	FolksPersona* _tmp45_;
	guint _tmp46_ = 0U;
	GQuark _tmp47_ = 0U;
	FolksPersona* _tmp48_;
	guint _tmp49_ = 0U;
	GQuark _tmp50_ = 0U;
	FolksPersona* _tmp51_;
	guint _tmp52_ = 0U;
	GQuark _tmp53_ = 0U;
	FolksPersona* _tmp54_;
	guint _tmp55_ = 0U;
	GQuark _tmp56_ = 0U;
	FolksPersona* _tmp57_;
	FolksPersona* _tmp60_;
	FolksInteractionDetails* _tmp61_;
	FolksInteractionDetails* p_interaction_details;
	FolksInteractionDetails* _tmp62_;
	FolksPersona* _tmp75_;
	FolksIndividual* _tmp76_;
	FolksIndividual* _tmp77_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (persona != NULL);
	_tmp0_ = persona;
	g_signal_parse_name ("notify::alias", G_TYPE_OBJECT, &_tmp1_, &_tmp2_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, _tmp2_, NULL, (GCallback) __folks_individual_notify_alias_cb_g_object_notify, self);
	_tmp3_ = persona;
	g_signal_parse_name ("notify::avatar", G_TYPE_OBJECT, &_tmp4_, &_tmp5_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, _tmp5_, NULL, (GCallback) __folks_individual_notify_avatar_cb_g_object_notify, self);
	_tmp6_ = persona;
	g_signal_parse_name ("notify::presence-message", G_TYPE_OBJECT, &_tmp7_, &_tmp8_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, _tmp8_, NULL, (GCallback) __folks_individual_notify_presence_cb_g_object_notify, self);
	_tmp9_ = persona;
	g_signal_parse_name ("notify::presence-type", G_TYPE_OBJECT, &_tmp10_, &_tmp11_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, _tmp11_, NULL, (GCallback) __folks_individual_notify_presence_cb_g_object_notify, self);
	_tmp12_ = persona;
	g_signal_parse_name ("notify::im-addresses", G_TYPE_OBJECT, &_tmp13_, &_tmp14_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, _tmp14_, NULL, (GCallback) __folks_individual_notify_im_addresses_cb_g_object_notify, self);
	_tmp15_ = persona;
	g_signal_parse_name ("notify::web-service-addresses", G_TYPE_OBJECT, &_tmp16_, &_tmp17_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, _tmp17_, NULL, (GCallback) __folks_individual_notify_web_service_addresses_cb_g_object_notify, self);
	_tmp18_ = persona;
	g_signal_parse_name ("notify::is-favourite", G_TYPE_OBJECT, &_tmp19_, &_tmp20_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp18_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, _tmp20_, NULL, (GCallback) __folks_individual_notify_is_favourite_cb_g_object_notify, self);
	_tmp21_ = persona;
	g_signal_parse_name ("notify::structured-name", G_TYPE_OBJECT, &_tmp22_, &_tmp23_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp21_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp22_, _tmp23_, NULL, (GCallback) __folks_individual_notify_structured_name_cb_g_object_notify, self);
	_tmp24_ = persona;
	g_signal_parse_name ("notify::full-name", G_TYPE_OBJECT, &_tmp25_, &_tmp26_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp24_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp25_, _tmp26_, NULL, (GCallback) __folks_individual_notify_full_name_cb_g_object_notify, self);
	_tmp27_ = persona;
	g_signal_parse_name ("notify::nickname", G_TYPE_OBJECT, &_tmp28_, &_tmp29_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp27_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp28_, _tmp29_, NULL, (GCallback) __folks_individual_notify_nickname_cb_g_object_notify, self);
	_tmp30_ = persona;
	g_signal_parse_name ("notify::gender", G_TYPE_OBJECT, &_tmp31_, &_tmp32_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp30_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp31_, _tmp32_, NULL, (GCallback) __folks_individual_notify_gender_cb_g_object_notify, self);
	_tmp33_ = persona;
	g_signal_parse_name ("notify::urls", G_TYPE_OBJECT, &_tmp34_, &_tmp35_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp33_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp34_, _tmp35_, NULL, (GCallback) __folks_individual_notify_urls_cb_g_object_notify, self);
	_tmp36_ = persona;
	g_signal_parse_name ("notify::phone-numbers", G_TYPE_OBJECT, &_tmp37_, &_tmp38_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp36_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp37_, _tmp38_, NULL, (GCallback) __folks_individual_notify_phone_numbers_cb_g_object_notify, self);
	_tmp39_ = persona;
	g_signal_parse_name ("notify::email-addresses", G_TYPE_OBJECT, &_tmp40_, &_tmp41_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp39_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp40_, _tmp41_, NULL, (GCallback) __folks_individual_notify_email_addresses_cb_g_object_notify, self);
	_tmp42_ = persona;
	g_signal_parse_name ("notify::roles", G_TYPE_OBJECT, &_tmp43_, &_tmp44_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp42_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp43_, _tmp44_, NULL, (GCallback) __folks_individual_notify_roles_cb_g_object_notify, self);
	_tmp45_ = persona;
	g_signal_parse_name ("notify::birthday", G_TYPE_OBJECT, &_tmp46_, &_tmp47_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp45_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp46_, _tmp47_, NULL, (GCallback) __folks_individual_notify_birthday_cb_g_object_notify, self);
	_tmp48_ = persona;
	g_signal_parse_name ("notify::notes", G_TYPE_OBJECT, &_tmp49_, &_tmp50_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp48_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp49_, _tmp50_, NULL, (GCallback) __folks_individual_notify_notes_cb_g_object_notify, self);
	_tmp51_ = persona;
	g_signal_parse_name ("notify::postal-addresses", G_TYPE_OBJECT, &_tmp52_, &_tmp53_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp51_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp52_, _tmp53_, NULL, (GCallback) __folks_individual_notify_postal_addresses_cb_g_object_notify, self);
	_tmp54_ = persona;
	g_signal_parse_name ("notify::local-ids", G_TYPE_OBJECT, &_tmp55_, &_tmp56_, TRUE);
	g_signal_handlers_disconnect_matched ((GObject*) _tmp54_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp55_, _tmp56_, NULL, (GCallback) __folks_individual_notify_local_ids_cb_g_object_notify, self);
	_tmp57_ = persona;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, FOLKS_TYPE_GROUP_DETAILS)) {
		FolksPersona* _tmp58_;
		guint _tmp59_ = 0U;
		_tmp58_ = persona;
		g_signal_parse_name ("group-changed", FOLKS_TYPE_GROUP_DETAILS, &_tmp59_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, FOLKS_TYPE_GROUP_DETAILS, FolksGroupDetails), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp59_, 0, NULL, (GCallback) __folks_individual_persona_group_changed_cb_folks_group_details_group_changed, self);
	}
	_tmp60_ = persona;
	_tmp61_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp60_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp60_) : NULL);
	p_interaction_details = _tmp61_;
	_tmp62_ = p_interaction_details;
	if (_tmp62_ != NULL) {
		FolksPersona* _tmp63_;
		guint _tmp64_ = 0U;
		GQuark _tmp65_ = 0U;
		FolksPersona* _tmp66_;
		guint _tmp67_ = 0U;
		GQuark _tmp68_ = 0U;
		FolksPersona* _tmp69_;
		guint _tmp70_ = 0U;
		GQuark _tmp71_ = 0U;
		FolksPersona* _tmp72_;
		guint _tmp73_ = 0U;
		GQuark _tmp74_ = 0U;
		_tmp63_ = persona;
		g_signal_parse_name ("notify::im-interaction-count", G_TYPE_OBJECT, &_tmp64_, &_tmp65_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) _tmp63_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp64_, _tmp65_, NULL, (GCallback) __folks_individual_notify_im_interaction_count_cb_g_object_notify, self);
		_tmp66_ = persona;
		g_signal_parse_name ("notify::call-interaction-count", G_TYPE_OBJECT, &_tmp67_, &_tmp68_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) _tmp66_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp67_, _tmp68_, NULL, (GCallback) __folks_individual_notify_call_interaction_count_cb_g_object_notify, self);
		_tmp69_ = persona;
		g_signal_parse_name ("notify::last-im-interaction-datetime", G_TYPE_OBJECT, &_tmp70_, &_tmp71_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) _tmp69_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp70_, _tmp71_, NULL, (GCallback) __folks_individual_notify_last_im_interaction_datetime_cb_g_object_notify, self);
		_tmp72_ = persona;
		g_signal_parse_name ("notify::last-call-interaction-datetime", G_TYPE_OBJECT, &_tmp73_, &_tmp74_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) _tmp72_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp73_, _tmp74_, NULL, (GCallback) __folks_individual_notify_last_call_interaction_datetime_cb_g_object_notify, self);
	}
	_tmp75_ = persona;
	_tmp76_ = folks_persona_get_individual (_tmp75_);
	_tmp77_ = _tmp76_;
	if (_tmp77_ == self) {
		gboolean _tmp78_ = FALSE;
		FolksIndividual* _tmp79_;
		gboolean _tmp85_;
		_tmp79_ = replacement_individual;
		if (_tmp79_ != NULL) {
			FolksIndividual* _tmp80_;
			GeeSet* _tmp81_;
			GeeSet* _tmp82_;
			FolksPersona* _tmp83_;
			gboolean _tmp84_ = FALSE;
			_tmp80_ = replacement_individual;
			_tmp81_ = folks_individual_get_personas (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
			_tmp82_ = _tmp81_;
			_tmp83_ = persona;
			_tmp84_ = gee_collection_contains ((GeeCollection*) _tmp82_, _tmp83_);
			_tmp78_ = _tmp84_;
		} else {
			_tmp78_ = FALSE;
		}
		_tmp85_ = _tmp78_;
		if (_tmp85_) {
			FolksPersona* _tmp86_;
			FolksIndividual* _tmp87_;
			_tmp86_ = persona;
			_tmp87_ = replacement_individual;
			folks_persona_set_individual (_tmp86_, _tmp87_);
		} else {
			FolksPersona* _tmp88_;
			_tmp88_ = persona;
			folks_persona_set_individual (_tmp88_, NULL);
		}
	}
	_g_object_unref0 (p_interaction_details);
}


static gboolean __lambda21_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	FolksGender _tmp1_;
	FolksGender _tmp2_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = folks_gender_details_get_gender (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails));
	_tmp2_ = _tmp1_;
	result = _tmp2_ != FOLKS_GENDER_UNSPECIFIED;
	return result;
}


static gboolean ___lambda21__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda21_ (self, persona);
	return result;
}


static gint __lambda22_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	result = 0;
	return result;
}


static gint ___lambda22__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda22_ (a, b);
	return result;
}


static void __lambda23_ (FolksIndividual* self, FolksPersona* p) {
	FolksGender new_gender;
	FolksPersona* _tmp0_;
	FolksGender _tmp4_;
	FolksGender _tmp5_;
	FolksGender _tmp6_;
	new_gender = FOLKS_GENDER_UNSPECIFIED;
	_tmp0_ = p;
	if (_tmp0_ != NULL) {
		FolksPersona* _tmp1_;
		FolksGender _tmp2_;
		FolksGender _tmp3_;
		_tmp1_ = p;
		_tmp2_ = folks_gender_details_get_gender (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails));
		_tmp3_ = _tmp2_;
		new_gender = _tmp3_;
	}
	_tmp4_ = new_gender;
	_tmp5_ = folks_gender_details_get_gender ((FolksGenderDetails*) self);
	_tmp6_ = _tmp5_;
	if (_tmp4_ != _tmp6_) {
		FolksGender _tmp7_;
		_tmp7_ = new_gender;
		self->priv->_gender = _tmp7_;
		g_object_notify ((GObject*) self, "gender");
	}
}


static void ___lambda23__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda23_ (self, chosen_persona);
}


static void _folks_individual_update_gender (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_GENDER_DETAILS, ___lambda21__folks_individual_property_filter, self, ___lambda22__gcompare_func, "gender", ___lambda23__folks_individual_single_valued_property_setter, self);
}


static void _folks_individual_update_urls (FolksIndividual* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* urls_set;
	GeeHashSet* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, NULL, NULL, FOLKS_TYPE_URL_FIELD_DETAILS, NULL, NULL, NULL, NULL, (GEqualFunc) folks_abstract_field_details_equal);
	urls_set = _tmp0_;
	_tmp1_ = self->priv->_urls;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp1_);
	{
		GeeHashSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _persona_it;
		_tmp2_ = self->priv->_persona_set;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_persona_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp8_;
			FolksUrlDetails* _tmp9_;
			FolksUrlDetails* url_details;
			FolksUrlDetails* _tmp10_;
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _persona_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			persona = (FolksPersona*) _tmp7_;
			_tmp8_ = persona;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _tmp8_) : NULL);
			url_details = _tmp9_;
			_tmp10_ = url_details;
			if (_tmp10_ != NULL) {
				{
					FolksUrlDetails* _tmp11_;
					GeeSet* _tmp12_;
					GeeSet* _tmp13_;
					GeeIterator* _tmp14_ = NULL;
					GeeIterator* _url_fd_it;
					_tmp11_ = url_details;
					_tmp12_ = folks_url_details_get_urls (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FOLKS_TYPE_URL_DETAILS, FolksUrlDetails));
					_tmp13_ = _tmp12_;
					_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
					_url_fd_it = _tmp14_;
					while (TRUE) {
						GeeIterator* _tmp15_;
						gboolean _tmp16_ = FALSE;
						GeeIterator* _tmp17_;
						gpointer _tmp18_ = NULL;
						FolksUrlFieldDetails* url_fd;
						GeeHashMap* _tmp19_;
						FolksUrlFieldDetails* _tmp20_;
						gconstpointer _tmp21_;
						const gchar* _tmp22_;
						gpointer _tmp23_ = NULL;
						FolksUrlFieldDetails* _tmp24_;
						FolksUrlFieldDetails* existing;
						FolksUrlFieldDetails* _tmp25_;
						_tmp15_ = _url_fd_it;
						_tmp16_ = gee_iterator_next (_tmp15_);
						if (!_tmp16_) {
							break;
						}
						_tmp17_ = _url_fd_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						url_fd = (FolksUrlFieldDetails*) _tmp18_;
						_tmp19_ = urls_set;
						_tmp20_ = url_fd;
						_tmp21_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, (const gchar*) _tmp22_);
						_tmp24_ = _g_object_ref0 ((FolksUrlFieldDetails*) _tmp23_);
						existing = _tmp24_;
						_tmp25_ = existing;
						if (_tmp25_ != NULL) {
							FolksUrlFieldDetails* _tmp26_;
							FolksUrlFieldDetails* _tmp27_;
							GeeMultiMap* _tmp28_;
							GeeMultiMap* _tmp29_;
							_tmp26_ = existing;
							_tmp27_ = url_fd;
							_tmp28_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp27_);
							_tmp29_ = _tmp28_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp26_, _tmp29_);
						} else {
							FolksUrlFieldDetails* _tmp30_;
							gconstpointer _tmp31_;
							const gchar* _tmp32_;
							FolksUrlFieldDetails* _tmp33_;
							FolksUrlFieldDetails* new_url_fd;
							FolksUrlFieldDetails* _tmp34_;
							FolksUrlFieldDetails* _tmp35_;
							GeeMultiMap* _tmp36_;
							GeeMultiMap* _tmp37_;
							GeeHashMap* _tmp38_;
							FolksUrlFieldDetails* _tmp39_;
							gconstpointer _tmp40_;
							const gchar* _tmp41_;
							FolksUrlFieldDetails* _tmp42_;
							GeeHashSet* _tmp43_;
							FolksUrlFieldDetails* _tmp44_;
							_tmp30_ = url_fd;
							_tmp31_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp30_);
							_tmp32_ = _tmp31_;
							_tmp33_ = folks_url_field_details_new ((const gchar*) _tmp32_, NULL);
							new_url_fd = _tmp33_;
							_tmp34_ = new_url_fd;
							_tmp35_ = url_fd;
							_tmp36_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp35_);
							_tmp37_ = _tmp36_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp34_, _tmp37_);
							_tmp38_ = urls_set;
							_tmp39_ = url_fd;
							_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
							_tmp41_ = _tmp40_;
							_tmp42_ = new_url_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp38_, (const gchar*) _tmp41_, _tmp42_);
							_tmp43_ = self->priv->_urls;
							_tmp44_ = new_url_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
							_g_object_unref0 (new_url_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (url_fd);
					}
					_g_object_unref0 (_url_fd_it);
				}
			}
			_g_object_unref0 (url_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "urls");
	_g_object_unref0 (urls_set);
}


static void _folks_individual_update_phone_numbers (FolksIndividual* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* phone_numbers_set;
	GeeHashSet* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, NULL, NULL, FOLKS_TYPE_PHONE_FIELD_DETAILS, NULL, NULL, NULL, NULL, (GEqualFunc) folks_abstract_field_details_equal);
	phone_numbers_set = _tmp0_;
	_tmp1_ = self->priv->_phone_numbers;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp1_);
	{
		GeeHashSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _persona_it;
		_tmp2_ = self->priv->_persona_set;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_persona_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp8_;
			FolksPhoneDetails* _tmp9_;
			FolksPhoneDetails* phone_details;
			FolksPhoneDetails* _tmp10_;
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _persona_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			persona = (FolksPersona*) _tmp7_;
			_tmp8_ = persona;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _tmp8_) : NULL);
			phone_details = _tmp9_;
			_tmp10_ = phone_details;
			if (_tmp10_ != NULL) {
				{
					FolksPhoneDetails* _tmp11_;
					GeeSet* _tmp12_;
					GeeSet* _tmp13_;
					GeeIterator* _tmp14_ = NULL;
					GeeIterator* _phone_fd_it;
					_tmp11_ = phone_details;
					_tmp12_ = folks_phone_details_get_phone_numbers (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FOLKS_TYPE_PHONE_DETAILS, FolksPhoneDetails));
					_tmp13_ = _tmp12_;
					_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
					_phone_fd_it = _tmp14_;
					while (TRUE) {
						GeeIterator* _tmp15_;
						gboolean _tmp16_ = FALSE;
						GeeIterator* _tmp17_;
						gpointer _tmp18_ = NULL;
						FolksPhoneFieldDetails* phone_fd;
						GeeHashMap* _tmp19_;
						FolksPhoneFieldDetails* _tmp20_;
						gconstpointer _tmp21_;
						const gchar* _tmp22_;
						gpointer _tmp23_ = NULL;
						FolksPhoneFieldDetails* _tmp24_;
						FolksPhoneFieldDetails* existing;
						FolksPhoneFieldDetails* _tmp25_;
						_tmp15_ = _phone_fd_it;
						_tmp16_ = gee_iterator_next (_tmp15_);
						if (!_tmp16_) {
							break;
						}
						_tmp17_ = _phone_fd_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						phone_fd = (FolksPhoneFieldDetails*) _tmp18_;
						_tmp19_ = phone_numbers_set;
						_tmp20_ = phone_fd;
						_tmp21_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, (const gchar*) _tmp22_);
						_tmp24_ = _g_object_ref0 ((FolksPhoneFieldDetails*) _tmp23_);
						existing = _tmp24_;
						_tmp25_ = existing;
						if (_tmp25_ != NULL) {
							FolksPhoneFieldDetails* _tmp26_;
							FolksPhoneFieldDetails* _tmp27_;
							GeeMultiMap* _tmp28_;
							GeeMultiMap* _tmp29_;
							_tmp26_ = existing;
							_tmp27_ = phone_fd;
							_tmp28_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp27_);
							_tmp29_ = _tmp28_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp26_, _tmp29_);
						} else {
							FolksPhoneFieldDetails* _tmp30_;
							gconstpointer _tmp31_;
							const gchar* _tmp32_;
							FolksPhoneFieldDetails* _tmp33_;
							FolksPhoneFieldDetails* new_fd;
							FolksPhoneFieldDetails* _tmp34_;
							FolksPhoneFieldDetails* _tmp35_;
							GeeMultiMap* _tmp36_;
							GeeMultiMap* _tmp37_;
							GeeHashMap* _tmp38_;
							FolksPhoneFieldDetails* _tmp39_;
							gconstpointer _tmp40_;
							const gchar* _tmp41_;
							FolksPhoneFieldDetails* _tmp42_;
							GeeHashSet* _tmp43_;
							FolksPhoneFieldDetails* _tmp44_;
							_tmp30_ = phone_fd;
							_tmp31_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp30_);
							_tmp32_ = _tmp31_;
							_tmp33_ = folks_phone_field_details_new ((const gchar*) _tmp32_, NULL);
							new_fd = _tmp33_;
							_tmp34_ = new_fd;
							_tmp35_ = phone_fd;
							_tmp36_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp35_);
							_tmp37_ = _tmp36_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp34_, _tmp37_);
							_tmp38_ = phone_numbers_set;
							_tmp39_ = phone_fd;
							_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
							_tmp41_ = _tmp40_;
							_tmp42_ = new_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp38_, (const gchar*) _tmp41_, _tmp42_);
							_tmp43_ = self->priv->_phone_numbers;
							_tmp44_ = new_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp43_, _tmp44_);
							_g_object_unref0 (new_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (phone_fd);
					}
					_g_object_unref0 (_phone_fd_it);
				}
			}
			_g_object_unref0 (phone_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "phone-numbers");
	_g_object_unref0 (phone_numbers_set);
}


static void _folks_individual_update_email_addresses (FolksIndividual* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* emails_set;
	GeeHashSet* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, NULL, NULL, FOLKS_TYPE_EMAIL_FIELD_DETAILS, NULL, NULL, NULL, NULL, (GEqualFunc) folks_abstract_field_details_equal);
	emails_set = _tmp0_;
	_tmp1_ = self->priv->_email_addresses;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp1_);
	{
		GeeHashSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _persona_it;
		_tmp2_ = self->priv->_persona_set;
		_tmp3_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp2_);
		_persona_it = _tmp3_;
		while (TRUE) {
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp8_;
			FolksEmailDetails* _tmp9_;
			FolksEmailDetails* email_details;
			FolksEmailDetails* _tmp10_;
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_next (_tmp4_);
			if (!_tmp5_) {
				break;
			}
			_tmp6_ = _persona_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			persona = (FolksPersona*) _tmp7_;
			_tmp8_ = persona;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _tmp8_) : NULL);
			email_details = _tmp9_;
			_tmp10_ = email_details;
			if (_tmp10_ != NULL) {
				{
					FolksEmailDetails* _tmp11_;
					GeeSet* _tmp12_;
					GeeSet* _tmp13_;
					GeeIterator* _tmp14_ = NULL;
					GeeIterator* _email_fd_it;
					_tmp11_ = email_details;
					_tmp12_ = folks_email_details_get_email_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FOLKS_TYPE_EMAIL_DETAILS, FolksEmailDetails));
					_tmp13_ = _tmp12_;
					_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
					_email_fd_it = _tmp14_;
					while (TRUE) {
						GeeIterator* _tmp15_;
						gboolean _tmp16_ = FALSE;
						GeeIterator* _tmp17_;
						gpointer _tmp18_ = NULL;
						FolksEmailFieldDetails* email_fd;
						GeeHashMap* _tmp19_;
						FolksEmailFieldDetails* _tmp20_;
						gconstpointer _tmp21_;
						const gchar* _tmp22_;
						gpointer _tmp23_ = NULL;
						FolksEmailFieldDetails* _tmp24_;
						FolksEmailFieldDetails* existing;
						FolksEmailFieldDetails* _tmp25_;
						_tmp15_ = _email_fd_it;
						_tmp16_ = gee_iterator_next (_tmp15_);
						if (!_tmp16_) {
							break;
						}
						_tmp17_ = _email_fd_it;
						_tmp18_ = gee_iterator_get (_tmp17_);
						email_fd = (FolksEmailFieldDetails*) _tmp18_;
						_tmp19_ = emails_set;
						_tmp20_ = email_fd;
						_tmp21_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, (const gchar*) _tmp22_);
						_tmp24_ = _g_object_ref0 ((FolksEmailFieldDetails*) _tmp23_);
						existing = _tmp24_;
						_tmp25_ = existing;
						if (_tmp25_ != NULL) {
							FolksEmailFieldDetails* _tmp26_;
							FolksEmailFieldDetails* _tmp27_;
							GeeMultiMap* _tmp28_;
							GeeMultiMap* _tmp29_;
							_tmp26_ = existing;
							_tmp27_ = email_fd;
							_tmp28_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp27_);
							_tmp29_ = _tmp28_;
							folks_abstract_field_details_extend_parameters ((FolksAbstractFieldDetails*) _tmp26_, _tmp29_);
						} else {
							FolksEmailFieldDetails* _tmp30_;
							gconstpointer _tmp31_;
							const gchar* _tmp32_;
							FolksEmailFieldDetails* _tmp33_;
							GeeMultiMap* _tmp34_;
							GeeMultiMap* _tmp35_;
							FolksEmailFieldDetails* _tmp36_;
							FolksEmailFieldDetails* new_email_fd;
							GeeHashMap* _tmp37_;
							FolksEmailFieldDetails* _tmp38_;
							gconstpointer _tmp39_;
							const gchar* _tmp40_;
							FolksEmailFieldDetails* _tmp41_;
							GeeHashSet* _tmp42_;
							FolksEmailFieldDetails* _tmp43_;
							_tmp30_ = email_fd;
							_tmp31_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp30_);
							_tmp32_ = _tmp31_;
							_tmp33_ = email_fd;
							_tmp34_ = folks_abstract_field_details_get_parameters ((FolksAbstractFieldDetails*) _tmp33_);
							_tmp35_ = _tmp34_;
							_tmp36_ = folks_email_field_details_new ((const gchar*) _tmp32_, _tmp35_);
							new_email_fd = _tmp36_;
							_tmp37_ = emails_set;
							_tmp38_ = email_fd;
							_tmp39_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp38_);
							_tmp40_ = _tmp39_;
							_tmp41_ = new_email_fd;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp37_, (const gchar*) _tmp40_, _tmp41_);
							_tmp42_ = self->priv->_email_addresses;
							_tmp43_ = new_email_fd;
							gee_abstract_collection_add ((GeeAbstractCollection*) _tmp42_, _tmp43_);
							_g_object_unref0 (new_email_fd);
						}
						_g_object_unref0 (existing);
						_g_object_unref0 (email_fd);
					}
					_g_object_unref0 (_email_fd_it);
				}
			}
			_g_object_unref0 (email_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "email-addresses");
	_g_object_unref0 (emails_set);
}


static void _folks_individual_update_roles (FolksIndividual* self) {
	GeeHashSet* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_roles;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			FolksRoleDetails* _tmp8_;
			FolksRoleDetails* role_details;
			FolksRoleDetails* _tmp9_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_ROLE_DETAILS) ? ((FolksRoleDetails*) _tmp7_) : NULL);
			role_details = _tmp8_;
			_tmp9_ = role_details;
			if (_tmp9_ != NULL) {
				{
					FolksRoleDetails* _tmp10_;
					GeeSet* _tmp11_;
					GeeSet* _tmp12_;
					GeeIterator* _tmp13_ = NULL;
					GeeIterator* _role_fd_it;
					_tmp10_ = role_details;
					_tmp11_ = folks_role_details_get_roles (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FOLKS_TYPE_ROLE_DETAILS, FolksRoleDetails));
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
					_role_fd_it = _tmp13_;
					while (TRUE) {
						GeeIterator* _tmp14_;
						gboolean _tmp15_ = FALSE;
						GeeIterator* _tmp16_;
						gpointer _tmp17_ = NULL;
						FolksRoleFieldDetails* role_fd;
						GeeHashSet* _tmp18_;
						FolksRoleFieldDetails* _tmp19_;
						_tmp14_ = _role_fd_it;
						_tmp15_ = gee_iterator_next (_tmp14_);
						if (!_tmp15_) {
							break;
						}
						_tmp16_ = _role_fd_it;
						_tmp17_ = gee_iterator_get (_tmp16_);
						role_fd = (FolksRoleFieldDetails*) _tmp17_;
						_tmp18_ = self->priv->_roles;
						_tmp19_ = role_fd;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
						_g_object_unref0 (role_fd);
					}
					_g_object_unref0 (_role_fd_it);
				}
			}
			_g_object_unref0 (role_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "roles");
}


static void _folks_individual_update_local_ids (FolksIndividual* self) {
	GeeHashSet* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_local_ids;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			FolksLocalIdDetails* _tmp8_;
			FolksLocalIdDetails* local_ids_details;
			FolksLocalIdDetails* _tmp9_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_LOCAL_ID_DETAILS) ? ((FolksLocalIdDetails*) _tmp7_) : NULL);
			local_ids_details = _tmp8_;
			_tmp9_ = local_ids_details;
			if (_tmp9_ != NULL) {
				{
					FolksLocalIdDetails* _tmp10_;
					GeeSet* _tmp11_;
					GeeSet* _tmp12_;
					GeeIterator* _tmp13_ = NULL;
					GeeIterator* _id_it;
					_tmp10_ = local_ids_details;
					_tmp11_ = folks_local_id_details_get_local_ids (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FOLKS_TYPE_LOCAL_ID_DETAILS, FolksLocalIdDetails));
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
					_id_it = _tmp13_;
					while (TRUE) {
						GeeIterator* _tmp14_;
						gboolean _tmp15_ = FALSE;
						GeeIterator* _tmp16_;
						gpointer _tmp17_ = NULL;
						gchar* id;
						GeeHashSet* _tmp18_;
						const gchar* _tmp19_;
						_tmp14_ = _id_it;
						_tmp15_ = gee_iterator_next (_tmp14_);
						if (!_tmp15_) {
							break;
						}
						_tmp16_ = _id_it;
						_tmp17_ = gee_iterator_get (_tmp16_);
						id = (gchar*) _tmp17_;
						_tmp18_ = self->priv->_local_ids;
						_tmp19_ = id;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
						_g_free0 (id);
					}
					_g_object_unref0 (_id_it);
				}
			}
			_g_object_unref0 (local_ids_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "local-ids");
}


static void _folks_individual_update_postal_addresses (FolksIndividual* self) {
	GeeHashSet* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_postal_addresses;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			FolksPostalAddressDetails* _tmp8_;
			FolksPostalAddressDetails* address_details;
			FolksPostalAddressDetails* _tmp9_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS) ? ((FolksPostalAddressDetails*) _tmp7_) : NULL);
			address_details = _tmp8_;
			_tmp9_ = address_details;
			if (_tmp9_ != NULL) {
				{
					FolksPostalAddressDetails* _tmp10_;
					GeeSet* _tmp11_;
					GeeSet* _tmp12_;
					GeeIterator* _tmp13_ = NULL;
					GeeIterator* _pafd_it;
					_tmp10_ = address_details;
					_tmp11_ = folks_postal_address_details_get_postal_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetails));
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
					_pafd_it = _tmp13_;
					while (TRUE) {
						GeeIterator* _tmp14_;
						gboolean _tmp15_ = FALSE;
						GeeIterator* _tmp16_;
						gpointer _tmp17_ = NULL;
						FolksPostalAddressFieldDetails* pafd;
						GeeHashSet* _tmp18_;
						FolksPostalAddressFieldDetails* _tmp19_;
						_tmp14_ = _pafd_it;
						_tmp15_ = gee_iterator_next (_tmp14_);
						if (!_tmp15_) {
							break;
						}
						_tmp16_ = _pafd_it;
						_tmp17_ = gee_iterator_get (_tmp16_);
						pafd = (FolksPostalAddressFieldDetails*) _tmp17_;
						_tmp18_ = self->priv->_postal_addresses;
						_tmp19_ = pafd;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
						_g_object_unref0 (pafd);
					}
					_g_object_unref0 (_pafd_it);
				}
			}
			_g_object_unref0 (address_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "postal-addresses");
}


static gboolean __lambda24_ (FolksIndividual* self, FolksPersona* p) {
	gboolean result = FALSE;
	FolksPersona* _tmp0_;
	FolksBirthdayDetails* _tmp1_;
	FolksBirthdayDetails* details;
	gboolean _tmp2_ = FALSE;
	FolksBirthdayDetails* _tmp3_;
	GDateTime* _tmp4_;
	GDateTime* _tmp5_;
	gboolean _tmp9_;
	g_return_val_if_fail (p != NULL, FALSE);
	_tmp0_ = p;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	details = _tmp1_;
	_tmp3_ = details;
	_tmp4_ = folks_birthday_details_get_birthday (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ != NULL) {
		FolksBirthdayDetails* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = details;
		_tmp7_ = folks_birthday_details_get_calendar_event_id (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	_tmp9_ = _tmp2_;
	result = _tmp9_;
	_g_object_unref0 (details);
	return result;
}


static gboolean ___lambda24__folks_individual_property_filter (FolksPersona* persona, gpointer self) {
	gboolean result;
	result = __lambda24_ (self, persona);
	return result;
}


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


static gint __lambda25_ (FolksPersona* a, FolksPersona* b) {
	gint result = 0;
	FolksPersona* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	GDateTime* a_birthday;
	FolksPersona* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	GDateTime* b_birthday;
	FolksPersona* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* a_event_id;
	FolksPersona* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* b_event_id;
	gint _tmp16_ = 0;
	GDateTime* _tmp17_;
	gint _tmp18_;
	gint a_birthday_is_set;
	gint _tmp19_ = 0;
	GDateTime* _tmp20_;
	gint _tmp21_;
	gint b_birthday_is_set;
	gint _tmp22_ = 0;
	const gchar* _tmp23_;
	gint _tmp24_;
	gint a_event_id_is_set;
	gint _tmp25_ = 0;
	const gchar* _tmp26_;
	gint _tmp27_;
	gint b_event_id_is_set;
	gint _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = a;
	_tmp1_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_date_time_ref0 (_tmp2_);
	a_birthday = _tmp3_;
	_tmp4_ = b;
	_tmp5_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_date_time_ref0 (_tmp6_);
	b_birthday = _tmp7_;
	_tmp8_ = a;
	_tmp9_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup (_tmp10_);
	a_event_id = _tmp11_;
	_tmp12_ = b;
	_tmp13_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup (_tmp14_);
	b_event_id = _tmp15_;
	_tmp17_ = a_birthday;
	if (_tmp17_ != NULL) {
		_tmp16_ = 1;
	} else {
		_tmp16_ = 0;
	}
	_tmp18_ = _tmp16_;
	a_birthday_is_set = _tmp18_;
	_tmp20_ = b_birthday;
	if (_tmp20_ != NULL) {
		_tmp19_ = 1;
	} else {
		_tmp19_ = 0;
	}
	_tmp21_ = _tmp19_;
	b_birthday_is_set = _tmp21_;
	_tmp23_ = a_event_id;
	if (_tmp23_ != NULL) {
		_tmp22_ = 1;
	} else {
		_tmp22_ = 0;
	}
	_tmp24_ = _tmp22_;
	a_event_id_is_set = _tmp24_;
	_tmp26_ = b_event_id;
	if (_tmp26_ != NULL) {
		_tmp25_ = 1;
	} else {
		_tmp25_ = 0;
	}
	_tmp27_ = _tmp25_;
	b_event_id_is_set = _tmp27_;
	_tmp28_ = a_birthday_is_set;
	_tmp29_ = a_event_id_is_set;
	_tmp30_ = b_birthday_is_set;
	result = (_tmp28_ + _tmp29_) - (_tmp30_ + b_event_id_is_set);
	_g_free0 (b_event_id);
	_g_free0 (a_event_id);
	_g_date_time_unref0 (b_birthday);
	_g_date_time_unref0 (a_birthday);
	return result;
}


static gint ___lambda25__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda25_ (a, b);
	return result;
}


static void __lambda26_ (FolksIndividual* self, FolksPersona* p) {
	GDateTime* bday;
	const gchar* calendar_event_id;
	FolksPersona* _tmp0_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	GDateTime* _tmp10_;
	gboolean _tmp12_;
	gboolean _tmp22_;
	gboolean _tmp25_;
	bday = NULL;
	calendar_event_id = NULL;
	_tmp0_ = p;
	if (_tmp0_ != NULL) {
		FolksPersona* _tmp1_;
		GDateTime* _tmp2_;
		GDateTime* _tmp3_;
		FolksPersona* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp1_ = p;
		_tmp2_ = folks_birthday_details_get_birthday (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
		_tmp3_ = _tmp2_;
		bday = _tmp3_;
		_tmp4_ = p;
		_tmp5_ = folks_birthday_details_get_calendar_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, FOLKS_TYPE_BIRTHDAY_DETAILS, FolksBirthdayDetails));
		_tmp6_ = _tmp5_;
		calendar_event_id = _tmp6_;
	}
	_tmp10_ = self->priv->_birthday;
	if (_tmp10_ == NULL) {
		GDateTime* _tmp11_;
		_tmp11_ = bday;
		_tmp9_ = _tmp11_ != NULL;
	} else {
		_tmp9_ = FALSE;
	}
	_tmp12_ = _tmp9_;
	if (_tmp12_) {
		_tmp8_ = TRUE;
	} else {
		gboolean _tmp13_ = FALSE;
		GDateTime* _tmp14_;
		gboolean _tmp21_;
		_tmp14_ = self->priv->_birthday;
		if (_tmp14_ != NULL) {
			gboolean _tmp15_ = FALSE;
			GDateTime* _tmp16_;
			gboolean _tmp20_;
			_tmp16_ = bday;
			if (_tmp16_ == NULL) {
				_tmp15_ = TRUE;
			} else {
				GDateTime* _tmp17_;
				GDateTime* _tmp18_;
				gboolean _tmp19_ = FALSE;
				_tmp17_ = self->priv->_birthday;
				_tmp18_ = bday;
				_tmp19_ = g_date_time_equal ((GDateTime*) _tmp17_, (GDateTime*) _tmp18_);
				_tmp15_ = !_tmp19_;
			}
			_tmp20_ = _tmp15_;
			_tmp13_ = _tmp20_;
		} else {
			_tmp13_ = FALSE;
		}
		_tmp21_ = _tmp13_;
		_tmp8_ = _tmp21_;
	}
	_tmp22_ = _tmp8_;
	if (_tmp22_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		_tmp23_ = self->priv->_calendar_event_id;
		_tmp24_ = calendar_event_id;
		_tmp7_ = g_strcmp0 (_tmp23_, _tmp24_) != 0;
	}
	_tmp25_ = _tmp7_;
	if (_tmp25_) {
		GDateTime* _tmp26_;
		GDateTime* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		_tmp26_ = bday;
		_tmp27_ = _g_date_time_ref0 (_tmp26_);
		_g_date_time_unref0 (self->priv->_birthday);
		self->priv->_birthday = _tmp27_;
		_tmp28_ = calendar_event_id;
		_tmp29_ = g_strdup (_tmp28_);
		_g_free0 (self->priv->_calendar_event_id);
		self->priv->_calendar_event_id = _tmp29_;
		g_object_freeze_notify ((GObject*) self);
		g_object_notify ((GObject*) self, "birthday");
		g_object_notify ((GObject*) self, "calendar-event-id");
		g_object_thaw_notify ((GObject*) self);
	}
}


static void ___lambda26__folks_individual_single_valued_property_setter (FolksPersona* chosen_persona, gpointer self) {
	__lambda26_ (self, chosen_persona);
}


static void _folks_individual_update_birthday (FolksIndividual* self) {
	g_return_if_fail (self != NULL);
	_folks_individual_update_single_valued_property (self, FOLKS_TYPE_BIRTHDAY_DETAILS, ___lambda24__folks_individual_property_filter, self, ___lambda25__gcompare_func, "birthday", ___lambda26__folks_individual_single_valued_property_setter, self);
}


static void _folks_individual_update_notes (FolksIndividual* self) {
	GeeHashSet* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_notes;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	{
		GeeHashSet* _tmp1_;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _persona_it;
		_tmp1_ = self->priv->_persona_set;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
		_persona_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gboolean _tmp4_ = FALSE;
			GeeIterator* _tmp5_;
			gpointer _tmp6_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp7_;
			FolksNoteDetails* _tmp8_;
			FolksNoteDetails* note_details;
			FolksNoteDetails* _tmp9_;
			_tmp3_ = _persona_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _persona_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			persona = (FolksPersona*) _tmp6_;
			_tmp7_ = persona;
			_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _tmp7_) : NULL);
			note_details = _tmp8_;
			_tmp9_ = note_details;
			if (_tmp9_ != NULL) {
				{
					FolksNoteDetails* _tmp10_;
					GeeSet* _tmp11_;
					GeeSet* _tmp12_;
					GeeIterator* _tmp13_ = NULL;
					GeeIterator* _n_it;
					_tmp10_ = note_details;
					_tmp11_ = folks_note_details_get_notes (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetails));
					_tmp12_ = _tmp11_;
					_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
					_n_it = _tmp13_;
					while (TRUE) {
						GeeIterator* _tmp14_;
						gboolean _tmp15_ = FALSE;
						GeeIterator* _tmp16_;
						gpointer _tmp17_ = NULL;
						FolksNoteFieldDetails* n;
						GeeHashSet* _tmp18_;
						FolksNoteFieldDetails* _tmp19_;
						_tmp14_ = _n_it;
						_tmp15_ = gee_iterator_next (_tmp14_);
						if (!_tmp15_) {
							break;
						}
						_tmp16_ = _n_it;
						_tmp17_ = gee_iterator_get (_tmp16_);
						n = (FolksNoteFieldDetails*) _tmp17_;
						_tmp18_ = self->priv->_notes;
						_tmp19_ = n;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
						_g_object_unref0 (n);
					}
					_g_object_unref0 (_n_it);
				}
			}
			_g_object_unref0 (note_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	g_object_notify ((GObject*) self, "notes");
}


static void __folks_individual_store_removed_cb_folks_persona_store_removed (FolksPersonaStore* _sender, gpointer self) {
	_folks_individual_store_removed_cb (self, _sender);
}


static void __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed (FolksPersonaStore* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_folks_individual_store_personas_changed_cb (self, _sender, added, removed, message, actor, reason);
}


static void _folks_individual_set_personas (FolksIndividual* self, GeeSet* personas, FolksIndividual* replacement_individual) {
	gboolean _tmp0_ = FALSE;
	FolksIndividual* _tmp1_;
	gboolean _tmp3_;
	GeeHashSet* _tmp4_;
	GeeHashSet* added;
	GeeHashSet* _tmp5_;
	GeeHashSet* removed;
	GeeSet* _tmp6_;
	GeeHashSet* _tmp85_;
	GeeHashSet* _tmp86_;
	gboolean _tmp87_ = FALSE;
	guint _tmp88_;
	gboolean _tmp89_;
	gboolean new_is_user;
	gboolean _tmp90_;
	gboolean _tmp91_;
	GeeHashSet* _tmp93_;
	gint _tmp94_;
	gint _tmp95_;
	GeeHashSet* _tmp97_;
	gint _tmp98_;
	gint _tmp99_;
	g_return_if_fail (self != NULL);
	_tmp1_ = replacement_individual;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		FolksIndividual* _tmp2_;
		_tmp2_ = replacement_individual;
		_tmp0_ = _tmp2_ != self;
	}
	_tmp3_ = _tmp0_;
	_vala_assert (_tmp3_, "replacement_individual == null || replacement_individual != this");
	_tmp4_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
	added = _tmp4_;
	_tmp5_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
	removed = _tmp5_;
	_tmp6_ = personas;
	if (_tmp6_ != NULL) {
		{
			GeeSet* _tmp7_;
			GeeIterator* _tmp8_ = NULL;
			GeeIterator* _p_it;
			_tmp7_ = personas;
			_tmp8_ = gee_iterable_iterator ((GeeIterable*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_SET, GeeSet));
			_p_it = _tmp8_;
			while (TRUE) {
				GeeIterator* _tmp9_;
				gboolean _tmp10_ = FALSE;
				GeeIterator* _tmp11_;
				gpointer _tmp12_ = NULL;
				FolksPersona* p;
				GeeHashSet* _tmp13_;
				FolksPersona* _tmp14_;
				gboolean _tmp15_ = FALSE;
				_tmp9_ = _p_it;
				_tmp10_ = gee_iterator_next (_tmp9_);
				if (!_tmp10_) {
					break;
				}
				_tmp11_ = _p_it;
				_tmp12_ = gee_iterator_get (_tmp11_);
				p = (FolksPersona*) _tmp12_;
				_tmp13_ = self->priv->_persona_set;
				_tmp14_ = p;
				_tmp15_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp13_, _tmp14_);
				if (!_tmp15_) {
					FolksPersona* _tmp16_;
					gboolean _tmp17_;
					gboolean _tmp18_;
					GeeHashSet* _tmp20_;
					FolksPersona* _tmp21_;
					GeeHashSet* _tmp22_;
					FolksPersona* _tmp23_;
					FolksPersona* _tmp24_;
					FolksPersona* _tmp25_;
					FolksPersonaStore* _tmp26_;
					FolksPersonaStore* _tmp27_;
					FolksPersonaStore* _tmp28_;
					FolksPersonaStore* store;
					GeeHashMap* _tmp29_;
					FolksPersonaStore* _tmp30_;
					gpointer _tmp31_ = NULL;
					guint num_from_store;
					guint _tmp32_;
					_tmp16_ = p;
					_tmp17_ = folks_persona_get_is_user (_tmp16_);
					_tmp18_ = _tmp17_;
					if (_tmp18_) {
						guint _tmp19_;
						_tmp19_ = self->priv->_persona_user_count;
						self->priv->_persona_user_count = _tmp19_ + 1;
					}
					_tmp20_ = added;
					_tmp21_ = p;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp20_, _tmp21_);
					_tmp22_ = self->priv->_persona_set;
					_tmp23_ = p;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
					_tmp24_ = p;
					_folks_individual_connect_to_persona (self, _tmp24_);
					_tmp25_ = p;
					_tmp26_ = folks_persona_get_store (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp28_ = _g_object_ref0 (_tmp27_);
					store = _tmp28_;
					_tmp29_ = self->priv->_stores;
					_tmp30_ = store;
					_tmp31_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp29_, _tmp30_);
					num_from_store = GPOINTER_TO_UINT (_tmp31_);
					_tmp32_ = num_from_store;
					if (_tmp32_ == ((guint) 0)) {
						GeeHashMap* _tmp33_;
						FolksPersonaStore* _tmp34_;
						guint _tmp35_;
						_tmp33_ = self->priv->_stores;
						_tmp34_ = store;
						_tmp35_ = num_from_store;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp33_, _tmp34_, GUINT_TO_POINTER (_tmp35_ + 1));
					} else {
						GeeHashMap* _tmp36_;
						FolksPersonaStore* _tmp37_;
						FolksPersonaStore* _tmp38_;
						FolksPersonaStore* _tmp39_;
						_tmp36_ = self->priv->_stores;
						_tmp37_ = store;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp36_, _tmp37_, GUINT_TO_POINTER ((guint) 1));
						_tmp38_ = store;
						g_signal_connect_object (_tmp38_, "removed", (GCallback) __folks_individual_store_removed_cb_folks_persona_store_removed, self, 0);
						_tmp39_ = store;
						g_signal_connect_object (_tmp39_, "personas-changed", (GCallback) __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed, self, 0);
					}
					_g_object_unref0 (store);
				}
				_g_object_unref0 (p);
			}
			_g_object_unref0 (_p_it);
		}
	}
	{
		GeeHashSet* _tmp40_;
		GeeIterator* _tmp41_ = NULL;
		GeeIterator* _p_it;
		_tmp40_ = self->priv->_persona_set;
		_tmp41_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp40_);
		_p_it = _tmp41_;
		while (TRUE) {
			GeeIterator* _tmp42_;
			gboolean _tmp43_ = FALSE;
			GeeIterator* _tmp44_;
			gpointer _tmp45_ = NULL;
			FolksPersona* p;
			gboolean _tmp46_ = FALSE;
			GeeSet* _tmp47_;
			gboolean _tmp51_;
			_tmp42_ = _p_it;
			_tmp43_ = gee_iterator_next (_tmp42_);
			if (!_tmp43_) {
				break;
			}
			_tmp44_ = _p_it;
			_tmp45_ = gee_iterator_get (_tmp44_);
			p = (FolksPersona*) _tmp45_;
			_tmp47_ = personas;
			if (_tmp47_ == NULL) {
				_tmp46_ = TRUE;
			} else {
				GeeSet* _tmp48_;
				FolksPersona* _tmp49_;
				gboolean _tmp50_ = FALSE;
				_tmp48_ = personas;
				_tmp49_ = p;
				_tmp50_ = gee_collection_contains ((GeeCollection*) G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GEE_TYPE_SET, GeeSet), _tmp49_);
				_tmp46_ = !_tmp50_;
			}
			_tmp51_ = _tmp46_;
			if (_tmp51_) {
				FolksPersona* _tmp52_;
				gboolean _tmp53_;
				gboolean _tmp54_;
				GeeHashSet* _tmp56_;
				FolksPersona* _tmp57_;
				FolksPersona* _tmp58_;
				FolksPersonaStore* _tmp59_;
				FolksPersonaStore* _tmp60_;
				FolksPersonaStore* _tmp61_;
				FolksPersonaStore* store;
				GeeHashMap* _tmp62_;
				FolksPersonaStore* _tmp63_;
				gpointer _tmp64_ = NULL;
				guint num_from_store;
				guint _tmp65_;
				FolksPersona* _tmp75_;
				FolksIndividual* _tmp76_;
				_tmp52_ = p;
				_tmp53_ = folks_persona_get_is_user (_tmp52_);
				_tmp54_ = _tmp53_;
				if (_tmp54_) {
					guint _tmp55_;
					_tmp55_ = self->priv->_persona_user_count;
					self->priv->_persona_user_count = _tmp55_ - 1;
				}
				_tmp56_ = removed;
				_tmp57_ = p;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp56_, _tmp57_);
				_tmp58_ = p;
				_tmp59_ = folks_persona_get_store (_tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = _g_object_ref0 (_tmp60_);
				store = _tmp61_;
				_tmp62_ = self->priv->_stores;
				_tmp63_ = store;
				_tmp64_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp62_, _tmp63_);
				num_from_store = GPOINTER_TO_UINT (_tmp64_);
				_tmp65_ = num_from_store;
				if (_tmp65_ > ((guint) 1)) {
					GeeHashMap* _tmp66_;
					FolksPersonaStore* _tmp67_;
					guint _tmp68_;
					_tmp66_ = self->priv->_stores;
					_tmp67_ = store;
					_tmp68_ = num_from_store;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp66_, _tmp67_, GUINT_TO_POINTER (_tmp68_ - 1));
				} else {
					FolksPersonaStore* _tmp69_;
					guint _tmp70_ = 0U;
					FolksPersonaStore* _tmp71_;
					guint _tmp72_ = 0U;
					GeeHashMap* _tmp73_;
					FolksPersonaStore* _tmp74_;
					_tmp69_ = store;
					g_signal_parse_name ("removed", FOLKS_TYPE_PERSONA_STORE, &_tmp70_, NULL, FALSE);
					g_signal_handlers_disconnect_matched (_tmp69_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp70_, 0, NULL, (GCallback) __folks_individual_store_removed_cb_folks_persona_store_removed, self);
					_tmp71_ = store;
					g_signal_parse_name ("personas-changed", FOLKS_TYPE_PERSONA_STORE, &_tmp72_, NULL, FALSE);
					g_signal_handlers_disconnect_matched (_tmp71_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp72_, 0, NULL, (GCallback) __folks_individual_store_personas_changed_cb_folks_persona_store_personas_changed, self);
					_tmp73_ = self->priv->_stores;
					_tmp74_ = store;
					gee_abstract_map_unset ((GeeAbstractMap*) _tmp73_, _tmp74_, NULL);
				}
				_tmp75_ = p;
				_tmp76_ = replacement_individual;
				_folks_individual_disconnect_from_persona (self, _tmp75_, _tmp76_);
				_g_object_unref0 (store);
			}
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	{
		GeeHashSet* _tmp77_;
		GeeIterator* _tmp78_ = NULL;
		GeeIterator* _p_it;
		_tmp77_ = removed;
		_tmp78_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp77_);
		_p_it = _tmp78_;
		while (TRUE) {
			GeeIterator* _tmp79_;
			gboolean _tmp80_ = FALSE;
			GeeIterator* _tmp81_;
			gpointer _tmp82_ = NULL;
			FolksPersona* p;
			GeeHashSet* _tmp83_;
			FolksPersona* _tmp84_;
			_tmp79_ = _p_it;
			_tmp80_ = gee_iterator_next (_tmp79_);
			if (!_tmp80_) {
				break;
			}
			_tmp81_ = _p_it;
			_tmp82_ = gee_iterator_get (_tmp81_);
			p = (FolksPersona*) _tmp82_;
			_tmp83_ = self->priv->_persona_set;
			_tmp84_ = p;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp83_, _tmp84_);
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_it);
	}
	_tmp85_ = added;
	_tmp86_ = removed;
	_folks_individual_emit_personas_changed (self, (GeeSet*) _tmp85_, (GeeSet*) _tmp86_);
	_tmp88_ = self->priv->_persona_user_count;
	if (_tmp88_ > ((guint) 0)) {
		_tmp87_ = TRUE;
	} else {
		_tmp87_ = FALSE;
	}
	_tmp89_ = _tmp87_;
	new_is_user = _tmp89_;
	_tmp90_ = new_is_user;
	_tmp91_ = self->priv->_is_user;
	if (_tmp90_ != _tmp91_) {
		gboolean _tmp92_;
		_tmp92_ = new_is_user;
		folks_individual_set_is_user (self, _tmp92_);
	}
	_tmp93_ = self->priv->_persona_set;
	_tmp94_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp93_);
	_tmp95_ = _tmp94_;
	if (_tmp95_ < 1) {
		FolksIndividual* _tmp96_;
		_tmp96_ = replacement_individual;
		g_signal_emit_by_name (self, "removed", _tmp96_);
		_g_object_unref0 (removed);
		_g_object_unref0 (added);
		return;
	}
	_tmp97_ = self->priv->_persona_set;
	_tmp98_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp97_);
	_tmp99_ = _tmp98_;
	if (_tmp99_ > 0) {
		FolksPersona* chosen_persona;
		FolksPersona* _tmp185_;
		const gchar* _tmp186_;
		const gchar* _tmp187_;
		gchar* _tmp188_ = NULL;
		gchar* _tmp189_;
		chosen_persona = NULL;
		{
			GeeHashSet* _tmp100_;
			GeeIterator* _tmp101_ = NULL;
			GeeIterator* _persona_it;
			_tmp100_ = self->priv->_persona_set;
			_tmp101_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp100_);
			_persona_it = _tmp101_;
			while (TRUE) {
				GeeIterator* _tmp102_;
				gboolean _tmp103_ = FALSE;
				GeeIterator* _tmp104_;
				gpointer _tmp105_ = NULL;
				FolksPersona* persona;
				FolksPersona* _tmp106_;
				FolksPersona* _tmp109_;
				FolksPersona* _tmp110_;
				FolksPersona* _chosen_persona;
				gboolean _tmp111_ = FALSE;
				gboolean _tmp112_ = FALSE;
				gboolean _tmp113_ = FALSE;
				FolksPersona* _tmp114_;
				FolksPersonaStore* _tmp115_;
				FolksPersonaStore* _tmp116_;
				gboolean _tmp117_;
				gboolean _tmp118_;
				gboolean _tmp124_;
				gboolean _tmp147_;
				gboolean _tmp182_;
				_tmp102_ = _persona_it;
				_tmp103_ = gee_iterator_next (_tmp102_);
				if (!_tmp103_) {
					break;
				}
				_tmp104_ = _persona_it;
				_tmp105_ = gee_iterator_get (_tmp104_);
				persona = (FolksPersona*) _tmp105_;
				_tmp106_ = chosen_persona;
				if (_tmp106_ == NULL) {
					FolksPersona* _tmp107_;
					FolksPersona* _tmp108_;
					_tmp107_ = persona;
					_tmp108_ = _g_object_ref0 (_tmp107_);
					_g_object_unref0 (chosen_persona);
					chosen_persona = _tmp108_;
					_g_object_unref0 (persona);
					continue;
				}
				_tmp109_ = chosen_persona;
				_tmp110_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, FOLKS_TYPE_PERSONA, FolksPersona));
				_chosen_persona = _tmp110_;
				_tmp114_ = _chosen_persona;
				_tmp115_ = folks_persona_get_store (_tmp114_);
				_tmp116_ = _tmp115_;
				_tmp117_ = folks_persona_store_get_is_primary_store (_tmp116_);
				_tmp118_ = _tmp117_;
				if (_tmp118_ == FALSE) {
					FolksPersona* _tmp119_;
					FolksPersonaStore* _tmp120_;
					FolksPersonaStore* _tmp121_;
					gboolean _tmp122_;
					gboolean _tmp123_;
					_tmp119_ = persona;
					_tmp120_ = folks_persona_get_store (_tmp119_);
					_tmp121_ = _tmp120_;
					_tmp122_ = folks_persona_store_get_is_primary_store (_tmp121_);
					_tmp123_ = _tmp122_;
					_tmp113_ = _tmp123_ == TRUE;
				} else {
					_tmp113_ = FALSE;
				}
				_tmp124_ = _tmp113_;
				if (_tmp124_) {
					_tmp112_ = TRUE;
				} else {
					gboolean _tmp125_ = FALSE;
					FolksPersona* _tmp126_;
					FolksPersonaStore* _tmp127_;
					FolksPersonaStore* _tmp128_;
					gboolean _tmp129_;
					gboolean _tmp130_;
					FolksPersona* _tmp131_;
					FolksPersonaStore* _tmp132_;
					FolksPersonaStore* _tmp133_;
					gboolean _tmp134_;
					gboolean _tmp135_;
					gboolean _tmp146_;
					_tmp126_ = _chosen_persona;
					_tmp127_ = folks_persona_get_store (_tmp126_);
					_tmp128_ = _tmp127_;
					_tmp129_ = folks_persona_store_get_is_primary_store (_tmp128_);
					_tmp130_ = _tmp129_;
					_tmp131_ = persona;
					_tmp132_ = folks_persona_get_store (_tmp131_);
					_tmp133_ = _tmp132_;
					_tmp134_ = folks_persona_store_get_is_primary_store (_tmp133_);
					_tmp135_ = _tmp134_;
					if (_tmp130_ == _tmp135_) {
						FolksPersona* _tmp136_;
						FolksPersonaStore* _tmp137_;
						FolksPersonaStore* _tmp138_;
						FolksPersonaStoreTrust _tmp139_;
						FolksPersonaStoreTrust _tmp140_;
						FolksPersona* _tmp141_;
						FolksPersonaStore* _tmp142_;
						FolksPersonaStore* _tmp143_;
						FolksPersonaStoreTrust _tmp144_;
						FolksPersonaStoreTrust _tmp145_;
						_tmp136_ = _chosen_persona;
						_tmp137_ = folks_persona_get_store (_tmp136_);
						_tmp138_ = _tmp137_;
						_tmp139_ = folks_persona_store_get_trust_level (_tmp138_);
						_tmp140_ = _tmp139_;
						_tmp141_ = persona;
						_tmp142_ = folks_persona_get_store (_tmp141_);
						_tmp143_ = _tmp142_;
						_tmp144_ = folks_persona_store_get_trust_level (_tmp143_);
						_tmp145_ = _tmp144_;
						_tmp125_ = _tmp140_ > _tmp145_;
					} else {
						_tmp125_ = FALSE;
					}
					_tmp146_ = _tmp125_;
					_tmp112_ = _tmp146_;
				}
				_tmp147_ = _tmp112_;
				if (_tmp147_) {
					_tmp111_ = TRUE;
				} else {
					gboolean _tmp148_ = FALSE;
					gboolean _tmp149_ = FALSE;
					FolksPersona* _tmp150_;
					FolksPersonaStore* _tmp151_;
					FolksPersonaStore* _tmp152_;
					gboolean _tmp153_;
					gboolean _tmp154_;
					FolksPersona* _tmp155_;
					FolksPersonaStore* _tmp156_;
					FolksPersonaStore* _tmp157_;
					gboolean _tmp158_;
					gboolean _tmp159_;
					gboolean _tmp170_;
					gboolean _tmp181_;
					_tmp150_ = _chosen_persona;
					_tmp151_ = folks_persona_get_store (_tmp150_);
					_tmp152_ = _tmp151_;
					_tmp153_ = folks_persona_store_get_is_primary_store (_tmp152_);
					_tmp154_ = _tmp153_;
					_tmp155_ = persona;
					_tmp156_ = folks_persona_get_store (_tmp155_);
					_tmp157_ = _tmp156_;
					_tmp158_ = folks_persona_store_get_is_primary_store (_tmp157_);
					_tmp159_ = _tmp158_;
					if (_tmp154_ == _tmp159_) {
						FolksPersona* _tmp160_;
						FolksPersonaStore* _tmp161_;
						FolksPersonaStore* _tmp162_;
						FolksPersonaStoreTrust _tmp163_;
						FolksPersonaStoreTrust _tmp164_;
						FolksPersona* _tmp165_;
						FolksPersonaStore* _tmp166_;
						FolksPersonaStore* _tmp167_;
						FolksPersonaStoreTrust _tmp168_;
						FolksPersonaStoreTrust _tmp169_;
						_tmp160_ = _chosen_persona;
						_tmp161_ = folks_persona_get_store (_tmp160_);
						_tmp162_ = _tmp161_;
						_tmp163_ = folks_persona_store_get_trust_level (_tmp162_);
						_tmp164_ = _tmp163_;
						_tmp165_ = persona;
						_tmp166_ = folks_persona_get_store (_tmp165_);
						_tmp167_ = _tmp166_;
						_tmp168_ = folks_persona_store_get_trust_level (_tmp167_);
						_tmp169_ = _tmp168_;
						_tmp149_ = _tmp164_ == _tmp169_;
					} else {
						_tmp149_ = FALSE;
					}
					_tmp170_ = _tmp149_;
					if (_tmp170_) {
						FolksPersona* _tmp171_;
						FolksPersonaStore* _tmp172_;
						FolksPersonaStore* _tmp173_;
						const gchar* _tmp174_;
						const gchar* _tmp175_;
						FolksPersona* _tmp176_;
						FolksPersonaStore* _tmp177_;
						FolksPersonaStore* _tmp178_;
						const gchar* _tmp179_;
						const gchar* _tmp180_;
						_tmp171_ = _chosen_persona;
						_tmp172_ = folks_persona_get_store (_tmp171_);
						_tmp173_ = _tmp172_;
						_tmp174_ = folks_persona_store_get_id (_tmp173_);
						_tmp175_ = _tmp174_;
						_tmp176_ = persona;
						_tmp177_ = folks_persona_get_store (_tmp176_);
						_tmp178_ = _tmp177_;
						_tmp179_ = folks_persona_store_get_id (_tmp178_);
						_tmp180_ = _tmp179_;
						_tmp148_ = g_strcmp0 (_tmp175_, _tmp180_) > 0;
					} else {
						_tmp148_ = FALSE;
					}
					_tmp181_ = _tmp148_;
					_tmp111_ = _tmp181_;
				}
				_tmp182_ = _tmp111_;
				if (_tmp182_) {
					FolksPersona* _tmp183_;
					FolksPersona* _tmp184_;
					_tmp183_ = persona;
					_tmp184_ = _g_object_ref0 (_tmp183_);
					_g_object_unref0 (chosen_persona);
					chosen_persona = _tmp184_;
				}
				_g_object_unref0 (_chosen_persona);
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (_persona_it);
		}
		_tmp185_ = chosen_persona;
		_tmp186_ = folks_persona_get_uid (G_TYPE_CHECK_INSTANCE_CAST (_tmp185_, FOLKS_TYPE_PERSONA, FolksPersona));
		_tmp187_ = _tmp186_;
		_tmp188_ = g_compute_checksum_for_string (G_CHECKSUM_SHA1, _tmp187_, (gsize) (-1));
		_tmp189_ = _tmp188_;
		folks_individual_set_id (self, _tmp189_);
		_g_free0 (_tmp189_);
		_g_object_unref0 (chosen_persona);
	}
	_folks_individual_update_fields (self);
	_g_object_unref0 (removed);
	_g_object_unref0 (added);
}


void folks_individual_replace (FolksIndividual* self, FolksIndividual* replacement_individual) {
	FolksIndividual* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (replacement_individual != NULL);
	_tmp0_ = replacement_individual;
	_folks_individual_set_personas (self, NULL, _tmp0_);
}


FolksTrustLevel folks_individual_get_trust_level (FolksIndividual* self) {
	FolksTrustLevel result;
	FolksTrustLevel _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_trust_level;
	result = _tmp0_;
	return result;
}


static void folks_individual_set_trust_level (FolksIndividual* self, FolksTrustLevel value) {
	FolksTrustLevel _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_trust_level = _tmp0_;
	g_object_notify ((GObject *) self, "trust-level");
}


static GLoadableIcon* folks_individual_real_get_avatar (FolksAvatarDetails* base) {
	GLoadableIcon* result;
	FolksIndividual* self;
	GLoadableIcon* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_avatar;
	result = _tmp0_;
	return result;
}


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


static FolksPresenceType folks_individual_real_get_presence_type (FolksPresenceDetails* base) {
	FolksPresenceType result;
	FolksIndividual* self;
	FolksPresenceType _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_presence_type;
	result = _tmp0_;
	return result;
}


static void folks_individual_real_set_presence_type (FolksPresenceDetails* base, FolksPresenceType value) {
	FolksIndividual* self;
	FolksPresenceType _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = value;
	self->priv->_presence_type = _tmp0_;
	g_object_notify ((GObject *) self, "presence-type");
}


static const gchar* folks_individual_real_get_presence_status (FolksPresenceDetails* base) {
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_presence_status;
	result = _tmp0_;
	return result;
}


static void folks_individual_real_set_presence_status (FolksPresenceDetails* base, const gchar* value) {
	FolksIndividual* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (FolksIndividual*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_presence_status);
	self->priv->_presence_status = _tmp1_;
	g_object_notify ((GObject *) self, "presence-status");
}


static const gchar* folks_individual_real_get_presence_message (FolksPresenceDetails* base) {
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_presence_message;
	result = _tmp0_;
	return result;
}


static void folks_individual_real_set_presence_message (FolksPresenceDetails* base, const gchar* value) {
	FolksIndividual* self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (FolksIndividual*) base;
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_presence_message);
	self->priv->_presence_message = _tmp1_;
	g_object_notify ((GObject *) self, "presence-message");
}


gboolean folks_individual_get_is_user (FolksIndividual* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_user;
	result = _tmp0_;
	return result;
}


static void folks_individual_set_is_user (FolksIndividual* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_is_user = _tmp0_;
	g_object_notify ((GObject *) self, "is-user");
}


const gchar* folks_individual_get_id (FolksIndividual* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}


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


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


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


static FolksStructuredName* folks_individual_real_get_structured_name (FolksNameDetails* base) {
	FolksStructuredName* result;
	FolksIndividual* self;
	FolksStructuredName* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_structured_name;
	result = _tmp0_;
	return result;
}


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


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


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


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


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


static FolksGender folks_individual_real_get_gender (FolksGenderDetails* base) {
	FolksGender result;
	FolksIndividual* self;
	FolksGender _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_gender;
	result = _tmp0_;
	return result;
}


static void folks_individual_real_set_gender (FolksGenderDetails* base, FolksGender value) {
	FolksIndividual* self;
	FolksGender _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = value;
	folks_gender_details_change_gender ((FolksGenderDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* folks_individual_real_get_urls (FolksUrlDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_urls_ro;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_phone_numbers (FolksPhoneDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_phone_numbers_ro;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_email_addresses (FolksEmailDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_email_addresses_ro;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_roles (FolksRoleDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_roles_ro;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_local_ids (FolksLocalIdDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_local_ids_ro;
	result = _tmp0_;
	return result;
}


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


static GDateTime* folks_individual_real_get_birthday (FolksBirthdayDetails* base) {
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_birthday;
	result = _tmp0_;
	return result;
}


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


static const gchar* folks_individual_real_get_calendar_event_id (FolksBirthdayDetails* base) {
	const gchar* result;
	FolksIndividual* self;
	const gchar* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_calendar_event_id;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_notes (FolksNoteDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_notes_ro;
	result = _tmp0_;
	return result;
}


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


static GeeSet* folks_individual_real_get_postal_addresses (FolksPostalAddressDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_postal_addresses_ro;
	result = _tmp0_;
	return result;
}


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


static gboolean folks_individual_real_get_is_favourite (FolksFavouriteDetails* base) {
	gboolean result;
	FolksIndividual* self;
	gboolean _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_is_favourite;
	result = _tmp0_;
	return result;
}


static void folks_individual_real_set_is_favourite (FolksFavouriteDetails* base, gboolean value) {
	FolksIndividual* self;
	gboolean _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = value;
	folks_favourite_details_change_is_favourite ((FolksFavouriteDetails*) self, _tmp0_, NULL, NULL);
}


static GeeSet* folks_individual_real_get_groups (FolksGroupDetails* base) {
	GeeSet* result;
	FolksIndividual* self;
	GeeSet* _tmp0_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_groups_ro;
	result = _tmp0_;
	return result;
}


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


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


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


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


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


static guint folks_individual_real_get_im_interaction_count (FolksInteractionDetails* base) {
	guint result;
	FolksIndividual* self;
	guint counter;
	guint _tmp13_;
	self = (FolksIndividual*) base;
	counter = (guint) 0;
	{
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _persona_it;
		_tmp0_ = self->priv->_persona_set;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_persona_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp6_;
			FolksInteractionDetails* _tmp7_;
			FolksInteractionDetails* my_interaction_details;
			FolksInteractionDetails* _tmp8_;
			_tmp2_ = _persona_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			persona = (FolksPersona*) _tmp5_;
			_tmp6_ = persona;
			_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp6_) : NULL);
			my_interaction_details = _tmp7_;
			_tmp8_ = my_interaction_details;
			if (_tmp8_ != NULL) {
				guint _tmp9_;
				FolksInteractionDetails* _tmp10_;
				guint _tmp11_;
				guint _tmp12_;
				_tmp9_ = counter;
				_tmp10_ = my_interaction_details;
				_tmp11_ = folks_interaction_details_get_im_interaction_count (_tmp10_);
				_tmp12_ = _tmp11_;
				counter = _tmp9_ + _tmp12_;
			}
			_g_object_unref0 (my_interaction_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	_tmp13_ = counter;
	result = _tmp13_;
	return result;
}


static GDateTime* folks_individual_real_get_last_im_interaction_datetime (FolksInteractionDetails* base) {
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	GDateTime* _tmp29_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_last_im_interaction_datetime;
	if (_tmp0_ == NULL) {
		{
			GeeHashSet* _tmp1_;
			GeeIterator* _tmp2_ = NULL;
			GeeIterator* _persona_it;
			_tmp1_ = self->priv->_persona_set;
			_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
			_persona_it = _tmp2_;
			while (TRUE) {
				GeeIterator* _tmp3_;
				gboolean _tmp4_ = FALSE;
				GeeIterator* _tmp5_;
				gpointer _tmp6_ = NULL;
				FolksPersona* persona;
				FolksPersona* _tmp7_;
				FolksInteractionDetails* _tmp8_;
				FolksInteractionDetails* my_interaction_details;
				gboolean _tmp9_ = FALSE;
				FolksInteractionDetails* _tmp10_;
				gboolean _tmp14_;
				_tmp3_ = _persona_it;
				_tmp4_ = gee_iterator_next (_tmp3_);
				if (!_tmp4_) {
					break;
				}
				_tmp5_ = _persona_it;
				_tmp6_ = gee_iterator_get (_tmp5_);
				persona = (FolksPersona*) _tmp6_;
				_tmp7_ = persona;
				_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp7_) : NULL);
				my_interaction_details = _tmp8_;
				_tmp10_ = my_interaction_details;
				if (_tmp10_ != NULL) {
					FolksInteractionDetails* _tmp11_;
					GDateTime* _tmp12_;
					GDateTime* _tmp13_;
					_tmp11_ = my_interaction_details;
					_tmp12_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp9_ = _tmp13_ != NULL;
				} else {
					_tmp9_ = FALSE;
				}
				_tmp14_ = _tmp9_;
				if (_tmp14_) {
					FolksInteractionDetails* _tmp15_;
					GDateTime* _tmp16_;
					GDateTime* _tmp17_;
					GDateTime* _tmp18_;
					GDateTime* interaction_datetime;
					gboolean _tmp19_ = FALSE;
					GDateTime* _tmp20_;
					gboolean _tmp24_;
					_tmp15_ = my_interaction_details;
					_tmp16_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = _g_date_time_ref0 (_tmp17_);
					interaction_datetime = _tmp18_;
					_tmp20_ = self->priv->_last_im_interaction_datetime;
					if (_tmp20_ == NULL) {
						_tmp19_ = TRUE;
					} else {
						GDateTime* _tmp21_;
						GDateTime* _tmp22_;
						gint _tmp23_ = 0;
						_tmp21_ = interaction_datetime;
						_tmp22_ = self->priv->_last_im_interaction_datetime;
						_tmp23_ = g_date_time_compare (_tmp21_, _tmp22_);
						_tmp19_ = _tmp23_ == 1;
					}
					_tmp24_ = _tmp19_;
					if (_tmp24_) {
						FolksInteractionDetails* _tmp25_;
						GDateTime* _tmp26_;
						GDateTime* _tmp27_;
						GDateTime* _tmp28_;
						_tmp25_ = my_interaction_details;
						_tmp26_ = folks_interaction_details_get_last_im_interaction_datetime (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp28_ = _g_date_time_ref0 (_tmp27_);
						_g_date_time_unref0 (self->priv->_last_im_interaction_datetime);
						self->priv->_last_im_interaction_datetime = _tmp28_;
					}
					_g_date_time_unref0 (interaction_datetime);
				}
				_g_object_unref0 (my_interaction_details);
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (_persona_it);
		}
	}
	_tmp29_ = self->priv->_last_im_interaction_datetime;
	result = _tmp29_;
	return result;
}


static guint folks_individual_real_get_call_interaction_count (FolksInteractionDetails* base) {
	guint result;
	FolksIndividual* self;
	guint counter;
	guint _tmp13_;
	self = (FolksIndividual*) base;
	counter = (guint) 0;
	{
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _persona_it;
		_tmp0_ = self->priv->_persona_set;
		_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp0_);
		_persona_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp6_;
			FolksInteractionDetails* _tmp7_;
			FolksInteractionDetails* my_interaction_details;
			FolksInteractionDetails* _tmp8_;
			_tmp2_ = _persona_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = _persona_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			persona = (FolksPersona*) _tmp5_;
			_tmp6_ = persona;
			_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp6_) : NULL);
			my_interaction_details = _tmp7_;
			_tmp8_ = my_interaction_details;
			if (_tmp8_ != NULL) {
				guint _tmp9_;
				FolksInteractionDetails* _tmp10_;
				guint _tmp11_;
				guint _tmp12_;
				_tmp9_ = counter;
				_tmp10_ = my_interaction_details;
				_tmp11_ = folks_interaction_details_get_call_interaction_count (_tmp10_);
				_tmp12_ = _tmp11_;
				counter = _tmp9_ + _tmp12_;
			}
			_g_object_unref0 (my_interaction_details);
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (_persona_it);
	}
	_tmp13_ = counter;
	result = _tmp13_;
	return result;
}


static GDateTime* folks_individual_real_get_last_call_interaction_datetime (FolksInteractionDetails* base) {
	GDateTime* result;
	FolksIndividual* self;
	GDateTime* _tmp0_;
	GDateTime* _tmp29_;
	self = (FolksIndividual*) base;
	_tmp0_ = self->priv->_last_call_interaction_datetime;
	if (_tmp0_ == NULL) {
		{
			GeeHashSet* _tmp1_;
			GeeIterator* _tmp2_ = NULL;
			GeeIterator* _persona_it;
			_tmp1_ = self->priv->_persona_set;
			_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _tmp1_);
			_persona_it = _tmp2_;
			while (TRUE) {
				GeeIterator* _tmp3_;
				gboolean _tmp4_ = FALSE;
				GeeIterator* _tmp5_;
				gpointer _tmp6_ = NULL;
				FolksPersona* persona;
				FolksPersona* _tmp7_;
				FolksInteractionDetails* _tmp8_;
				FolksInteractionDetails* my_interaction_details;
				gboolean _tmp9_ = FALSE;
				FolksInteractionDetails* _tmp10_;
				gboolean _tmp14_;
				_tmp3_ = _persona_it;
				_tmp4_ = gee_iterator_next (_tmp3_);
				if (!_tmp4_) {
					break;
				}
				_tmp5_ = _persona_it;
				_tmp6_ = gee_iterator_get (_tmp5_);
				persona = (FolksPersona*) _tmp6_;
				_tmp7_ = persona;
				_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, FOLKS_TYPE_INTERACTION_DETAILS) ? ((FolksInteractionDetails*) _tmp7_) : NULL);
				my_interaction_details = _tmp8_;
				_tmp10_ = my_interaction_details;
				if (_tmp10_ != NULL) {
					FolksInteractionDetails* _tmp11_;
					GDateTime* _tmp12_;
					GDateTime* _tmp13_;
					_tmp11_ = my_interaction_details;
					_tmp12_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp9_ = _tmp13_ != NULL;
				} else {
					_tmp9_ = FALSE;
				}
				_tmp14_ = _tmp9_;
				if (_tmp14_) {
					FolksInteractionDetails* _tmp15_;
					GDateTime* _tmp16_;
					GDateTime* _tmp17_;
					GDateTime* _tmp18_;
					GDateTime* interaction_datetime;
					gboolean _tmp19_ = FALSE;
					GDateTime* _tmp20_;
					gboolean _tmp24_;
					_tmp15_ = my_interaction_details;
					_tmp16_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = _g_date_time_ref0 (_tmp17_);
					interaction_datetime = _tmp18_;
					_tmp20_ = self->priv->_last_call_interaction_datetime;
					if (_tmp20_ == NULL) {
						_tmp19_ = TRUE;
					} else {
						GDateTime* _tmp21_;
						GDateTime* _tmp22_;
						gint _tmp23_ = 0;
						_tmp21_ = interaction_datetime;
						_tmp22_ = self->priv->_last_call_interaction_datetime;
						_tmp23_ = g_date_time_compare (_tmp21_, _tmp22_);
						_tmp19_ = _tmp23_ > 1;
					}
					_tmp24_ = _tmp19_;
					if (_tmp24_) {
						FolksInteractionDetails* _tmp25_;
						GDateTime* _tmp26_;
						GDateTime* _tmp27_;
						GDateTime* _tmp28_;
						_tmp25_ = my_interaction_details;
						_tmp26_ = folks_interaction_details_get_last_call_interaction_datetime (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp28_ = _g_date_time_ref0 (_tmp27_);
						_g_date_time_unref0 (self->priv->_last_call_interaction_datetime);
						self->priv->_last_call_interaction_datetime = _tmp28_;
					}
					_g_date_time_unref0 (interaction_datetime);
				}
				_g_object_unref0 (my_interaction_details);
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (_persona_it);
		}
	}
	_tmp29_ = self->priv->_last_call_interaction_datetime;
	result = _tmp29_;
	return result;
}


GeeSet* folks_individual_get_personas (FolksIndividual* self) {
	GeeSet* result;
	GeeSet* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_persona_set_ro;
	result = _tmp0_;
	return result;
}


void folks_individual_set_personas (FolksIndividual* self, GeeSet* value) {
	GeeSet* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_folks_individual_set_personas (self, _tmp0_, NULL);
	g_object_notify ((GObject *) self, "personas");
}


static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}


static GObject * folks_individual_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FolksIndividual * self;
	GeeHashSet* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GeeHashSet* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeHashSet* _tmp6_;
	GeeSet* _tmp7_;
	GeeSet* _tmp8_;
	GeeHashSet* _tmp9_;
	GeeSet* _tmp10_;
	GeeSet* _tmp11_;
	GeeHashSet* _tmp12_;
	GeeSet* _tmp13_;
	GeeSet* _tmp14_;
	GeeHashSet* _tmp15_;
	GeeSet* _tmp16_;
	GeeSet* _tmp17_;
	GeeHashSet* _tmp18_;
	GeeSet* _tmp19_;
	GeeSet* _tmp20_;
	GeeHashSet* _tmp21_;
	GeeSet* _tmp22_;
	GeeSet* _tmp23_;
	GeeHashSet* _tmp24_;
	GeeSet* _tmp25_;
	GeeSet* _tmp26_;
	GeeHashSet* _tmp27_;
	GeeSet* _tmp28_;
	GeeSet* _tmp29_;
	parent_class = G_OBJECT_CLASS (folks_individual_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	_tmp0_ = self->priv->_persona_set;
	_tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_debug ("individual.vala:1098: Creating new Individual with %u Personas: %p", (guint) _tmp2_, self);
	_tmp3_ = self->priv->_persona_set;
	_tmp4_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (self->priv->_persona_set_ro);
	self->priv->_persona_set_ro = _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_ = self->priv->_phone_numbers;
	_tmp10_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp9_);
	_tmp11_ = _tmp10_;
	_g_object_unref0 (self->priv->_phone_numbers_ro);
	self->priv->_phone_numbers_ro = _tmp11_;
	_tmp12_ = self->priv->_email_addresses;
	_tmp13_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp12_);
	_tmp14_ = _tmp13_;
	_g_object_unref0 (self->priv->_email_addresses_ro);
	self->priv->_email_addresses_ro = _tmp14_;
	_tmp15_ = self->priv->_roles;
	_tmp16_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp15_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (self->priv->_roles_ro);
	self->priv->_roles_ro = _tmp17_;
	_tmp18_ = self->priv->_local_ids;
	_tmp19_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp18_);
	_tmp20_ = _tmp19_;
	_g_object_unref0 (self->priv->_local_ids_ro);
	self->priv->_local_ids_ro = _tmp20_;
	_tmp21_ = self->priv->_postal_addresses;
	_tmp22_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp21_);
	_tmp23_ = _tmp22_;
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	self->priv->_postal_addresses_ro = _tmp23_;
	_tmp24_ = self->priv->_notes;
	_tmp25_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp24_);
	_tmp26_ = _tmp25_;
	_g_object_unref0 (self->priv->_notes_ro);
	self->priv->_notes_ro = _tmp26_;
	_tmp27_ = self->priv->_groups;
	_tmp28_ = gee_abstract_set_get_read_only_view ((GeeAbstractSet*) _tmp27_);
	_tmp29_ = _tmp28_;
	_g_object_unref0 (self->priv->_groups_ro);
	self->priv->_groups_ro = _tmp29_;
	return obj;
}


static void folks_individual_class_init (FolksIndividualClass * klass) {
	folks_individual_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FolksIndividualPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_folks_individual_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_folks_individual_set_property;
	G_OBJECT_CLASS (klass)->constructor = folks_individual_constructor;
	G_OBJECT_CLASS (klass)->finalize = folks_individual_finalize;
	/**
	   * The trust level of the Individual.
	   *
	   * This specifies how far the Individual can be trusted to be who it claims
	   * to be. See the descriptions for the elements of {@link TrustLevel}.
	   *
	   * Clients should ''not'' allow linking of Individuals who have a trust level
	   * of {@link TrustLevel.NONE}.
	   *
	   * @since 0.1.15
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_TRUST_LEVEL, g_param_spec_enum ("trust-level", "trust-level", "trust-level", FOLKS_TYPE_TRUST_LEVEL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PRESENCE_TYPE, g_param_spec_enum ("presence-type", "presence-type", "presence-type", FOLKS_TYPE_PRESENCE_TYPE, 0, 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), FOLKS_INDIVIDUAL_PRESENCE_STATUS, g_param_spec_string ("presence-status", "presence-status", "presence-status", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PRESENCE_MESSAGE, g_param_spec_string ("presence-message", "presence-message", "presence-message", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Whether the Individual is the user.
	   *
	   * Iff the Individual represents the user – the person who owns the
	   * account in the backend for each {@link Persona} in the Individual –
	   * this is `true`.
	   *
	   * It is //not// guaranteed that every {@link Persona} in the Individual has
	   * its {@link Persona.is_user} set to the same value as the Individual. For
	   * example, the user could own two Telepathy accounts, and have added the
	   * other account as a contact in each account. The accounts will expose a
	   * {@link Persona} for the user (which will have {@link Persona.is_user} set
	   * to `true`) //and// a {@link Persona} for the contact for the other account
	   * (which will have {@link Persona.is_user} set to `false`).
	   *
	   * It is guaranteed that iff this property is set to `true` on an Individual,
	   * there will be at least one {@link Persona} in the Individual with its
	   * {@link Persona.is_user} set to `true`.
	   *
	   * It is guaranteed that there will only ever be one Individual with this
	   * property set to `true`.
	   *
	   * @since 0.3.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IS_USER, g_param_spec_boolean ("is-user", "is-user", "is-user", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * A unique identifier for the Individual.
	   *
	   * This uniquely identifies the Individual, and persists across
	   * {@link IndividualAggregator} instances. It may not persist across linking
	   * the Individual with other Individuals.
	   *
	   * This is an opaque string and has no structure.
	   *
	   * If an identifier is required which will be used for a long-lived link
	   * between different stored data, it may be more desirable to use the
	   * {@link Persona.uid} of the most relevant {@link Persona} in the Individual
	   * instead. For example, if storing references to Individuals who are tagged
	   * in a photo, it may be safer to store the UID of the Persona whose backend
	   * provided the photo (e.g. Facebook).
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_ID, g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_ALIAS, g_param_spec_string ("alias", "alias", "alias", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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));
	/**
	   * Whether this Individual is a user-defined favourite.
	   *
	   * This property is `true` if any of this Individual's {@link Persona}s are
	   * favourites).
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_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}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IM_ADDRESSES, g_param_spec_object ("im-addresses", "im-addresses", "im-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES, g_param_spec_object ("web-service-addresses", "web-service-addresses", "web-service-addresses", GEE_TYPE_MULTI_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT, g_param_spec_uint ("im-interaction-count", "im-interaction-count", "im-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME, g_param_spec_boxed ("last-im-interaction-datetime", "last-im-interaction-datetime", "last-im-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT, g_param_spec_uint ("call-interaction-count", "call-interaction-count", "call-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME, g_param_spec_boxed ("last-call-interaction-datetime", "last-call-interaction-datetime", "last-call-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * The set of {@link Persona}s encapsulated by this Individual.
	   *
	   * No order is specified over the set of personas, as such an order may be
	   * different across each of the properties implemented by the personas (e.g.
	   * should they be ordered by presence, name, star sign, etc.?).
	   *
	   * Changing the set of personas may cause updates to the aggregated properties
	   * provided by the Individual, resulting in property notifications for them.
	   *
	   * Changing the set of personas will not cause permanent linking/unlinking of
	   * the added/removed personas to/from this Individual. To do that, call
	   * {@link IndividualAggregator.link_personas} or
	   * {@link IndividualAggregator.unlink_individual}, which will ensure the link
	   * changes are written to the appropriate backend.
	   *
	   * @since 0.5.1
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INDIVIDUAL_PERSONAS, g_param_spec_object ("personas", "personas", "personas", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	   * Emitted when the last of the Individual's {@link Persona}s has been
	   * removed.
	   *
	   * At this point, the Individual is invalid, so any client referencing it
	   * should unreference it and remove it from their UI.
	   *
	   * @param replacement_individual the individual which has replaced this one
	   * due to linking, or `null` if this individual was removed for another reason
	   * @since 0.1.13
	   */
	g_signal_new ("removed", FOLKS_TYPE_INDIVIDUAL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, FOLKS_TYPE_INDIVIDUAL);
	/**
	   * Emitted when one or more {@link Persona}s are added to or removed from
	   * the Individual. As the parameters are (unordered) sets, the orders of their
	   * elements are undefined.
	   *
	   * @param added a set of {@link Persona}s which have been added
	   * @param removed a set of {@link Persona}s which have been removed
	   *
	   * @since 0.5.1
	   */
	g_signal_new ("personas_changed", FOLKS_TYPE_INDIVIDUAL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GEE_TYPE_SET, GEE_TYPE_SET);
}


static void folks_individual_folks_alias_details_interface_init (FolksAliasDetailsIface * iface) {
	folks_individual_folks_alias_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_alias = (void (*)(FolksAliasDetails*, const gchar*, GError**)) folks_individual_real_change_alias;
	iface->change_alias_finish = folks_individual_real_change_alias_finish;
	iface->get_alias = folks_individual_real_get_alias;
	iface->set_alias = folks_individual_real_set_alias;
}


static void folks_individual_folks_avatar_details_interface_init (FolksAvatarDetailsIface * iface) {
	folks_individual_folks_avatar_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_avatar = (void (*)(FolksAvatarDetails*, GLoadableIcon*, GError**)) folks_individual_real_change_avatar;
	iface->change_avatar_finish = folks_individual_real_change_avatar_finish;
	iface->get_avatar = folks_individual_real_get_avatar;
	iface->set_avatar = folks_individual_real_set_avatar;
}


static void folks_individual_folks_birthday_details_interface_init (FolksBirthdayDetailsIface * iface) {
	folks_individual_folks_birthday_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_birthday = folks_individual_real_get_birthday;
	iface->set_birthday = folks_individual_real_set_birthday;
	iface->get_calendar_event_id = folks_individual_real_get_calendar_event_id;
	iface->set_calendar_event_id = folks_individual_real_set_calendar_event_id;
}


static void folks_individual_folks_email_details_interface_init (FolksEmailDetailsIface * iface) {
	folks_individual_folks_email_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_email_addresses = folks_individual_real_get_email_addresses;
	iface->set_email_addresses = folks_individual_real_set_email_addresses;
}


static void folks_individual_folks_favourite_details_interface_init (FolksFavouriteDetailsIface * iface) {
	folks_individual_folks_favourite_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_is_favourite = (void (*)(FolksFavouriteDetails*, gboolean, GError**)) folks_individual_real_change_is_favourite;
	iface->change_is_favourite_finish = folks_individual_real_change_is_favourite_finish;
	iface->get_is_favourite = folks_individual_real_get_is_favourite;
	iface->set_is_favourite = folks_individual_real_set_is_favourite;
}


static void folks_individual_folks_gender_details_interface_init (FolksGenderDetailsIface * iface) {
	folks_individual_folks_gender_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_gender = folks_individual_real_get_gender;
	iface->set_gender = folks_individual_real_set_gender;
}


static void folks_individual_folks_group_details_interface_init (FolksGroupDetailsIface * iface) {
	folks_individual_folks_group_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_groups = (void (*)(FolksGroupDetails*, GeeSet*, GError**)) folks_individual_real_change_groups;
	iface->change_groups_finish = folks_individual_real_change_groups_finish;
	iface->change_group = (void (*)(FolksGroupDetails*, const gchar*, gboolean, GError**)) folks_individual_real_change_group;
	iface->change_group_finish = folks_individual_real_change_group_finish;
	iface->get_groups = folks_individual_real_get_groups;
	iface->set_groups = folks_individual_real_set_groups;
}


static void folks_individual_folks_im_details_interface_init (FolksImDetailsIface * iface) {
	folks_individual_folks_im_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_im_addresses = folks_individual_real_get_im_addresses;
	iface->set_im_addresses = folks_individual_real_set_im_addresses;
}


static void folks_individual_folks_interaction_details_interface_init (FolksInteractionDetailsIface * iface) {
	folks_individual_folks_interaction_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_im_interaction_count = folks_individual_real_get_im_interaction_count;
	iface->get_last_im_interaction_datetime = folks_individual_real_get_last_im_interaction_datetime;
	iface->get_call_interaction_count = folks_individual_real_get_call_interaction_count;
	iface->get_last_call_interaction_datetime = folks_individual_real_get_last_call_interaction_datetime;
}


static void folks_individual_folks_local_id_details_interface_init (FolksLocalIdDetailsIface * iface) {
	folks_individual_folks_local_id_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_local_ids = folks_individual_real_get_local_ids;
	iface->set_local_ids = folks_individual_real_set_local_ids;
}


static void folks_individual_folks_name_details_interface_init (FolksNameDetailsIface * iface) {
	folks_individual_folks_name_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->change_nickname = (void (*)(FolksNameDetails*, const gchar*, GError**)) folks_individual_real_change_nickname;
	iface->change_nickname_finish = folks_individual_real_change_nickname_finish;
	iface->get_structured_name = folks_individual_real_get_structured_name;
	iface->set_structured_name = folks_individual_real_set_structured_name;
	iface->get_full_name = folks_individual_real_get_full_name;
	iface->set_full_name = folks_individual_real_set_full_name;
	iface->get_nickname = folks_individual_real_get_nickname;
	iface->set_nickname = folks_individual_real_set_nickname;
}


static void folks_individual_folks_note_details_interface_init (FolksNoteDetailsIface * iface) {
	folks_individual_folks_note_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_notes = folks_individual_real_get_notes;
	iface->set_notes = folks_individual_real_set_notes;
}


static void folks_individual_folks_presence_details_interface_init (FolksPresenceDetailsIface * iface) {
	folks_individual_folks_presence_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_presence_type = folks_individual_real_get_presence_type;
	iface->set_presence_type = folks_individual_real_set_presence_type;
	iface->get_presence_status = folks_individual_real_get_presence_status;
	iface->set_presence_status = folks_individual_real_set_presence_status;
	iface->get_presence_message = folks_individual_real_get_presence_message;
	iface->set_presence_message = folks_individual_real_set_presence_message;
}


static void folks_individual_folks_phone_details_interface_init (FolksPhoneDetailsIface * iface) {
	folks_individual_folks_phone_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_phone_numbers = folks_individual_real_get_phone_numbers;
	iface->set_phone_numbers = folks_individual_real_set_phone_numbers;
}


static void folks_individual_folks_postal_address_details_interface_init (FolksPostalAddressDetailsIface * iface) {
	folks_individual_folks_postal_address_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_postal_addresses = folks_individual_real_get_postal_addresses;
	iface->set_postal_addresses = folks_individual_real_set_postal_addresses;
}


static void folks_individual_folks_role_details_interface_init (FolksRoleDetailsIface * iface) {
	folks_individual_folks_role_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_roles = folks_individual_real_get_roles;
	iface->set_roles = folks_individual_real_set_roles;
}


static void folks_individual_folks_url_details_interface_init (FolksUrlDetailsIface * iface) {
	folks_individual_folks_url_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_urls = folks_individual_real_get_urls;
	iface->set_urls = folks_individual_real_set_urls;
}


static void folks_individual_folks_web_service_details_interface_init (FolksWebServiceDetailsIface * iface) {
	folks_individual_folks_web_service_details_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_web_service_addresses = folks_individual_real_get_web_service_addresses;
	iface->set_web_service_addresses = folks_individual_real_set_web_service_addresses;
}


static void folks_individual_instance_init (FolksIndividual * self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GeeHashSet* _tmp2_;
	GeeHashMap* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GeeHashSet* _tmp7_;
	GeeHashSet* _tmp8_;
	GeeHashSet* _tmp9_;
	GeeHashSet* _tmp10_;
	GeeHashSet* _tmp11_;
	GeeHashSet* _tmp12_;
	GeeHashSet* _tmp13_;
	GeeHashSet* _tmp14_;
	GeeHashMultiMap* _tmp15_;
	GeeHashMultiMap* _tmp16_;
	self->priv = FOLKS_INDIVIDUAL_GET_PRIVATE (self);
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_, _tmp1_);
	self->priv->_persona_set = _tmp2_;
	_tmp3_ = gee_hash_map_new (FOLKS_TYPE_PERSONA_STORE, (GBoxedCopyFunc) g_object_ref, g_object_unref, G_TYPE_UINT, NULL, NULL, NULL, NULL, NULL);
	self->priv->_stores = _tmp3_;
	self->priv->_persona_user_count = (guint) 0;
	self->priv->_avatar = NULL;
	_tmp4_ = g_strdup ("");
	self->priv->_alias = _tmp4_;
	self->priv->_structured_name = NULL;
	_tmp5_ = g_strdup ("");
	self->priv->_full_name = _tmp5_;
	_tmp6_ = g_strdup ("");
	self->priv->_nickname = _tmp6_;
	self->priv->_gender = FOLKS_GENDER_UNSPECIFIED;
	_tmp7_ = gee_hash_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_urls = _tmp7_;
	_tmp8_ = gee_hash_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_phone_numbers = _tmp8_;
	_tmp9_ = gee_hash_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_email_addresses = _tmp9_;
	_tmp10_ = gee_hash_set_new (FOLKS_TYPE_ROLE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_roles = _tmp10_;
	_tmp11_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	self->priv->_local_ids = _tmp11_;
	self->priv->_birthday = NULL;
	self->priv->_calendar_event_id = NULL;
	_tmp12_ = gee_hash_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_notes = _tmp12_;
	_tmp13_ = gee_hash_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_postal_addresses = _tmp13_;
	self->priv->_is_favourite = FALSE;
	_tmp14_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	self->priv->_groups = _tmp14_;
	_tmp15_ = 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, _folks_abstract_field_details_hash_ghash_func, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_im_addresses = _tmp15_;
	_tmp16_ = 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, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	self->priv->_web_service_addresses = _tmp16_;
	self->priv->_last_im_interaction_datetime = NULL;
	self->priv->_last_call_interaction_datetime = NULL;
}


static void folks_individual_finalize (GObject* obj) {
	FolksIndividual * self;
	const gchar* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	_tmp0_ = self->priv->_id;
	g_debug ("individual.vala:1114: Destroying Individual '%s': %p", _tmp0_, self);
	_g_object_unref0 (self->priv->_persona_set);
	_g_object_unref0 (self->priv->_persona_set_ro);
	_g_object_unref0 (self->priv->_stores);
	_g_object_unref0 (self->priv->_avatar);
	_g_free0 (self->priv->_presence_status);
	_g_free0 (self->priv->_presence_message);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_alias);
	_g_object_unref0 (self->priv->_structured_name);
	_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->_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->_roles);
	_g_object_unref0 (self->priv->_roles_ro);
	_g_object_unref0 (self->priv->_local_ids);
	_g_object_unref0 (self->priv->_local_ids_ro);
	_g_date_time_unref0 (self->priv->_birthday);
	_g_free0 (self->priv->_calendar_event_id);
	_g_object_unref0 (self->priv->_notes);
	_g_object_unref0 (self->priv->_notes_ro);
	_g_object_unref0 (self->priv->_postal_addresses);
	_g_object_unref0 (self->priv->_postal_addresses_ro);
	_g_object_unref0 (self->priv->_groups);
	_g_object_unref0 (self->priv->_groups_ro);
	_g_object_unref0 (self->priv->_im_addresses);
	_g_object_unref0 (self->priv->_web_service_addresses);
	_g_date_time_unref0 (self->priv->_last_im_interaction_datetime);
	_g_date_time_unref0 (self->priv->_last_call_interaction_datetime);
	G_OBJECT_CLASS (folks_individual_parent_class)->finalize (obj);
}


/**
 * A physical person, aggregated from the various {@link Persona}s the person
 * might have, such as their different IM addresses or vCard entries.
 *
 * When choosing the values of single-valued properties (such as
 * {@link Individual.alias} and {@link Individual.avatar}; but not multi-valued
 * properties such as {@link Individual.groups} and
 * {@link Individual.im_addresses}) from the {@link Persona}s in the
 * individual to present as the values of those properties of the individual,
 * it is guaranteed that if the individual contains a persona from the primary
 * persona store (see {@link IndividualAggregator.primary_store}), its property
 * values will be chosen above all others. This means that any changes to
 * property values made through folks (which are normally written to the primary
 * store) will always be used by {@link Individual}s.
 *
 * No further guarantees are made about the order of preference used for
 * choosing which property values to use for the {@link Individual}, other than
 * that the order may vary between properties, but is guaranteed to be stable
 * for a given property.
 */
GType folks_individual_get_type (void) {
	static volatile gsize folks_individual_type_id__volatile = 0;
	if (g_once_init_enter (&folks_individual_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksIndividualClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_individual_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksIndividual), 0, (GInstanceInitFunc) folks_individual_instance_init, NULL };
		static const GInterfaceInfo folks_alias_details_info = { (GInterfaceInitFunc) folks_individual_folks_alias_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_avatar_details_info = { (GInterfaceInitFunc) folks_individual_folks_avatar_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_birthday_details_info = { (GInterfaceInitFunc) folks_individual_folks_birthday_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_email_details_info = { (GInterfaceInitFunc) folks_individual_folks_email_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_favourite_details_info = { (GInterfaceInitFunc) folks_individual_folks_favourite_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_gender_details_info = { (GInterfaceInitFunc) folks_individual_folks_gender_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_group_details_info = { (GInterfaceInitFunc) folks_individual_folks_group_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_im_details_info = { (GInterfaceInitFunc) folks_individual_folks_im_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_interaction_details_info = { (GInterfaceInitFunc) folks_individual_folks_interaction_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_local_id_details_info = { (GInterfaceInitFunc) folks_individual_folks_local_id_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_name_details_info = { (GInterfaceInitFunc) folks_individual_folks_name_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_note_details_info = { (GInterfaceInitFunc) folks_individual_folks_note_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_presence_details_info = { (GInterfaceInitFunc) folks_individual_folks_presence_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_phone_details_info = { (GInterfaceInitFunc) folks_individual_folks_phone_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_postal_address_details_info = { (GInterfaceInitFunc) folks_individual_folks_postal_address_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_role_details_info = { (GInterfaceInitFunc) folks_individual_folks_role_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_url_details_info = { (GInterfaceInitFunc) folks_individual_folks_url_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo folks_web_service_details_info = { (GInterfaceInitFunc) folks_individual_folks_web_service_details_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType folks_individual_type_id;
		folks_individual_type_id = g_type_register_static (G_TYPE_OBJECT, "FolksIndividual", &g_define_type_info, 0);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_ALIAS_DETAILS, &folks_alias_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_AVATAR_DETAILS, &folks_avatar_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_BIRTHDAY_DETAILS, &folks_birthday_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_EMAIL_DETAILS, &folks_email_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_FAVOURITE_DETAILS, &folks_favourite_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_GENDER_DETAILS, &folks_gender_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_GROUP_DETAILS, &folks_group_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_IM_DETAILS, &folks_im_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_INTERACTION_DETAILS, &folks_interaction_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_LOCAL_ID_DETAILS, &folks_local_id_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_NAME_DETAILS, &folks_name_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_NOTE_DETAILS, &folks_note_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_PRESENCE_DETAILS, &folks_presence_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_PHONE_DETAILS, &folks_phone_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, &folks_postal_address_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_ROLE_DETAILS, &folks_role_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_URL_DETAILS, &folks_url_details_info);
		g_type_add_interface_static (folks_individual_type_id, FOLKS_TYPE_WEB_SERVICE_DETAILS, &folks_web_service_details_info);
		g_once_init_leave (&folks_individual_type_id__volatile, folks_individual_type_id);
	}
	return folks_individual_type_id__volatile;
}


static void _vala_folks_individual_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FolksIndividual * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	switch (property_id) {
		case FOLKS_INDIVIDUAL_TRUST_LEVEL:
		g_value_set_enum (value, folks_individual_get_trust_level (self));
		break;
		case FOLKS_INDIVIDUAL_AVATAR:
		g_value_set_object (value, folks_avatar_details_get_avatar ((FolksAvatarDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_TYPE:
		g_value_set_enum (value, folks_presence_details_get_presence_type ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_STATUS:
		g_value_set_string (value, folks_presence_details_get_presence_status ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_MESSAGE:
		g_value_set_string (value, folks_presence_details_get_presence_message ((FolksPresenceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IS_USER:
		g_value_set_boolean (value, folks_individual_get_is_user (self));
		break;
		case FOLKS_INDIVIDUAL_ID:
		g_value_set_string (value, folks_individual_get_id (self));
		break;
		case FOLKS_INDIVIDUAL_ALIAS:
		g_value_set_string (value, folks_alias_details_get_alias ((FolksAliasDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_STRUCTURED_NAME:
		g_value_set_object (value, folks_name_details_get_structured_name ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_FULL_NAME:
		g_value_set_string (value, folks_name_details_get_full_name ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_NICKNAME:
		g_value_set_string (value, folks_name_details_get_nickname ((FolksNameDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_GENDER:
		g_value_set_enum (value, folks_gender_details_get_gender ((FolksGenderDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_URLS:
		g_value_set_object (value, folks_url_details_get_urls ((FolksUrlDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PHONE_NUMBERS:
		g_value_set_object (value, folks_phone_details_get_phone_numbers ((FolksPhoneDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_EMAIL_ADDRESSES:
		g_value_set_object (value, folks_email_details_get_email_addresses ((FolksEmailDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_ROLES:
		g_value_set_object (value, folks_role_details_get_roles ((FolksRoleDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LOCAL_IDS:
		g_value_set_object (value, folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_BIRTHDAY:
		g_value_set_boxed (value, folks_birthday_details_get_birthday ((FolksBirthdayDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID:
		g_value_set_string (value, folks_birthday_details_get_calendar_event_id ((FolksBirthdayDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_NOTES:
		g_value_set_object (value, folks_note_details_get_notes ((FolksNoteDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_POSTAL_ADDRESSES:
		g_value_set_object (value, folks_postal_address_details_get_postal_addresses ((FolksPostalAddressDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IS_FAVOURITE:
		g_value_set_boolean (value, folks_favourite_details_get_is_favourite ((FolksFavouriteDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_GROUPS:
		g_value_set_object (value, folks_group_details_get_groups ((FolksGroupDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IM_ADDRESSES:
		g_value_set_object (value, folks_im_details_get_im_addresses ((FolksImDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES:
		g_value_set_object (value, folks_web_service_details_get_web_service_addresses ((FolksWebServiceDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_IM_INTERACTION_COUNT:
		g_value_set_uint (value, folks_interaction_details_get_im_interaction_count ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LAST_IM_INTERACTION_DATETIME:
		g_value_set_boxed (value, folks_interaction_details_get_last_im_interaction_datetime ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_CALL_INTERACTION_COUNT:
		g_value_set_uint (value, folks_interaction_details_get_call_interaction_count ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_LAST_CALL_INTERACTION_DATETIME:
		g_value_set_boxed (value, folks_interaction_details_get_last_call_interaction_datetime ((FolksInteractionDetails*) self));
		break;
		case FOLKS_INDIVIDUAL_PERSONAS:
		g_value_set_object (value, folks_individual_get_personas (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_folks_individual_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FolksIndividual * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_TYPE_INDIVIDUAL, FolksIndividual);
	switch (property_id) {
		case FOLKS_INDIVIDUAL_TRUST_LEVEL:
		folks_individual_set_trust_level (self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_AVATAR:
		folks_avatar_details_set_avatar ((FolksAvatarDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_TYPE:
		folks_presence_details_set_presence_type ((FolksPresenceDetails*) self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_STATUS:
		folks_presence_details_set_presence_status ((FolksPresenceDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_PRESENCE_MESSAGE:
		folks_presence_details_set_presence_message ((FolksPresenceDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_IS_USER:
		folks_individual_set_is_user (self, g_value_get_boolean (value));
		break;
		case FOLKS_INDIVIDUAL_ID:
		folks_individual_set_id (self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_ALIAS:
		folks_alias_details_set_alias ((FolksAliasDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_STRUCTURED_NAME:
		folks_name_details_set_structured_name ((FolksNameDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_FULL_NAME:
		folks_name_details_set_full_name ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_NICKNAME:
		folks_name_details_set_nickname ((FolksNameDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_GENDER:
		folks_gender_details_set_gender ((FolksGenderDetails*) self, g_value_get_enum (value));
		break;
		case FOLKS_INDIVIDUAL_URLS:
		folks_url_details_set_urls ((FolksUrlDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PHONE_NUMBERS:
		folks_phone_details_set_phone_numbers ((FolksPhoneDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_EMAIL_ADDRESSES:
		folks_email_details_set_email_addresses ((FolksEmailDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_ROLES:
		folks_role_details_set_roles ((FolksRoleDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_LOCAL_IDS:
		folks_local_id_details_set_local_ids ((FolksLocalIdDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_BIRTHDAY:
		folks_birthday_details_set_birthday ((FolksBirthdayDetails*) self, g_value_get_boxed (value));
		break;
		case FOLKS_INDIVIDUAL_CALENDAR_EVENT_ID:
		folks_birthday_details_set_calendar_event_id ((FolksBirthdayDetails*) self, g_value_get_string (value));
		break;
		case FOLKS_INDIVIDUAL_NOTES:
		folks_note_details_set_notes ((FolksNoteDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_POSTAL_ADDRESSES:
		folks_postal_address_details_set_postal_addresses ((FolksPostalAddressDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_IS_FAVOURITE:
		folks_favourite_details_set_is_favourite ((FolksFavouriteDetails*) self, g_value_get_boolean (value));
		break;
		case FOLKS_INDIVIDUAL_GROUPS:
		folks_group_details_set_groups ((FolksGroupDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_IM_ADDRESSES:
		folks_im_details_set_im_addresses ((FolksImDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_WEB_SERVICE_ADDRESSES:
		folks_web_service_details_set_web_service_addresses ((FolksWebServiceDetails*) self, g_value_get_object (value));
		break;
		case FOLKS_INDIVIDUAL_PERSONAS:
		folks_individual_set_personas (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



